all project can run ok

This commit is contained in:
hathach
2013-09-13 22:30:11 +07:00
parent c71f5c6f1b
commit ad0ef2e266
11 changed files with 33 additions and 23 deletions

View File

@@ -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)