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

@ -132,10 +132,6 @@
<pMon>Segger\JL2CM3.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
@ -668,10 +664,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<ColumnNumber>16</ColumnNumber>
<ColumnNumber>6</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>33</TopLine>
<CurrentLine>41</CurrentLine>
<TopLine>34</TopLine>
<CurrentLine>49</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\tusb.c</PathWithFileName>
<FilenameWithoutPath>tusb.c</FilenameWithoutPath>
@ -1022,7 +1018,7 @@
<Focus>0</Focus>
<ColumnNumber>25</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>144</TopLine>
<TopLine>153</TopLine>
<CurrentLine>161</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName>
@ -1046,7 +1042,7 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
<TopLine>211</TopLine>
<TopLine>212</TopLine>
<CurrentLine>217</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\vendor\cmsis_rtos_rtx\RTX_Conf_CM.c</PathWithFileName>

View File

@ -49,7 +49,7 @@
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF
//--------------------------------------------------------------------+
OSAL_TASK_DEF("cdc serial app", cdc_serial_app_task, 128, CDC_SERIAL_APP_TASK_PRIO);
OSAL_TASK_DEF(cdc_serial_app_task, 128, CDC_SERIAL_APP_TASK_PRIO);
OSAL_QUEUE_DEF(queue_def, QUEUE_SERIAL_DEPTH, uint8_t);
static osal_queue_handle_t queue_hdl;

View File

@ -55,7 +55,7 @@
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
OSAL_TASK_DEF("keyboard app", keyboard_app_task, 128, KEYBOARD_APP_TASK_PRIO);
OSAL_TASK_DEF(keyboard_app_task, 128, KEYBOARD_APP_TASK_PRIO);
OSAL_QUEUE_DEF(queue_kbd_def, QUEUE_KEYBOARD_REPORT_DEPTH, tusb_keyboard_report_t);
static osal_queue_handle_t queue_kbd_hdl;

View File

@ -72,7 +72,7 @@
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
OSAL_TASK_FUNCTION( led_blinking_task ) (void* p_task_para);
OSAL_TASK_DEF("led blinking", led_blinking_task, 128, LED_BLINKING_APP_TASK_PRIO);
OSAL_TASK_DEF(led_blinking_task, 128, LED_BLINKING_APP_TASK_PRIO);
void print_greeting(void);
static inline void wait_blocking_ms(uint32_t ms);

View File

@ -56,7 +56,7 @@
//--------------------------------------------------------------------+
// INTERNAL OBJECT & FUNCTION DECLARATION
//--------------------------------------------------------------------+
OSAL_TASK_DEF("mouse app", mouse_app_task, 128, MOUSE_APP_TASK_PRIO);
OSAL_TASK_DEF(mouse_app_task, 128, MOUSE_APP_TASK_PRIO);
OSAL_QUEUE_DEF(queue_mouse_def, QUEUE_MOUSE_REPORT_DEPTH, tusb_mouse_report_t);
static osal_queue_handle_t queue_mouse_hdl;

View File

@ -29,6 +29,7 @@ tinyusb is designed to be OS-ware and run across OS vendors, thanks to its OS Ab
- **None OS**
- **FreeRTOS**
- **CMSIS RTX**
## Is It Ready ##
@ -44,7 +45,10 @@ coming soon ...
## Supported Toolchains ##
currently only lpcxpresso/redsuite is supported. However Keil & IAR are always on top of the list.
The following toolchain is supported
- lpcxpresso/redsuite
- Keil
## Supported Boards ##

View File

@ -60,9 +60,9 @@ osal_mutex_handle_t mutex_hdl;
void setUp(void)
{
memset(statements, 0, sizeof(statements));
sem_hdl = osal_semaphore_create(OSAL_SEM_REF(sem));
queue_hdl = osal_queue_create(&queue);
mutex_hdl = osal_mutex_create(OSAL_MUTEX_REF(mutex));
sem_hdl = osal_semaphore_create (OSAL_SEM_REF(sem));
queue_hdl = osal_queue_create (OSAL_QUEUE_REF(queue));
mutex_hdl = osal_mutex_create (OSAL_MUTEX_REF(mutex));
}
void tearDown(void)

View File

@ -89,9 +89,11 @@ uint32_t osal_tick_get(void);
typedef uint32_t osal_task_t;
tusb_error_t osal_task_create(osal_task_t *task);
#define OSAL_TASK_DEF(variable, name, code, stack_depth, prio) \
#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
@ -176,6 +178,8 @@ typedef osal_queue_t * osal_queue_handle_t;
#define OSAL_QUEUE_DEF(name, queue_depth, type) \
osal_queue_t name
#define OSAL_QUEUE_REF(name) (&name)
osal_queue_handle_t osal_queue_create (osal_queue_t *p_queue);
void osal_queue_receive (osal_queue_handle_t const queue_hdl, void *p_data, uint32_t msec, tusb_error_t *p_error);
tusb_error_t osal_queue_send (osal_queue_handle_t const queue_hdl, const void * data);

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)

View File

@ -88,7 +88,7 @@ static inline uint32_t osal_tick_get(void)
// OSAL_TASK_LOOP_ENG
// }
//--------------------------------------------------------------------+
#define OSAL_TASK_DEF(variable, name, code, stack_depth, prio)
#define OSAL_TASK_DEF(code, stack_depth, prio)
#define osal_task_create(x) TUSB_ERROR_NONE
#define OSAL_TASK_FUNCTION(task_func) \
@ -267,6 +267,8 @@ typedef osal_queue_t * osal_queue_handle_t;
.item_size = sizeof(type)\
}
#define OSAL_QUEUE_REF(name) (&name)
static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
static inline osal_queue_handle_t osal_queue_create(osal_queue_t * const p_queue)
{

View File

@ -80,7 +80,7 @@
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 16 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 16*1024 ) )
#define configMAX_TASK_NAME_LEN ( 20 )
#define configMAX_TASK_NAME_LEN ( 32 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1