osal clean up

- task create, task def macros
This commit is contained in:
hathach
2018-02-28 14:21:31 +07:00
parent 5efad7412f
commit 9b7cd608aa
20 changed files with 360 additions and 287 deletions

View File

@@ -70,8 +70,13 @@ uint32_t tusb_tick_get(void);
// }
//--------------------------------------------------------------------+
#define OSAL_TASK_DEF(code, stack_depth, prio)
#define OSAL_TASK_REF
#define osal_task_create(x) TUSB_ERROR_NONE
static inline bool osal_task_create(osal_func_t code, const char* name, uint32_t stack_size, void* param, uint32_t prio, osal_task_t* task_hdl)
{
(void) code; (void) name; (void) stack_size; (void) param; (void) prio; (void) task_hdl;
return true;
}
#define OSAL_TASK_FUNCTION(task_func, p_para) tusb_error_t task_func(void * p_para)
@@ -89,7 +94,7 @@ uint32_t tusb_tick_get(void);
default:\
TASK_RESTART;\
}}\
return TUSB_ERROR_NONE;
return /*TUSB_ERROR_NONE*/;
#define osal_task_delay(msec) \