void APP_Run(void) { NEO_Init(); SHELL_Init(); #if PL_HAS_MUSIC || PL_HAS_SD_CARD SPIBus_Init(); #endif #if PL_HAS_MUSIC MUSIC_Init(); #endif #if PL_HAS_RNET RNETA_Init(); #endif #if PL_HAS_PONG PONG_Init(); #else if (FRTOS1_xTaskCreate( NeoTask, /* pointer to the task */ "Neo", /* 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 */ } #endif FRTOS1_vTaskStartScheduler(); }
void APP_Start(void) { #if PL_HAS_RTOS_TRACE if(RTOSTRC1_uiTraceStart()!=1) { for(;;){} /* failure? */ } #endif #if PL_HAS_RADIO RNETA_Init(); #endif SHELL_Init(); 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 */ } timerHndl = xTimerCreate("timer0", TIMER_PERIOD_MS/portTICK_RATE_MS, pdTRUE, (void *)0, vTimerCallback); if (timerHndl==NULL) { for(;;); /* failure! */ } if (xTimerStart(timerHndl, 0)!=pdPASS) { for(;;); /* failure! */ } FRTOS1_vTaskStartScheduler(); }
void APP_Run(void) { SHELL_Init(); /* initialize shell */ VS_Init(); /* initialize VS1053B module */ #if RADIO RNETA_Init(); #endif #if PLAYER PLR_Init(); #endif FRTOS1_vTaskStartScheduler(); }
void APP_Run(void) { RNETA_Init(); if (FRTOS1_xTaskCreate( AppTask, /* pointer to the task */ "App", /* task name for kernel awareness debugging */ configMINIMAL_STACK_SIZE, /* task stack size */ (void*)NULL, /* optional task startup argument */ tskIDLE_PRIORITY+2, /* initial priority */ (xTaskHandle*)NULL /* optional task handle to create */ ) != pdPASS) { /*lint -e527 */ for(;;){}; /* error! probably out of memory */ /*lint +e527 */ } FRTOS1_vTaskStartScheduler(); }
/*lint -save -e970 Disable MISRA rule (6.3) checking. */ int main(void) /*lint -restore Enable MISRA rule (6.3) checking. */ { /* Write your local variable definition here */ /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ PE_low_level_init(); /*** End of Processor Expert internal initialization. ***/ /* Write your code here */ RNETA_Init(); /*** Don't write any code pass this line, or it will be deleted during code generation. ***/ /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/ #ifdef PEX_RTOS_START PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */ #endif /*** End of RTOS startup code. ***/ /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/ for(;;){} /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/ } /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/
void PL_Init(void) { #if PL_CONFIG_HAS_LED LED_Init(); #endif #if PL_CONFIG_HAS_EVENTS EVNT_Init(); #endif #if PL_CONFIG_HAS_TIMER TMR_Init(); #endif #if PL_CONFIG_HAS_TRIGGER TRG_Init(); #endif #if PL_CONFIG_HAS_BUZZER BUZ_Init(); #endif #if PL_CONFIG_HAS_RTOS RTOS_Init(); #endif #if PL_CONFIG_HAS_SHELL SHELL_Init(); #endif #if PL_CONFIG_HAS_SHELL_QUEUE SQUEUE_Init(); #endif #if PL_CONFIG_HAS_MOTOR MOT_Init(); #endif #if PL_CONFIG_HAS_LINE_SENSOR REF_Init(); #endif #if PL_CONFIG_HAS_MOTOR_TACHO TACHO_Init(); #endif #if PL_CONFIG_HAS_MCP4728 MCP4728_Init(); #endif #if PL_CONFIG_HAS_ULTRASONIC US_Init(); #endif #if PL_CONFIG_HAS_PID PID_Init(); #endif #if PL_CONFIG_HAS_DRIVE DRV_Init(); #endif #if PL_CONFIG_HAS_TURN TURN_Init(); #endif #if PL_CONFIG_HAS_LINE_FOLLOW LF_Init(); #endif #if PL_CONFIG_HAS_RADIO RNETA_Init(); #endif #if PL_CONFIG_HAS_REMOTE REMOTE_Init(); #endif #if PL_CONFIG_HAS_IDENTIFY ID_Init(); #endif #if PL_CONFIG_HAS_LINE_MAZE MAZE_Init(); #endif }