void APP_Run(void) { #if PL_HAS_RTOS_TRACE if (!RTOSTRC1_uiTraceStart()) { for(;;) {} /* failed! */ } #endif EVNT_SetEvent(EVNT_INIT); #if PL_HAS_RTOS if (FRTOS1_xTaskCreate( MainTask, /* pointer to the task */ "Main", /* task name for kernel awareness debugging */ configMINIMAL_STACK_SIZE, /* task stack size */ (void*)NULL, /* optional task startup argument */ tskIDLE_PRIORITY, /* initial priority */ (xTaskHandle*)NULL /* optional task handle to create */ ) != pdPASS ) { /*lint -e527 */ for (;;) { } /* error! probably out of memory */ /*lint +e527 */ } FRTOS1_vTaskStartScheduler(); #else APP_Loop(); #endif }
void APP_Start(void) { PL_Init(); /* platform initialization */ //TEST_Test(); EVNT_SetEvent(EVNT_INIT); /* set initial event */ #if PL_HAS_RTOS if (FRTOS1_xTaskCreate(AppTask, (signed portCHAR *)"App", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) { for(;;){} /* error */ } RTOS_Run(); #else APP_Loop(); #endif #if 0 for(;;) { #if PL_HAS_MEALY MEALY_Step(); #else LED1_On(); WAIT1_Waitms(300); LED1_Off(); LED2_On(); WAIT1_Waitms(300); LED2_Off(); LED3_On(); WAIT1_Waitms(300); LED3_Off(); #endif } #endif /* just in case we leave the main application loop */ PL_Deinit(); }
void APP_Start(void) { PL_Init(); /* platform initialization */ EVNT_SetEvent(EVNT_INIT); #if PL_HAS_RTOS RTOS_Run(); #else APP_Loop(); #endif }