summaryrefslogtreecommitdiff
path: root/tinyusb/osal
diff options
context:
space:
mode:
authorhathach <[email protected]>2014-04-17 22:57:11 +0700
committerhathach <[email protected]>2014-04-17 22:57:11 +0700
commit06bb9ad7a797d5da58358a59fb874782e1c67b59 (patch)
tree399b4e7108dc4ef2094468450865fcbbc2ae3dfa /tinyusb/osal
parent69c46b2f9a1b272392fe5fb26d6cbea1da530c13 (diff)
move STRING & XSTRING & STATIC_ASSERT to compiler.h
disable test for a class of cdc host temporarily disable test for test_osal_none.c change include in some core files remove osal.h from common.h
Diffstat (limited to 'tinyusb/osal')
-rw-r--r--tinyusb/osal/osal.h8
-rw-r--r--tinyusb/osal/osal_freeRTOS.h6
2 files changed, 5 insertions, 9 deletions
diff --git a/tinyusb/osal/osal.h b/tinyusb/osal/osal.h
index 0c248ef8a..fbc798213 100644
--- a/tinyusb/osal/osal.h
+++ b/tinyusb/osal/osal.h
@@ -75,8 +75,8 @@
#define OSAL_TASK_LOOP_END }
//------------- Sub Task -------------//
- #define OSAL_SUBTASK_BEGIN // TODO refractor move
- #define OSAL_SUBTASK_END return TUSB_ERROR_NONE;
+ #define OSAL_SUBTASK_BEGIN
+ #define OSAL_SUBTASK_END return TUSB_ERROR_NONE;
#define SUBTASK_EXIT(error) return error;
#define OSAL_SUBTASK_INVOKED_AND_WAIT(subtask, status) status = subtask
@@ -111,10 +111,8 @@ 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_name) void task_name
+#define OSAL_TASK_FUNCTION(task_func, p_para) void task_func(void * p_para)
void osal_task_delay(uint32_t msec);
diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h
index 536a7a097..4d35c3c0f 100644
--- a/tinyusb/osal/osal_freeRTOS.h
+++ b/tinyusb/osal/osal_freeRTOS.h
@@ -133,8 +133,7 @@ static inline void osal_semaphore_reset(osal_semaphore_handle_t const sem_hdl)
#define OSAL_MUTEX_DEF OSAL_SEM_DEF
typedef xSemaphoreHandle osal_mutex_handle_t;
-#define osal_mutex_create(x) \
- xSemaphoreCreateMutex()
+#define osal_mutex_create(x) xSemaphoreCreateMutex()
static inline tusb_error_t osal_mutex_release(osal_mutex_handle_t const mutex_hdl) ATTR_ALWAYS_INLINE;
static inline tusb_error_t osal_mutex_release(osal_mutex_handle_t const mutex_hdl)
@@ -172,8 +171,7 @@ typedef xQueueHandle osal_queue_handle_t;
#define OSAL_QUEUE_REF(name) (&name)
-#define osal_queue_create(p_queue) \
- xQueueCreate((p_queue)->depth, (p_queue)->item_size)
+#define osal_queue_create(p_queue) xQueueCreate((p_queue)->depth, (p_queue)->item_size)
static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error) ATTR_ALWAYS_INLINE;
static inline void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error)