From 9bf083d44929564141d5c092d63cc2053358f794 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 28 Feb 2018 14:25:08 +0700 Subject: [PATCH] osal clean up remove OSAL_TASK_DEF, OSAL_TASK_FUNCTION --- tinyusb/osal/osal.h | 4 ---- tinyusb/osal/osal_freeRTOS.h | 12 ------------ tinyusb/osal/osal_none.h | 5 ----- 3 files changed, 21 deletions(-) diff --git a/tinyusb/osal/osal.h b/tinyusb/osal/osal.h index 9c136d4d..9f7a2b32 100644 --- a/tinyusb/osal/osal.h +++ b/tinyusb/osal/osal.h @@ -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 diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h index a8d6a9a4..363aa186 100644 --- a/tinyusb/osal/osal_freeRTOS.h +++ b/tinyusb/osal/osal_freeRTOS.h @@ -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); diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index 5701797c..6b014894 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -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