remvoe main as thread of cmsis rtx for portability.

Keil & lpcxpresso4 host_cmsis_rtx work well
This commit is contained in:
hathach
2014-03-19 16:06:27 +07:00
parent 582492b02c
commit 96bb6c8968
8 changed files with 56 additions and 44 deletions

View File

@@ -89,6 +89,10 @@ void os_none_start_scheduler(void)
int main(void)
{
#if TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
osKernelInitialize(); // CMSIS RTX requires kernel init before any other OS functions
#endif
board_init();
print_greeting();
@@ -109,10 +113,7 @@ int main(void)
#elif TUSB_CFG_OS == TUSB_OS_NONE
os_none_start_scheduler();
#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
while(1)
{
osDelay(osWaitForever); // CMSIS RTX osKernelStart already started, main() is a task
}
osKernelStart();
#else
#error need to start RTOS schduler
#endif