From d4a2600ecc8cdeec26485f8ab564b12de41d6b9b Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 24 Apr 2013 17:53:43 +0700 Subject: [PATCH] - change OSAL_TASK_FUNCTION to have void* parameter (to be consistent with most popular RTOS) - add new error enum TUSB_ERROR_OSAL_TASK_CREATE_FAILED - move usbh_enumeration_task prototype to usbh.h - change OSAL_SUBTASK_INVOKED_AND_WAIT behavior, will not "return" in calling task when subtask got error status. calling task need to do that after the call - osal_queue_receive signature from uint32_t* to void* - implement osal_freertos.h for FreeRTOS 7.3 --> able to compile & build host_freertos + OSAL_TASK_FUNCTION + turn on FPU for M4 in both host_os_none & host_freertos (freertos requires FPU to be on to compile) + osal_task_create + OSAL_SUBTASK_INVOKED_AND_WAIT + SUBTASK_ASSERT + osal_semaphore_reset + osal_queue_flush + adding heap_1.c for memory management --- demos/bsp/boards/board.c | 2 + demos/bsp/boards/board.h | 3 +- demos/host/host_freertos/.cproject | 686 +++++++++++++++++- demos/host/host_freertos/.project | 2 +- demos/host/host_os_none/.cproject | 3 + demos/host/src/keyboard_app.c | 2 +- demos/host/src/keyboard_app.h | 2 +- demos/host/src/main.c | 7 +- demos/host/src/mouse_app.c | 2 +- demos/host/src/mouse_app.h | 2 +- tests/test/host/usbh/test_enum_task.c | 14 +- tests/test/test_osal_none.c | 2 +- tinyusb/common/errors.h | 3 +- tinyusb/host/usbh.c | 40 +- tinyusb/host/usbh.h | 4 +- tinyusb/osal/osal.h | 9 +- tinyusb/osal/osal_freeRTOS.h | 70 +- tinyusb/osal/osal_none.h | 28 +- tinyusb/tusb.c | 2 +- .../freertoslpc/FreeRTOSCommonHooks.c | 2 +- 20 files changed, 799 insertions(+), 86 deletions(-) diff --git a/demos/bsp/boards/board.c b/demos/bsp/boards/board.c index 3007cf794..11321e1df 100644 --- a/demos/bsp/boards/board.c +++ b/demos/bsp/boards/board.c @@ -42,7 +42,9 @@ volatile uint32_t system_ticks = 0; void SysTick_Handler (void) { system_ticks++; +#if TUSB_CFG_OS == TUSB_OS_NONE tusb_tick_tock(); // TODO temporarily +#endif } void check_failed(uint8_t *file, uint32_t line) diff --git a/demos/bsp/boards/board.h b/demos/bsp/boards/board.h index 86e8cca6f..2d66994a8 100644 --- a/demos/bsp/boards/board.h +++ b/demos/bsp/boards/board.h @@ -56,8 +56,7 @@ #endif #include -#include "common/compiler/compiler.h" -#include "common/binary.h" +#include "tusb.h" #define BOARD_AT86RF2XX 1 #define BOARD_LPCXPRESSO1347 2 diff --git a/demos/host/host_freertos/.cproject b/demos/host/host_freertos/.cproject index 39b2e0a11..da8f3f998 100644 --- a/demos/host/host_freertos/.cproject +++ b/demos/host/host_freertos/.cproject @@ -85,8 +85,8 @@ - + @@ -94,6 +94,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -144,12 +483,14 @@ @@ -188,6 +531,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/host/host_freertos/.project b/demos/host/host_freertos/.project index 4b38c440e..7577161e3 100644 --- a/demos/host/host_freertos/.project +++ b/demos/host/host_freertos/.project @@ -103,7 +103,7 @@ - 0 + 1366799906386 26 diff --git a/demos/host/host_os_none/.cproject b/demos/host/host_os_none/.cproject index 66ba2baea..da47f420e 100644 --- a/demos/host/host_os_none/.cproject +++ b/demos/host/host_os_none/.cproject @@ -1158,12 +1158,14 @@