mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
osal clean up remove OSAL_TASK_DEF, OSAL_TASK_FUNCTION
This commit is contained in:
parent
9b7cd608aa
commit
9bf083d449
@ -116,10 +116,6 @@ uint32_t osal_tick_get(void);
|
||||
typedef uint32_t osal_task_t;
|
||||
tusb_error_t osal_task_create(osal_task_t *task);
|
||||
|
||||
#define OSAL_TASK_DEF(code, stack_depth, prio) osal_task_t variable
|
||||
#define OSAL_TASK_REF(name) (&name)
|
||||
#define OSAL_TASK_FUNCTION(task_func, p_para) void task_func(void * p_para)
|
||||
|
||||
void osal_task_delay(uint32_t msec);
|
||||
|
||||
#define OSAL_TASK_LOOP_BEGIN
|
||||
|
@ -64,18 +64,6 @@ extern "C" {
|
||||
//--------------------------------------------------------------------+
|
||||
// TASK API
|
||||
//--------------------------------------------------------------------+
|
||||
#define OSAL_TASK_FUNCTION portTASK_FUNCTION
|
||||
|
||||
#define OSAL_TASK_DEF(task_code, task_stack_depth, task_prio) \
|
||||
osal_task_t osal_task_def_##task_code = {\
|
||||
.name = #task_code , \
|
||||
.code = task_code , \
|
||||
.stack_depth = task_stack_depth , \
|
||||
.prio = task_prio \
|
||||
}
|
||||
|
||||
#define OSAL_TASK_REF(name) (&osal_task_def_##name)
|
||||
|
||||
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)
|
||||
{
|
||||
return xTaskCreate(code, (const signed char*) name, stack_size, param, prio, task_hdl);
|
||||
|
@ -69,17 +69,12 @@ uint32_t tusb_tick_get(void);
|
||||
// OSAL_TASK_LOOP_ENG
|
||||
// }
|
||||
//--------------------------------------------------------------------+
|
||||
#define OSAL_TASK_DEF(code, stack_depth, prio)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
#define TASK_RESTART \
|
||||
state = 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user