- 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
This commit is contained in:
hathach
2013-04-24 17:53:43 +07:00
parent 574710dde5
commit d4a2600ecc
20 changed files with 799 additions and 86 deletions

View File

@@ -90,19 +90,20 @@ tusb_error_t osal_task_create(osal_task_t *task);
osal_task_t name
#define OSAL_TASK_FUNCTION(task_name) \
void task_name(void)
void task_name
#define OSAL_TASK_LOOP_BEGIN
#define OSAL_TASK_LOOP_END
//------------- Sub Task -------------//
#define OSAL_SUBTASK_INVOKED_AND_WAIT(subtask) SUBTASK_ASSERT_STATUS(subtask)
#define OSAL_SUBTASK_INVOKED_AND_WAIT(subtask, status) \
status = subtask
#define OSAL_SUBTASK_BEGIN
#define OSAL_SUBTASK_END \
return TUSB_ERROR_NONE;
//------------- Sub Task Assert (like Task but return error) -------------//
//------------- Sub Task Assert -------------//
#define _SUBTASK_ASSERT_ERROR_HANDLER(error, func_call)\
func_call; return error
@@ -153,7 +154,7 @@ typedef osal_queue_t * osal_queue_handle_t;
osal_queue_t name
osal_queue_handle_t osal_queue_create (osal_queue_t *p_queue);
void osal_queue_receive (osal_queue_handle_t const queue_hdl, uint32_t *p_data, uint32_t msec, tusb_error_t *p_error);
void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error);
tusb_error_t osal_queue_send (osal_queue_handle_t const queue_hdl, const void * data);
void osal_queue_flush(osal_queue_handle_t const queue_hdl);