diff options
| author | hathach <[email protected]> | 2014-02-28 15:50:04 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-02-28 15:50:04 +0700 |
| commit | a1978e20fe04ae98cd54cdddd8f98ba288021d43 (patch) | |
| tree | 8d3d92e24307a38dfbb9bf11c72ea68753ca9b49 /tinyusb/osal/osal_cmsis_rtx.h | |
| parent | 856be67189c85462726cec9b484d2c3a8794cc8d (diff) | |
merge common define in osal/osal_cmsis_rtx.h & osal/osal_freeRTOS.h
Diffstat (limited to 'tinyusb/osal/osal_cmsis_rtx.h')
| -rw-r--r-- | tinyusb/osal/osal_cmsis_rtx.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tinyusb/osal/osal_cmsis_rtx.h b/tinyusb/osal/osal_cmsis_rtx.h index b2b2258f2..74682e3ee 100644 --- a/tinyusb/osal/osal_cmsis_rtx.h +++ b/tinyusb/osal/osal_cmsis_rtx.h @@ -61,9 +61,6 @@ //--------------------------------------------------------------------+ // TASK API //--------------------------------------------------------------------+ -#define OSAL_TASK_FUNCTION(task_func) \ - void task_func - typedef osThreadDef_t osal_task_t; #define OSAL_TASK_DEF(task_code, task_stack_depth, task_prio) \ @@ -79,38 +76,6 @@ static inline tusb_error_t osal_task_create(const osal_task_t *task) #define osal_task_delay(msec) osDelay(msec) -#define OSAL_TASK_LOOP_BEGIN \ - while(1) { - -#define OSAL_TASK_LOOP_END \ - } - -//------------- Sub Task -------------// -#define OSAL_SUBTASK_BEGIN // TODO refractor move -#define OSAL_SUBTASK_END \ - return TUSB_ERROR_NONE; - -#define SUBTASK_EXIT(error) return error; - -#define OSAL_SUBTASK_INVOKED_AND_WAIT(subtask, status) \ - status = subtask - -//------------- Sub Task Assert -------------// -#define SUBTASK_ASSERT_STATUS(sts) ASSERT_STATUS(sts) -#define SUBTASK_ASSERT(condition) ASSERT(condition, TUSB_ERROR_OSAL_TASK_FAILED) - -#define _SUBTASK_ASSERT_ERROR_HANDLER(error, func_call)\ - func_call; return error - -#define SUBTASK_ASSERT_STATUS_WITH_HANDLER(sts, func_call) \ - ASSERT_DEFINE_WITH_HANDLER(_SUBTASK_ASSERT_ERROR_HANDLER, func_call, tusb_error_t status = (tusb_error_t)(sts),\ - TUSB_ERROR_NONE == status, status, "%s", TUSB_ErrorStr[status]) - -#define SUBTASK_ASSERT_WITH_HANDLER(condition, func_call) \ - ASSERT_DEFINE_WITH_HANDLER(_SUBTASK_ASSERT_ERROR_HANDLER, func_call, ,\ - condition, TUSB_ERROR_OSAL_TASK_FAILED, "%s", "evaluated to false") - - //--------------------------------------------------------------------+ // Semaphore API //--------------------------------------------------------------------+ |
