/* * 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( ;; ); }
int main(void) { /* Configure the hardware ready to run the test. */ prvSetupHardware(); xTaskCreate( vWebTask, ( signed portCHAR * ) "Web", TCPIP_THREAD_STACKSIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); #ifdef CHECK_TEST xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", mainCHECK_TASK_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); #endif //vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartQueueSetTasks(); printf("FreeRTOS is starting ...\n"); /* 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( ;; ); }
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; }
/************************************************************************* * 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; }
void main_full( void ) { xTimerHandle xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartLEDFlashTimers( mainNUMBER_OF_FLASH_TIMERS_LEDS ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartQueueSetTasks(); /* Create the software timer that performs the 'check' functionality, as described at the top of this file. */ xCheckTimer = 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( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); } /* The set of tasks created by the following function call have to be created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* 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( ;; ); }
void main_full( void ) { TimerHandle_t xCheckTimer = NULL; /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartQueueSetTasks(); vStartQueueOverwriteTask( tskIDLE_PRIORITY ); vStartDynamicPriorityTasks(); vCreateBlockTimeTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL ); /* 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. */ ); if( xCheckTimer != NULL ) { xTimerStart( xCheckTimer, mainDONT_BLOCK ); } /* 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( ;; ) { __asm volatile( "NOP" ); } }
void main_full( void ) { /* Start all the other standard demo/test tasks. They have no particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartInterruptQueueTasks(); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartMathTasks( mainFLOP_TASK_PRIORITY ); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_PRIORITY ); vStartEventGroupTasks(); vStartInterruptSemaphoreTasks(); vStartQueueSetTasks(); vStartTaskNotifyTask(); /* Create the register check tasks, as described at the top of this file */ xTaskCreate( prvRegTestTaskEntry1, "Reg1", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_1_PARAMETER, tskIDLE_PRIORITY, NULL ); xTaskCreate( prvRegTestTaskEntry2, "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_TASK_2_PARAMETER, tskIDLE_PRIORITY, NULL ); /* Create the task that performs the 'check' functionality, as described at the top of this file. */ xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); /* The set of tasks created by the following function call have to be created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* 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 either insufficient FreeRTOS heap memory available for the idle and/or timer tasks to be created, or vTaskStartScheduler() was called from User mode. See the memory management section on the FreeRTOS web site for more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The mode from which main() is called is set in the C start up code and must be a privileged mode (not user mode). */ for( ;; ); }
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; }
void main_full( void ) { /* Start all the other standard demo/test tasks. The have not particular functionality, but do demonstrate how to use the FreeRTOS API and test the kernel port. */ vStartInterruptQueueTasks(); vStartIntegerMathTasks( tskIDLE_PRIORITY ); vStartDynamicPriorityTasks(); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); vCreateBlockTimeTasks(); vStartCountingSemaphoreTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED ); vStartQueueSetTasks(); vStartTaskNotifyTask(); vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); vStartEventGroupTasks(); vStartInterruptSemaphoreTasks(); /* The set of tasks created by the following function call have to be created last as they keep account of the number of tasks they expect to see running. */ vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY ); /* 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( ;; ); }
void main_full( void ) { xTimerHandle xTimer = NULL; /* The register test tasks are asm functions that don't use a stack. The stack allocated just has to be large enough to hold the task context, and for the additional required for the stack overflow checking to work (if configured). */ 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( ;; ); }
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( ;; ); }
int main_full( void ) { TimerHandle_t xTimer = NULL; /* 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. */ vStartLEDFlashTimers( mainNUM_FLASH_TIMER_LEDS ); vCreateBlockTimeTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY ); vStartQueuePeekTasks(); vStartCountingSemaphoreTasks(); vStartDynamicPriorityTasks(); vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY ); vStartQueueSetTasks(); vStartRecursiveMutexTasks(); vStartEventGroupTasks(); /* 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 ); } /* 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( ;; ); }