本文整理汇总了C++中FRTOS1_xTaskCreate函数的典型用法代码示例。如果您正苦于以下问题:C++ FRTOS1_xTaskCreate函数的具体用法?C++ FRTOS1_xTaskCreate怎么用?C++ FRTOS1_xTaskCreate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FRTOS1_xTaskCreate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: APP_Start
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+500, /* 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();
}
示例2: APP_Run
void APP_Run(void) {
appState = APP_STATE_INIT;
MOT_Init();
SHELL_Init();
#if PL_HAS_LINE_SENSOR
REF_Init();
LF_Init();
TURN_Init();
#endif
#if PL_HAS_ULTRASONIC
US_Init();
#endif
#if PL_HAS_BUZZER
BUZ_Init();
#endif
#if PL_HAS_EVENTS
EVNT_Init();
#endif
#if PL_HAS_RADIO
RADIO_Init();
#endif
#if PL_HAS_REMOTE
REMOTE_Init();
#endif
#if PL_HAS_QUEUE
QUEUE_Init();
#endif
if (FRTOS1_xTaskCreate(MainTask, (signed portCHAR *)"Main", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {
for(;;){} /* error */
}
FRTOS1_vTaskStartScheduler();
}
示例3: SEM_Init
/*! \brief Initializes module */
void SEM_Init(void) {
#if USE_SEMAPHORES
if (FRTOS1_xTaskCreate(vMasterTask, "Master", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {
for(;;){} /* error */
}
#endif
}
示例4: REF_Init
void REF_Init(void) {
refState = REF_STATE_INIT;
timerHandle = RefCnt_Init(NULL);
/*! \todo You might need to adjust priority or other task settings */
if (FRTOS1_xTaskCreate(ReflTask, "Refl", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error */
}
}
示例5: SEM_Init
/*! \brief Initializes module */
void SEM_Init(void) {
/*! \todo Implement functionality */
#if 0
if (FRTOS1_xTaskCreate(vMasterTask, "Master", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error */
}
#endif
}
示例6: APP_Start
void APP_Start(void) {
NEO_Init();
SHELL_Init();
if (FRTOS1_xTaskCreate(AppTask, "App", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+2, NULL) != pdPASS) {
for(;;){} /* error */
}
FRTOS1_vTaskStartScheduler();
}
示例7: APPFRDM_Init
void APPFRDM_Init(void)
{
if (FRTOS1_xTaskCreate(T3, (signed portCHAR *)"T3", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS)
{
for(;;){}
}
}
示例8: BLEUART_CMDMODE_Init
void BLEUART_CMDMODE_Init(void) {
txBuffer[0] = '\0';
isConnected = FALSE;
isEnabled = FALSE;
if (FRTOS1_xTaskCreate(BleUartTask, "BleUart", configMINIMAL_STACK_SIZE+100, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {
for(;;){} /* error */
}
}
示例9: StateMachine_Init
void StateMachine_Init(void) {
//refState = REF_STATE_INIT;
//timerHandle = RefCnt_Init(NULL);
/*! \todo You might need to adjust priority or other task settings */
DRV_EnableDisable(0);
if (FRTOS1_xTaskCreate(StateMachineTask, "StateMachine", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error */
}
}
示例10: RTOS_Init
void RTOS_Init(void) {
static const int led1 = 1;
static const int led2 = 2;
EVNT_SetEvent(EVNT_STARTUP); /* set startup event */
/*! \todo Create tasks here */
if (FRTOS1_xTaskCreate(AppTask, (signed portCHAR *)"App1", configMINIMAL_STACK_SIZE, (void*)&led1, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error case only, stay here! */
}
#if 0
if (FRTOS1_xTaskCreate(AppTask, (signed portCHAR *)"App2", configMINIMAL_STACK_SIZE, (void*)&led2, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error case only, stay here! */
}
if (FRTOS1_xTaskCreate(KillMe, (signed portCHAR *)"KillMe", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error case only, stay here! */
}
#endif
}
示例11: main
/*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. ***/
if (FRTOS1_xTaskCreate(
Task1, /* pointer to the task */
(signed portCHAR *)"Task1", /* 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 */
}
if (FRTOS1_xTaskCreate(
Task2, /* pointer to the task */
(signed portCHAR *)"Task2", /* 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 */
}
/*** 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!!! ***/
示例12: SHELL_Init
void SHELL_Init(void) {
#if !CLS1_DEFAULT_SERIAL && PL_HAS_BLUETOOTH
(void)CLS1_SetStdio(&BT_stdio); /* use the Bluetooth stdio as default */
#endif
#if PL_HAS_RTOS
if (FRTOS1_xTaskCreate(ShellTask, "Shell", configMINIMAL_STACK_SIZE+100, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {
for(;;){} /* error */
}
#endif
}
示例13: REMOTE_Init
/*! \brief Initializes module */
void REMOTE_Init(void) {
REMOTE_isOn = FALSE;
REMOTE_isVerbose = FALSE;
REMOTE_useJoystick = TRUE;
#if PL_CONFIG_CONTROL_SENDER
if (FRTOS1_xTaskCreate(RemoteTask, "Remote", configMINIMAL_STACK_SIZE+50, NULL, tskIDLE_PRIORITY, NULL) != pdPASS) {
for(;;){} /* error */
}
#endif
}
示例14: ACCEL_StartOrientationTask
void ACCEL_StartOrientationTask(void) {
#if PL_HAS_HW_ACCELEROMETER
ACCEL1_CalibrateZ1g(); /* assume device is flat during reset/power-up */
//ACCEL1_CalibrateX1g(); /* flat on switch side */
//ACCEL1_CalibrateY1g(); /* flat on LCD side */
#endif
#if PL_HAS_ACCEL_ORIENT
FRTOS1_xTaskCreate(TaskAccelOrientation, (signed portCHAR *)"AccelOrient", configMINIMAL_STACK_SIZE+50, NULL, tskIDLE_PRIORITY+1, &xHandleTaskAccelOrientation);
#endif
}
示例15: REF_Init
void REF_Init(void) {
mutexHandle = FRTOS1_xSemaphoreCreateMutex();
if (mutexHandle==NULL) {
for(;;);
}
timerHandle = TU1_Init(NULL);
InitSensorValues();
if (FRTOS1_xTaskCreate(ReflTask, (signed portCHAR *)"Refl", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY+1, NULL) != pdPASS) {
for(;;){} /* error */
}
}