diff options
| author | hathach <[email protected]> | 2013-04-24 17:53:43 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-04-24 17:53:43 +0700 |
| commit | d4a2600ecc8cdeec26485f8ab564b12de41d6b9b (patch) | |
| tree | bb30227f93c28506ca4a38ead6cf3a2dc3b7e251 /demos/host/src | |
| parent | 574710dde57a466d0fee6d8b3ccb0366eb64deba (diff) | |
- 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
Diffstat (limited to 'demos/host/src')
| -rw-r--r-- | demos/host/src/keyboard_app.c | 2 | ||||
| -rw-r--r-- | demos/host/src/keyboard_app.h | 2 | ||||
| -rw-r--r-- | demos/host/src/main.c | 7 | ||||
| -rw-r--r-- | demos/host/src/mouse_app.c | 2 | ||||
| -rw-r--r-- | demos/host/src/mouse_app.h | 2 |
5 files changed, 9 insertions, 6 deletions
diff --git a/demos/host/src/keyboard_app.c b/demos/host/src/keyboard_app.c index 0d543e589..889bb0c48 100644 --- a/demos/host/src/keyboard_app.c +++ b/demos/host/src/keyboard_app.c @@ -97,7 +97,7 @@ void keyboard_app_init(void) } //------------- main task -------------// -OSAL_TASK_FUNCTION( keyboard_app_task ) +OSAL_TASK_FUNCTION( keyboard_app_task ) (void* p_task_para) { tusb_error_t error; tusb_keyboard_report_t kbd_report; diff --git a/demos/host/src/keyboard_app.h b/demos/host/src/keyboard_app.h index 1f71e4006..2acd349bc 100644 --- a/demos/host/src/keyboard_app.h +++ b/demos/host/src/keyboard_app.h @@ -63,7 +63,7 @@ void keyboard_app_init(void); -OSAL_TASK_FUNCTION( keyboard_app_task ); +OSAL_TASK_FUNCTION( keyboard_app_task ) (void* p_task_para); #ifdef __cplusplus } diff --git a/demos/host/src/main.c b/demos/host/src/main.c index ed7eb2d0b..ad7d2c8a5 100644 --- a/demos/host/src/main.c +++ b/demos/host/src/main.c @@ -33,9 +33,12 @@ int main(void) while (1) { + +#if TUSB_CFG_OS == TUSB_OS_NONE tusb_task_runner(); - keyboard_app_task(); - mouse_app_task(); + keyboard_app_task(NULL); + mouse_app_task(NULL); +#endif if (current_tick + CFG_TICKS_PER_SECOND < system_ticks) { diff --git a/demos/host/src/mouse_app.c b/demos/host/src/mouse_app.c index 81b5f2e6f..4d81941ab 100644 --- a/demos/host/src/mouse_app.c +++ b/demos/host/src/mouse_app.c @@ -96,7 +96,7 @@ void mouse_app_init(void) } //------------- main task -------------// -OSAL_TASK_FUNCTION( mouse_app_task ) +OSAL_TASK_FUNCTION( mouse_app_task ) (void* p_task_para) { tusb_error_t error; tusb_mouse_report_t mouse_report; diff --git a/demos/host/src/mouse_app.h b/demos/host/src/mouse_app.h index 3830424da..eb0773bd9 100644 --- a/demos/host/src/mouse_app.h +++ b/demos/host/src/mouse_app.h @@ -62,7 +62,7 @@ #endif void mouse_app_init(void); -OSAL_TASK_FUNCTION( mouse_app_task ); +OSAL_TASK_FUNCTION( mouse_app_task ) (void* p_task_para); #ifdef __cplusplus } |
