summaryrefslogtreecommitdiff
path: root/tinyusb/osal/osal_none.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-04-23 15:35:27 +0700
committerhathach <[email protected]>2013-04-23 15:35:27 +0700
commit73d5f00a40dcdc9a84e0f915d0ff349f231444c6 (patch)
tree309c3552bc787e8b76566ed2c750455587411ca5 /tinyusb/osal/osal_none.h
parent0b9f553f81fd524071ae8f7767c6a260f67ee789 (diff)
rename OSAL_TASK_DECLARE to OSAL_TASK_FUNCTION
removing TASK_ASSERT to avoid using goto/continue statement with rtos configure
Diffstat (limited to 'tinyusb/osal/osal_none.h')
-rw-r--r--tinyusb/osal/osal_none.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h
index 75bb41fbd..9b8b16fc5 100644
--- a/tinyusb/osal/osal_none.h
+++ b/tinyusb/osal/osal_none.h
@@ -51,12 +51,12 @@
#ifndef _TUSB_OSAL_NONE_H_
#define _TUSB_OSAL_NONE_H_
+#include "osal_common.h"
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "osal_common.h"
-
//--------------------------------------------------------------------+
// TICK API
//--------------------------------------------------------------------+
@@ -90,7 +90,7 @@ static inline volatile uint32_t osal_tick_get(void)
#define OSAL_TASK_DEF(name, code, stack_depth, prio)
#define osal_task_create(x) TUSB_ERROR_NONE
-#define OSAL_TASK_DECLARE(task_name) \
+#define OSAL_TASK_FUNCTION(task_name) \
tusb_error_t task_name(void)
#define TASK_RESTART state = 0
@@ -145,11 +145,11 @@ static inline volatile uint32_t osal_tick_get(void)
ASSERT_DEFINE_WITH_HANDLER(_TASK_ASSERT_ERROR_HANDLER, func_call, ,\
condition, TUSB_ERROR_OSAL_TASK_FAILED, "%s", "evaluated to false")
-//------------- Sub Task Assert -------------// TODO replace directly by TASK ASSERT
-#define SUBTASK_ASSERT_STATUS(...) TASK_ASSERT_STATUS(__VA_ARGS__)
-#define SUBTASK_ASSERT_STATUS_WITH_HANDLER(...) TASK_ASSERT_STATUS_WITH_HANDLER(__VA_ARGS__)
-#define SUBTASK_ASSERT(...) TASK_ASSERT(__VA_ARGS__)
-#define SUBTASK_ASSERT_WITH_HANDLER(...) TASK_ASSERT_WITH_HANDLER(__VA_ARGS__)
+//------------- Sub Task Assert -------------//
+#define SUBTASK_ASSERT_STATUS TASK_ASSERT_STATUS
+#define SUBTASK_ASSERT_STATUS_WITH_HANDLER TASK_ASSERT_STATUS_WITH_HANDLER
+#define SUBTASK_ASSERT TASK_ASSERT
+#define SUBTASK_ASSERT_WITH_HANDLER TASK_ASSERT_WITH_HANDLER
//--------------------------------------------------------------------+
// Semaphore API