summaryrefslogtreecommitdiff
path: root/tinyusb/osal/osal_freeRTOS.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-09-13 22:30:11 +0700
committerhathach <[email protected]>2013-09-13 22:30:11 +0700
commitad0ef2e266475c643b36cb34d3ab1b8876bb6ec2 (patch)
treecfdd80fe2332b30c7c1f95b925e1c2decf7690ed /tinyusb/osal/osal_freeRTOS.h
parentc71f5c6f1ba46a23847a2eea83176e15058f21e6 (diff)
all project can run ok
Diffstat (limited to 'tinyusb/osal/osal_freeRTOS.h')
-rw-r--r--tinyusb/osal/osal_freeRTOS.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tinyusb/osal/osal_freeRTOS.h b/tinyusb/osal/osal_freeRTOS.h
index 8bdd58cd8..add9292f0 100644
--- a/tinyusb/osal/osal_freeRTOS.h
+++ b/tinyusb/osal/osal_freeRTOS.h
@@ -82,14 +82,16 @@ typedef struct {
unsigned portBASE_TYPE prio;
} osal_task_t;
-#define OSAL_TASK_DEF(task_variable, task_name, task_code, task_stack_depth, task_prio) \
- osal_task_t task_variable = {\
- .name = task_name , \
+#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 tusb_error_t osal_task_create(osal_task_t *task) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline tusb_error_t osal_task_create(osal_task_t *task)
{
@@ -208,6 +210,8 @@ typedef xQueueHandle osal_queue_handle_t;
.item_size = sizeof(type)\
}
+#define OSAL_QUEUE_REF(name) (&name)
+
#define osal_queue_create(p_queue) \
xQueueCreate((p_queue)->depth, (p_queue)->item_size)