您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vStartQueuePeekTasks函数代码示例

51自学网 2021-06-03 09:31:12
  C++
这篇教程C++ vStartQueuePeekTasks函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vStartQueuePeekTasks函数的典型用法代码示例。如果您正苦于以下问题:C++ vStartQueuePeekTasks函数的具体用法?C++ vStartQueuePeekTasks怎么用?C++ vStartQueuePeekTasks使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vStartQueuePeekTasks函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main( void ){	/* Prepare the hardware. */	prvSetupHardware();	/* Create the queue used by the LCD task.  Messages for display on the LCD	are received via this queue. */	xLCDQueue = xQueueCreate( mainLCD_QUEUE_SIZE, sizeof( xLCDMessage ) );	/* Start the standard demo tasks.  These do nothing other than test the	port and provide some APU usage examples. */    vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartRecursiveMutexTasks();	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vCreateBlockTimeTasks();	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartQueuePeekTasks();	vStartLEDFlashTasks( mainLED_TASK_PRIORITY );	vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainBAUD_RATE, mainCOM_TEST_LED );	/* Start the tasks defined within this file/specific to this demo. */	xTaskCreate( prvLCDTask, "LCD", mainLCD_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	/* Start the scheduler. */	vTaskStartScheduler();    /* Will only get here if there was insufficient memory to create the idle    task. */	return 0;}
开发者ID:granthuu,项目名称:fsm_software,代码行数:32,


示例2: main

int main( void ){#ifdef DEBUG  debug();#endif	/* Set up the clocks and memory interface. */	prvSetupHardware();	/* Start the standard demo tasks.  These are just here to exercise the	kernel port and provide examples of how the FreeRTOS API can be used. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );    vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );    vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );    vStartQueuePeekTasks();    vStartRecursiveMutexTasks();	/* Create the 'echo' task, which is also defined within this file. */	xTaskCreate( prvUSARTEchoTask, ( signed char * ) "Echo", configMINIMAL_STACK_SIZE, NULL, mainECHO_TASK_PRIORITY, NULL );	/* Create the 'check' task, which is also defined within this file. */	xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );    /* Start the scheduler. */	vTaskStartScheduler();    /* Will only get here if there was insufficient memory to create the idle    task.  The idle task is created within vTaskStartScheduler(). */	for( ;; );}
开发者ID:ammarkham,项目名称:freertos-moo,代码行数:32,


示例3: main

int main( void ){	#ifdef DEBUG		debug();	#endif	prvSetupHardware();	/* Create the queue used by the LCD task.  Messages for display on the LCD	are received via this queue. */	xLCDQueue = xQueueCreate( mainLCD_QUEUE_SIZE, sizeof( xLCDMessage ) );		/* Start the standard demo tasks. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );    vCreateBlockTimeTasks();	vStartGenericQueueTasks( mainGEN_Q_PRIORITY );	vStartQueuePeekTasks();	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	/* Start the tasks defined within this file/specific to this demo. */    xTaskCreate( prvCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );		xTaskCreate( prvLCDTask, ( signed portCHAR * ) "LCD", configLCD_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( prvFlashTask, ( signed portCHAR * ) "Flash", configMINIMAL_STACK_SIZE, NULL, mainFLASH_TASK_PRIORITY, NULL );	/* Configure the timers used by the fast interrupt timer test. */	vSetupTimerTest();		/* Start the scheduler. */	vTaskStartScheduler();		/* Will only get here if there was not enough heap space to create the	idle task. */	return 0;}
开发者ID:Hermis,项目名称:FreeRTOS_OR1200,代码行数:34,


示例4: main

/* * Starts all the other tasks, then starts the scheduler. */int main( void ){	/* Setup any hardware that has not already been configured by the low	level init routines. */	prvSetupHardware();	/* Start the task that handles the TCP/IP and WEB server functionality. */    xTaskCreate( vuIP_Task, "uIP", mainUIP_TASK_STACK_SIZE, NULL, mainUIP_PRIORITY, NULL );		/* Also start the USB demo which is just for the SAM7. */    vStartUSBTask( mainUSB_PRIORITY );		/* Start the standard demo tasks. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );    vCreateBlockTimeTasks();    vStartLEDFlashTasks( mainFLASH_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );    vStartQueuePeekTasks();       vStartDynamicPriorityTasks();	/* Start the scheduler.	NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.	The processor MUST be in supervisor mode when vTaskStartScheduler is	called.  The demo applications included in the FreeRTOS.org download switch	to supervisor mode prior to main being called.  If you are not using one of	these demo application projects then ensure Supervisor mode is used here. */	vTaskStartScheduler();	/* We should never get here as control is now taken by the scheduler. */  	return 0;}
开发者ID:RitikaGupta1207,项目名称:freertos,代码行数:36,


示例5: main

int main( void ){	/* Configure the hardware for use by this demo. */	prvSetupHardware();	/* Start the standard demo tasks.  These are just here to exercise the	kernel port and provide examples of how the FreeRTOS API can be used. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );    vCreateBlockTimeTasks();    vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );    vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );    vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );    vStartQueuePeekTasks();    vStartRecursiveMutexTasks();	vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );    /* Create the USB task. */    xTaskCreate( vUSBTask, "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );	/* Create the uIP task.  The WEB server runs in this task. */    xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL );    /* Start the scheduler. */	vTaskStartScheduler();    /* Will only get here if there was insufficient memory to create the idle    task.  The idle task is created within vTaskStartScheduler(). */	for( ;; );}
开发者ID:chen0510566,项目名称:BeagleBone,代码行数:30,


示例6: main_full

/* * Create the demo tasks then start the scheduler. */int main_full( void ){TimerHandle_t xTimer = NULL;	/* Create the LCD task - this returns the queue to use when writing	messages to the LCD. */	xLCDQueue = xStartLCDTask();	/* Create all the other standard demo tasks. */	vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS );    vCreateBlockTimeTasks();    vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );    vStartQueuePeekTasks();	vStartInterruptQueueTasks();	/* Create the tasks defined within this file. */	xTaskCreate( prvRegTestTask1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( prvRegTestTask2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );    /* The PIC32MX795 uses an 8 deep fifo where TX interrupts are asserted	whilst the TX buffer is empty.  This causes an issue with the test driver so	it is not used in this demo */	#if !defined(__32MX795F512L__)		vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );	#endif	/* Create the software timer that performs the 'check' functionality, as	described at the top of this file. */	xTimer = xTimerCreate( 	"CheckTimer",/* A text name, purely to help debugging. */							( mainCHECK_TIMER_PERIOD_MS ),		/* The timer period, in this case 3000ms (3s). */							pdTRUE,								/* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */							( void * ) 0,						/* The ID is not used, so can be set to anything. */							prvCheckTimerCallback				/* The callback function that inspects the status of all the other tasks. */						);	if( xTimer != NULL )	{		xTimerStart( xTimer, mainDONT_BLOCK );	}	/* A software timer is also used to start the high frequency timer test.	This is to ensure the test does not start before the kernel.  This time a	one shot software timer is used. */	xTimer = xTimerCreate( "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest );	if( xTimer != NULL )	{		xTimerStart( xTimer, mainDONT_BLOCK );	}	/* Finally start the scheduler. */	vTaskStartScheduler();	/* If all is well, the scheduler will now be running, and the following line	will never be reached.  If the following line does execute, then there was	insufficient FreeRTOS heap memory available for the idle and/or timer tasks	to be created.  See the memory management section on the FreeRTOS web site	for more details. */	for( ;; );}
开发者ID:granthuu,项目名称:fsm_software,代码行数:63,


示例7: main_full

/* * Create the demo tasks then start the scheduler. */int main_full( void ){xTimerHandle xTimer = NULL;	/* Create all the other standard demo tasks. */	vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS );	vCreateBlockTimeTasks();	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartInterruptQueueTasks();	vStartISRTriggeredTask();	vStartCountingSemaphoreTasks();	vStartDynamicPriorityTasks();	vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );	vStartQueueSetTasks();	vStartRecursiveMutexTasks();	/* Create the tasks defined within this file. */	xTaskCreate( prvRegTestTask1,			/* The function that implements the task. */				"Reg1",						/* Text name for the task to assist debugger - not used by FreeRTOS itself. */				configMINIMAL_STACK_SIZE,	/* The stack size to allocate for the task - specified in words not bytes. */				NULL,						/* The parameter to pass into the task - not used in this case so set to NULL. */				tskIDLE_PRIORITY,			/* The priority to assign to the task. */				NULL );						/* Used to obtain a handle to the task being created - not used in this case so set to NULL. */	xTaskCreate( prvRegTestTask2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	/* Create the software timer that performs the 'check' functionality, as	described at the top of this file. */	xTimer = xTimerCreate( 	"CheckTimer",/* A text name, purely to help debugging. */							( mainCHECK_TIMER_PERIOD_MS ),		/* The timer period, in this case 3000ms (3s). */							pdTRUE,								/* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */							( void * ) 0,						/* The ID is not used, so can be set to anything. */							prvCheckTimerCallback );			/* The callback function that inspects the status of all the other tasks. */	if( xTimer != NULL )	{		xTimerStart( xTimer, mainDONT_BLOCK );	}	/* A software timer is also used to start the high frequency timer test.	This is to ensure the test does not start before the kernel.  This time a	one shot software timer is used. */	xTimer = xTimerCreate( "HighHzTimerSetup", 1, pdFALSE, ( void * ) 0, prvSetupHighFrequencyTimerTest );	if( xTimer != NULL )	{		xTimerStart( xTimer, mainDONT_BLOCK );	}	/* Finally start the scheduler. */	vTaskStartScheduler();	/* If all is well, the scheduler will now be running, and the following line	will never be reached.  If the following line does execute, then there was	insufficient FreeRTOS heap memory available for the idle and/or timer tasks	to be created.  See the memory management section on the FreeRTOS web site	for more details.  http://www.freertos.org/a00111.html */	for( ;; );}
开发者ID:RitikaGupta1207,项目名称:freertos,代码行数:63,


示例8: main

int main( void ){    prvSetupHardware();    /* Create the queue used by the LCD task.  Messages for display on the LCD    are received via this queue. */    xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );    /* Create the uIP task.  This uses the lwIP RTOS abstraction layer.*/    xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );    /* Start the standard demo tasks. */    vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );    vCreateBlockTimeTasks();    vStartLEDFlashTasks( mainFLASH_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );    vStartQueuePeekTasks();    vStartDynamicPriorityTasks();    /* Start the tasks defined within this file/specific to this demo. */    xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );    /* Start the scheduler. */    vTaskStartScheduler();    /* Will only get here if there was insufficient memory to create the idle    task. */    return 0;}
开发者ID:RitikaGupta1207,项目名称:freertos,代码行数:29,


示例9: main

int main( void ){	/* Perform the necessary hardware configuration. */	prvSetupHardware();	/* Create the task that writes various text and patterns to the LCD. */	xTaskCreate( vLCDTask, "LCD", configMINIMAL_STACK_SIZE, NULL, mainLCD_TASK_PRIORITY, NULL );	/* Create a task that writes to LEDs 8 to 15. */	xTaskCreate( vLEDTask, "LEDTask", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );	/* Create some of the standard demo tasks.  These just test the port and	demonstrate how the FreeRTOS API can be used.  They do not provide any	specific functionality. */	vStartGenericQueueTasks( mainGEN_Q_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartRecursiveMutexTasks();	vStartSemaphoreTasks( mainSEMAPHORE_TASK_PRIORITY );		/* Create the check task as described at the top of this file. */	xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );		/* Start the scheduler. */	vTaskStartScheduler();		/* The scheduler should now be running the tasks so the following code should	never be reached.  If it is reached then there was insufficient heap space	for the idle task to be created.  In this case the heap size is set by	configTOTAL_HEAP_SIZE in FreeRTOSConfig.h. */	for( ;; );}
开发者ID:BirdBare,项目名称:STM32F4-Discovery_FW_V1.1.0_Makefiles,代码行数:31,


示例10: main_full

int main_full( void ){	/* Start the check task as described at the top of this file. */	xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );	/* Create the standard demo tasks. */	vStartTaskNotifyTask();	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartMathTasks( mainFLOP_TASK_PRIORITY );	vStartRecursiveMutexTasks();	vStartCountingSemaphoreTasks();	vStartDynamicPriorityTasks();	vStartQueueSetTasks();	vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );	vStartEventGroupTasks();	vStartInterruptSemaphoreTasks();	vStartQueueSetPollingTask();	vCreateBlockTimeTasks();	vCreateAbortDelayTasks();	xTaskCreate( prvDemoQueueSpaceFunctions, "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( prvPermanentlyBlockingSemaphoreTask, "BlockSem", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( prvPermanentlyBlockingNotificationTask, "BlockNoti", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	#if( configSUPPORT_STATIC_ALLOCATION == 1 )	{		vStartStaticallyAllocatedTasks();	}	#endif	#if( configUSE_PREEMPTION != 0  )	{		/* Don't expect these tasks to pass when preemption is not used. */		vStartTimerDemoTask( mainTIMER_TEST_PERIOD );	}	#endif	/* The suicide tasks must be created last as they need to know how many	tasks were running prior to their creation.  This then allows them to	ascertain whether or not the correct/expected number of tasks are running at	any given time. */	vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );	/* Create the semaphore that will be deleted in the idle task hook.  This	is done purely to test the use of vSemaphoreDelete(). */	xMutexToDelete = xSemaphoreCreateMutex();	/* Start the scheduler itself. */	vTaskStartScheduler();	/* Should never get here unless there was not enough heap space to create	the idle and other system tasks. */	return 0;}
开发者ID:AlexShiLucky,项目名称:freertos,代码行数:58,


示例11: main

/* * Starts all the other tasks, then starts the scheduler. */void main( void ){	#ifdef DEBUG		debug();	#endif		/* Setup any hardware that has not already been configured by the low	level init routines. */	prvSetupHardware();	/* Create the queue used to send data to the LCD task. */	xLCDQueue = xQueueCreate( mainLCD_QUEUE_LEN, sizeof( xLCDMessage ) );		/* Start all the standard demo application tasks. */	vStartIntegerMathTasks( tskIDLE_PRIORITY );	vStartLEDFlashTasks( mainLED_TASK_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vStartDynamicPriorityTasks();	vStartMathTasks( tskIDLE_PRIORITY );	vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );	vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );	vStartQueuePeekTasks();		/* Start the tasks which are defined in this file. */	xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );	xTaskCreate( prvLCDTask, "LCD", configMINIMAL_STACK_SIZE, ( void * ) &xLCDQueue, mainLCD_TASK_PRIORITY, NULL );	xTaskCreate( prvLCDMessageTask, "MSG", configMINIMAL_STACK_SIZE, ( void * ) &xLCDQueue, mainMSG_TASK_PRIORITY, NULL );	/* Start either the uIP TCP/IP stack or the lwIP TCP/IP stack. */	#ifdef STACK_UIP		/* Finally, create the WEB server task. */		xTaskCreate( vuIP_Task, "uIP", configMINIMAL_STACK_SIZE * 3, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );	#endif	#ifdef STACK_LWIP			/* Create the lwIP task.  This uses the lwIP RTOS abstraction layer.*/	  	vlwIPInit();		sys_set_state(	( signed portCHAR * ) "httpd", lwipBASIC_SERVER_STACK_SIZE );	  	sys_thread_new( vBasicWEBServer, ( void * ) NULL, basicwebWEBSERVER_PRIORITY );		sys_set_default_state();	#endif	/* Start the scheduler.	NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.	The processor MUST be in supervisor mode when vTaskStartScheduler is	called.  The demo applications included in the FreeRTOS.org download switch	to supervisor mode prior to main being called.  If you are not using one of	these demo application projects then ensure Supervisor mode is used here. */	vTaskStartScheduler();	/* We should never get here as control is now taken by the scheduler. */	for( ;; );}
开发者ID:svn2github,项目名称:freertos,代码行数:59,


示例12: main

/************************************************************************* * Please ensure to read http://www.freertos.org/portlm3sx965.html * which provides information on configuring and running this demo for the * various Luminary Micro EKs. *************************************************************************/int main( void ){	prvSetupHardware();	/* Create the queue used by the OLED task.  Messages for display on the OLED	are received via this queue. */	xOLEDQueue = xQueueCreate( mainOLED_QUEUE_SIZE, sizeof( xOLEDMessage ) );	/* Start the standard demo tasks. */    vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );    vStartInterruptQueueTasks();	vStartRecursiveMutexTasks();	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vCreateBlockTimeTasks();	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartQueuePeekTasks();	vStartQueueSetTasks();	vStartEventGroupTasks();	/* Exclude some tasks if using the kickstart version to ensure we stay within	the 32K code size limit. */	#if mainINCLUDE_WEB_SERVER != 0	{		/* Create the uIP task if running on a processor that includes a MAC and		PHY. */		if( SysCtlPeripheralPresent( SYSCTL_PERIPH_ETH ) )		{			xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );		}	}	#endif	/* Start the tasks defined within this file/specific to this demo. */	xTaskCreate( vOLEDTask, "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	/* The suicide tasks must be created last as they need to know how many	tasks were running prior to their creation in order to ascertain whether	or not the correct/expected number of tasks are running at any given time. */    vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );	/* Configure the high frequency interrupt used to measure the interrupt	jitter time. */	vSetupHighFrequencyTimer();	/* Start the scheduler. */	vTaskStartScheduler();    /* Will only get here if there was insufficient memory to create the idle    task. */	return 0;}
开发者ID:HclX,项目名称:freertos,代码行数:60,


示例13: main

int main(void){extern void HardwareSetup( void );	/* Renesas provided CPU configuration routine.  The clocks are configured in	here. */	HardwareSetup();	/* Turn all LEDs off. */	vParTestInitialise();	/* Start the reg test tasks which test the context switching mechanism. */	xTaskCreate( prvRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL );	xTaskCreate( prvRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );	/* The web server task. */	xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL );	/* Start the check task as described at the top of this file. */	xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );	/* Create the standard demo tasks. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vCreateBlockTimeTasks();	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartRecursiveMutexTasks();	vStartInterruptQueueTasks();	vStartMathTasks( mainFLOP_TASK_PRIORITY );	/* The suicide tasks must be created last as they need to know how many	tasks were running prior to their creation in order to ascertain whether	or not the correct/expected number of tasks are running at any given time. */	vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );	/* Start the tasks running. */	vTaskStartScheduler();	/* If all is well we will never reach here as the scheduler will now be	running.  If we do reach here then it is likely that there was insufficient	heap available for the idle task to be created. */	for( ;; );		return 0;}
开发者ID:vstehle,项目名称:FreeRTOS,代码行数:49,


示例14: main

int main(){#if 1	signal(SIGRTMIN+1, &handler);	raise(SIGRTMIN+1);#endif	// Start the standard demo tasks.	vStartLEDFlashTasks(mainFLASH_PRIORITY | portPRIVILEGE_BIT);#if 0	vStartBlockingQueueTasks(mainBLOCK_Q_PRIORITY);	vCreateBlockTimeTasks();	vStartGenericQueueTasks(mainGEN_QUEUE_TASK_PRIORITY);	vStartQueuePeekTasks();	vStartDynamicPriorityTasks();#endif#if 0	vStartWebserverTask();#endif#if 0	char *name = "testfile";	int len = strlen(name);	DIR *dirp = opendir("/sdcard");	struct dirent *dp;	while ((dp = readdir(dirp)) != NULL)		if (dp->d_namlen == len && !strcmp(dp->d_name, name)) {			(void)closedir(dirp);			printf("found/n");		}	(void)closedir(dirp);	printf("not_found/n");#endif#ifdef CORE_HAS_MPU	xTaskCreate(xBadTask, (signed char *)"BadTask", configMINIMAL_STACK_SIZE, (void *)NULL, tskIDLE_PRIORITY | portPRIVILEGE_BIT, NULL);#endif	xTaskCreate(simpleSerialTask, (signed char *)"Ser", configMINIMAL_STACK_SIZE, (void *)NULL, tskIDLE_PRIORITY | portPRIVILEGE_BIT, NULL);	printf("Starting scheduler./n");	fflush(stdout);	// Start the scheduler.	vTaskStartScheduler();	// Will only get here if there was insufficient memory to create the idle task.	// Wait for WDT to reset.	PowerManagement_PowerDown();}
开发者ID:Ralith,项目名称:mbed-freertos,代码行数:49,


示例15: main

/* Start all the demo application tasks, then start the scheduler. */void main(void){	/* Initialise the hardware ready for the demo. */	prvSetupHardware();	/* Start the standard demo application tasks. */	vStartLEDFlashTasks( mainLED_TASK_PRIORITY );	vStartIntegerMathTasks( tskIDLE_PRIORITY );	vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED - 1 );	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY );	vStartDynamicPriorityTasks();	vStartMathTasks( tskIDLE_PRIORITY );	vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );	vStartQueuePeekTasks();	vCreateBlockTimeTasks();	vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );	/* Start the 'Check' task which is defined in this file. */	xTaskCreate( prvErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );	/* Start the 'Register Test' tasks as described at the top of this file. */	xTaskCreate( vFirstRegisterTestTask, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( vSecondRegisterTestTask, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	/* Start the task that write trace information to the UART. */	vUtilityStartTraceTask( mainUTILITY_TASK_PRIORITY );	/* If we are going to service the watchdog from within a task, then create	the task here. */	#if WATCHDOG == WTC_IN_TASK		vStartWatchdogTask( mainWATCHDOG_TASK_PRIORITY );	#endif	/* The suicide tasks must be started last as they record the number of other	tasks that exist within the system.  The value is then used to ensure at run	time the number of tasks that exists is within expected bounds. */	vCreateSuicidalTasks( mainDEATH_PRIORITY );	/* Now start the scheduler.  Following this call the created tasks should	be executing. */	vTaskStartScheduler( );	/* vTaskStartScheduler() will only return if an error occurs while the	idle task is being created. */	for( ;; );}
开发者ID:vstehle,项目名称:FreeRTOS,代码行数:48,


示例16: main

/* * Creates the majority of the demo application tasks before starting the * scheduler. */void main(void){    TaskHandle_t xCreatedTask;    prvSetupHardware();    /* Start the reg test tasks which test the context switching mechanism. */    xTaskCreate( vRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xCreatedTask );    xPortUsesFloatingPoint( xCreatedTask );    xTaskCreate( vRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xCreatedTask );    xPortUsesFloatingPoint( xCreatedTask );    xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL );    /* Start the check task as described at the top of this file. */    xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );    /* Start the standard demo tasks.  These don't perform any particular useful    functionality, other than to demonstrate the FreeRTOS API being used. */    vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );    vCreateBlockTimeTasks();    vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );    vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );    vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );    vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );    vStartQueuePeekTasks();    vStartRecursiveMutexTasks();    /* Start the math tasks as described at the top of this file. */    vStartMathTasks( mainFLOP_TASK_PRIORITY );    /* The suicide tasks must be created last as they need to know how many    tasks were running prior to their creation in order to ascertain whether    or not the correct/expected number of tasks are running at any given time. */    vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );    /* Start the tasks running. */    vTaskStartScheduler();    /* Will only get here if there was insufficient heap memory to create the idle    task.  Increase the configTOTAL_HEAP_SIZE setting in FreeRTOSConfig.h. */    for( ;; );}
开发者ID:HclX,项目名称:freertos,代码行数:49,


示例17: main

/* Create all the demo tasks then start the scheduler. */void main( void ){	/* Just sets up the LED outputs. */	prvSetupHardware();	/* Standard demo tasks. */	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartQueuePeekTasks();		/* Create the check task as described at the top of this file. */	xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, mainCHECK_PARAMETER, mainCHECK_TASK_PRIORITY, NULL );	/* Create the RegTest tasks as described at the top of this file. */	xTaskCreate( vRegTest1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( vRegTest2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	#ifdef __IAR_V850ES_Fx3__	{		/* The extra IO required for the com test and led flashing tasks is only		available on the application board, not the target boards. */			vAltStartComTestTasks( mainCOMTEST_PRIORITY, mainBAUD_RATE, mainCOMTEST_LED );		vStartLEDFlashTasks( mainFLASH_PRIORITY );				/* The Fx3 also has enough RAM to run loads more tasks. */		vStartRecursiveMutexTasks();		vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );		vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );					}	#endif			/* The suicide tasks must be created last as they need to know how many	tasks were running prior to their creation in order to ascertain whether	or not the correct/expected number of tasks are running at any given time. */    vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );		/* Start the scheduler. */	vTaskStartScheduler();	/* If this line is reached then vTaskStartScheduler() returned because there	was insufficient heap memory remaining for the idle task to be created. */	for( ;; );}
开发者ID:jbalcerz,项目名称:Stm32Discovery_FreeRTOS,代码行数:44,


示例18: main

void main( void ){	/* Configure the NVIC, LED outputs and button inputs. */	prvSetupHardware();	/* Create the timers that are specific to this demo - other timers are	created as part of the standard demo within vStartTimerDemoTask. */	prvCreateDemoSpecificTimers();	/* Create a lot of 'standard demo' tasks.  Nearly 40 tasks are created in	this demo.  For a much simpler demo, select the 'blinky' build	configuration. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vCreateBlockTimeTasks();	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartRecursiveMutexTasks();	vStartTimerDemoTask( mainTIMER_TEST_PERIOD );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartCountingSemaphoreTasks();	vStartDynamicPriorityTasks();	/* The web server task. */	xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL );	/* The suicide tasks must be created last, as they need to know how many	tasks were running prior to their creation in order to ascertain whether	or not the correct/expected number of tasks are running at any given	time. */	vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );	/* Start the tasks and timers running. */	vTaskStartScheduler();	/* If all is well, the scheduler will now be running, and the following line	will never be reached.  If the following line does execute, then there was	insufficient FreeRTOS heap memory available for the idle and/or timer tasks	to be created.  See the memory management section on the FreeRTOS web site	for more details. */	for( ;; );}
开发者ID:Eclo,项目名称:FreeRTOS,代码行数:42,


示例19: main

void main( void ){    /* Place your initialization/startup code here (e.g. MyInst_Start()) */	prvHardwareSetup();	/* Start the standard demo tasks.  These are just here to exercise the	kernel port and provide examples of how the FreeRTOS API can be used. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vCreateBlockTimeTasks();	vStartCountingSemaphoreTasks();	vStartDynamicPriorityTasks();	vStartMathTasks( mainINTEGER_TASK_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartQueuePeekTasks();	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartLEDFlashTasks( mainFLASH_TEST_TASK_PRIORITY );	vAltStartComTestTasks( mainCOM_TEST_TASK_PRIORITY, 57600, mainCOM_LED );	vStartInterruptQueueTasks();	/* Start the error checking task. */  	( void ) xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );	/* Configure the timers used by the fast interrupt timer test. */	vSetupTimerTest();	/* The suicide tasks must be created last as they need to know how many	tasks were running prior to their creation in order to ascertain whether	or not the correct/expected number of tasks are running at any given time. */	vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );	/* Will only get here if there was insufficient memory to create the idle    task.  The idle task is created within vTaskStartScheduler(). */	vTaskStartScheduler();	/* Should never reach here as the kernel will now be running.  If	vTaskStartScheduler() does return then it is very likely that there was	insufficient (FreeRTOS) heap space available to create all the tasks,	including the idle task that is created within vTaskStartScheduler() itself. */	for( ;; );}
开发者ID:denal05,项目名称:STM32L152-EVAL,代码行数:42,


示例20: main

int main( void ){	/* Start the check task as described at the top of this file. */	xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );	/* Create the standard demo tasks. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartMathTasks( mainFLOP_TASK_PRIORITY );	vStartRecursiveMutexTasks();	/* Start the scheduler itself. */	vTaskStartScheduler();    /* Should never get here unless there was not enough heap space to create 	the idle and other system tasks. */    return 0;}
开发者ID:Dzenik,项目名称:FreeRTOS_TEST,代码行数:22,


示例21: main

int main( void ){char cIPAddress[ 16 ]; /* Enough space for "xxx.xxx.xxx.xxx/0". */	/* Configure the hardware for use by this demo. */	prvSetupHardware();	/* Start the standard demo tasks.  These are just here to exercise the	kernel port and provide examples of how the FreeRTOS API can be used. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );    vCreateBlockTimeTasks();    vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );    vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );    vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );    vStartQueuePeekTasks();    vStartRecursiveMutexTasks();	vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );    /* Create the USB task. */    xTaskCreate( vUSBTask, "USB", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );	/* Display the IP address, then create the uIP task.  The WEB server runs	in this task.  --- Due to tool changes since this demo was created the LCD	is no longer used.	LCDdriver_initialisation();	LCD_PrintString( 5, 10, "FreeRTOS.org", 14, COLOR_GREEN);	sprintf( cIPAddress, "%d.%d.%d.%d", configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3 );	LCD_PrintString( 5, 30, cIPAddress, 14, COLOR_RED);    xTaskCreate( vuIP_Task, "uIP", mainBASIC_WEB_STACK_SIZE, ( void * ) NULL, mainUIP_TASK_PRIORITY, NULL ); */    /* Start the scheduler. */	vTaskStartScheduler();    /* Will only get here if there was insufficient memory to create the idle    task.  The idle task is created within vTaskStartScheduler(). */	for( ;; );}
开发者ID:mikef5410,项目名称:FreeRTOS,代码行数:38,


示例22: main_full

int main_full( void ){	/* Start the check task as described at the top of this file. */	xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );	/* Create the standard demo tasks. */	vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );	vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartMathTasks( mainFLOP_TASK_PRIORITY );	vStartRecursiveMutexTasks();	vStartTimerDemoTask( mainTIMER_TEST_PERIOD );	vStartCountingSemaphoreTasks();	vStartDynamicPriorityTasks();	vStartQueueSetTasks();	vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY );		xTaskCreate( prvDemoQueueSpaceFunctions, ( signed char * ) "QSpace", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );	/* The suicide tasks must be created last as they need to know how many	tasks were running prior to their creation.  This then allows them to 	ascertain whether or not the correct/expected number of tasks are running at 	any given time. */	vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );	/* Create the semaphore that will be deleted in the idle task hook.  This	is done purely to test the use of vSemaphoreDelete(). */	xMutexToDelete = xSemaphoreCreateMutex();	/* Start the scheduler itself. */	vTaskStartScheduler();    /* Should never get here unless there was not enough heap space to create 	the idle and other system tasks. */    return 0;}
开发者ID:ptracton,项目名称:experimental,代码行数:38,


示例23: main_full

void main_full( void ){xTimerHandle xTimer = NULL;/* The register test tasks are asm functions that don't use a stack.  Thestack allocated just has to be large enough to hold the task context, andfor the additional required for the stack overflow checking to work (ifconfigured). */const size_t xRegTestStackSize = 25U;	/* Create the standard demo tasks */	vCreateBlockTimeTasks();	vStartDynamicPriorityTasks();	vStartCountingSemaphoreTasks();	vStartRecursiveMutexTasks();	vStartQueueOverwriteTask( tskIDLE_PRIORITY );	vStartQueueSetTasks();	vStartGenericQueueTasks( tskIDLE_PRIORITY );	vStartQueuePeekTasks();		/* Start the task that manages the command console for FreeRTOS+CLI. */	vUARTCommandConsoleStart( ( configMINIMAL_STACK_SIZE * 3 ), tskIDLE_PRIORITY );		/* Create the register test tasks as described at the top of this file.	These are naked functions that don't use any stack.  A stack still has	to be allocated to hold the task context. */	xTaskCreate( 	vRegTest1Task,			/* Function that implements the task. */					( signed char * ) "Reg1", /* Text name of the task. */					xRegTestStackSize,		/* Stack allocated to the task. */					NULL, 					/* The task parameter is not used. */					tskIDLE_PRIORITY, 		/* The priority to assign to the task. */					NULL );					/* Don't receive a handle back, it is not needed. */	xTaskCreate( 	vRegTest2Task,			/* Function that implements the task. */					( signed char * ) "Reg2", /* Text name of the task. */					xRegTestStackSize,		/* Stack allocated to the task. */					NULL, 					/* The task parameter is not used. */					tskIDLE_PRIORITY, 		/* The priority to assign to the task. */					NULL );					/* Don't receive a handle back, it is not needed. */	/* Create the software timer that performs the 'check' functionality,	as described at the top of this file. */	xTimer = xTimerCreate( 	( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */							( mainCHECK_TIMER_PERIOD_MS ),		/* The timer period, in this case 3000ms (3s). */							pdTRUE,								/* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */							( void * ) 0,						/* The ID is not used, so can be set to anything. */							prvCheckTimerCallback				/* The callback function that inspects the status of all the other tasks. */					  	);	/* If the software timer was created successfully, start it.  It won't	actually start running until the scheduler starts.  A block time of	zero is used in this call, although any value could be used as the block	time will be ignored because the scheduler has not started yet. */	configASSERT( xTimer );	if( xTimer != NULL )	{		xTimerStart( xTimer, mainDONT_BLOCK );	}	/* Start the kernel.  From here on, only tasks and interrupts will run. */	vTaskStartScheduler();	/* If all is well, the scheduler will now be running, and the following	line will never be reached.  If the following line does execute, then there	was	insufficient FreeRTOS heap memory available for the idle and/or timer	tasks to be created.  See the memory management section on the FreeRTOS web	site, or the FreeRTOS tutorial books for more details. */	for( ;; );}
开发者ID:BirdBare,项目名称:STM32F4-Discovery_FW_V1.1.0_Makefiles,代码行数:69,


示例24: main_full

int main_full( void ){	/* Usage instructions on http://www.FreeRTOS.org/Atmel_SAM4E_RTOS_Demo.html */	/* Initialise the LCD and output a bitmap.  The IP address will also be	displayed on the LCD when it has been obtained. */	vInitialiseLCD();	/* If the file system is only going to be accessed from one task then	F_FS_THREAD_AWARE can be set to 0 and the set of example files are created	before the RTOS scheduler is started.  If the file system is going to be	access from more than one task then F_FS_THREAD_AWARE must be set to 1 and	the	set of sample files are created from the idle task hook function	vApplicationIdleHook(). */	#if( F_FS_THREAD_AWARE == 0 )	{		/* Initialise the drive and file system, then create a few example		files.  The files can be viewed and accessed via the CLI.  View the		documentation page for this demo (link at the top of this file) for more		information. */		vCreateAndVerifySampleFiles();	}	#endif	/* Register example generic, file system related and UDP related CLI	commands respectively.  Type 'help' into the command console to view a list	of registered commands. */	vRegisterSampleCLICommands();	vRegisterFileSystemCLICommands();	vRegisterUDPCLICommands();	/* Initialise the network interface.  Tasks that use the network are	created in the network event hook when the network is connected and ready	for use.  The address values passed in here are used if ipconfigUSE_DHCP is	set to 0, or if ipconfigUSE_DHCP is set to 1 but a DHCP server cannot be	contacted.  The IP address actually used is displayed on the LCD (after DHCP	has completed if DHCP is used). */	FreeRTOS_IPInit( ucIPAddress, ucNetMask, ucGatewayAddress, ucDNSServerAddress, ucMACAddress );	/* Create all the other standard demo tasks. */		vCreateBlockTimeTasks();	vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );	vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );	vStartQueuePeekTasks();	vStartCountingSemaphoreTasks();	vStartDynamicPriorityTasks();	vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );	vStartQueueSetTasks();	vStartRecursiveMutexTasks();	vStartEventGroupTasks();	vStartTaskNotifyTask();	vStartInterruptSemaphoreTasks();	vStartTimerDemoTask( mainTIMER_TEST_PERIOD );	vStartInterruptQueueTasks();	/* Create the register check tasks, as described at the top of this	file */	xTaskCreate( prvRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );	xTaskCreate( prvRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );	/* Start the scheduler itself. */	vTaskStartScheduler();	/* If all is well, the scheduler will now be running, and the following line	will never be reached.  If the following line does execute, then there was	insufficient FreeRTOS heap memory available for the idle and/or timer tasks	to be created.  See the memory management section on the FreeRTOS web site	for more details. */	for( ;; );}
开发者ID:BuiChien,项目名称:FreeRTOS-TM4C123GXL,代码行数:70,


示例25: main

int main(void){	/* Configure the NVIC, LED outputs and button inputs. */	prvSetupHardware();	/* Create the queue. */	xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );	if( xQueue != NULL )	{		/* Start the three application specific demo tasks, as described in the		comments at the top of this	file. */		xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL );		xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );		xTaskCreate( prvOLEDTask, "OLED", configMINIMAL_STACK_SIZE, NULL, mainOLED_TASK_PRIORITY, NULL );		/* Create the software timer that is responsible for turning off the LED		if the button is not pushed within 5000ms, as described at the top of		this file. */		xLEDTimer = xTimerCreate( 	"LEDTimer", 					/* A text name, purely to help debugging. */									( mainLED_TIMER_PERIOD_MS ),	/* The timer period, in this case 5000ms (5s). */									pdFALSE,						/* This is a one shot timer, so xAutoReload is set to pdFALSE. */									( void * ) 0,					/* The ID is not used, so can be set to anything. */									prvLEDTimerCallback				/* The callback function that switches the LED off. */								);		/* Create the software timer that performs the 'check' functionality,		as described at the top of this file. */		xCheckTimer = xTimerCreate( "CheckTimer",					/* A text name, purely to help debugging. */									( mainCHECK_TIMER_PERIOD_MS ),	/* The timer period, in this case 3000ms (3s). */									pdTRUE,							/* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */									( void * ) 0,					/* The ID is not used, so can be set to anything. */									prvCheckTimerCallback			/* The callback function that inspects the status of all the other tasks. */								  );		/* Create a lot of 'standard demo' tasks. */		vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );		vCreateBlockTimeTasks();		vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );		vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );		vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );		vStartQueuePeekTasks();		vStartRecursiveMutexTasks();		vStartTimerDemoTask( mainTIMER_TEST_PERIOD );		/* Create the web server task. */		xTaskCreate( vuIP_Task, "uIP", mainuIP_STACK_SIZE, NULL, mainuIP_TASK_PRIORITY, NULL );				/* The suicide tasks must be created last, as they need to know how many		tasks were running prior to their creation in order to ascertain whether		or not the correct/expected number of tasks are running at any given		time. */		vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );		/* Start the tasks and timer running. */		vTaskStartScheduler();	}	/* If all is well, the scheduler will now be running, and the following line	will never be reached.  If the following line does execute, then there was	insufficient FreeRTOS heap memory available for the idle and/or timer tasks	to be created.  See the memory management section on the FreeRTOS web site	for more details. */	for( ;; );}
开发者ID:granthuu,项目名称:fsm_software,代码行数:65,



注:本文中的vStartQueuePeekTasks函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vStartSemaphoreTasks函数代码示例
C++ vStartPolledQueueTasks函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。