/*\r
- FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+ FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.\r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+ Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
\r
- ***************************************************************************\r
+ ***************************************************************************\r
>>! NOTE: The modification to the GPL is included to allow you to !<<\r
>>! distribute a combined work that includes FreeRTOS without being !<<\r
>>! obliged to provide the source code for proprietary components !<<\r
>>! outside of the FreeRTOS kernel. !<<\r
- ***************************************************************************\r
+ ***************************************************************************\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
***************************************************************************\r
\r
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading\r
- the FAQ page "My application does not run, what could be wrong?". Have you\r
- defined configASSERT()?\r
+ the FAQ page "My application does not run, what could be wrong?". Have you\r
+ defined configASSERT()?\r
\r
- http://www.FreeRTOS.org/support - In return for receiving this top quality\r
- embedded software for free we request you assist our global community by\r
- participating in the support forum.\r
+ http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+ embedded software for free we request you assist our global community by\r
+ participating in the support forum.\r
\r
- http://www.FreeRTOS.org/training - Investing in training allows your team to\r
- be as productive as possible as early as possible. Now you can receive\r
- FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
- Ltd, and the world's leading authority on the world's leading RTOS.\r
+ http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+ be as productive as possible as early as possible. Now you can receive\r
+ FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+ Ltd, and the world's leading authority on the world's leading RTOS.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
\r
\r
/******************************************************************************\r
- * NOTE 1: This project provides two demo applications. A simple blinky\r
- * style project, and a more comprehensive test and demo application. The\r
- * mainCREATE_SIMPLY_BLINKY_DEMO_ONLY setting in main.c is used to select\r
- * between the two. See the notes on using mainCREATE_SIMPLY_BLINKY_DEMO_ONLY\r
+ * NOTE 1: This project provides three demo applications. A simple blinky\r
+ * style project, a more comprehensive test and demo application, and an\r
+ * lwIP example. The mainSELECTED_APPLICATION setting in main.c is used to\r
+ * select between the three. See the notes on using mainSELECTED_APPLICATION\r
* in main.c. This file implements the comprehensive version.\r
*\r
* NOTE 2: This file only contains the source code that is specific to the\r
#include "partest.h"\r
#include "serial.h"\r
#include "TimerDemo.h"\r
-#include "IntQueue.h"\r
#include "EventGroupsDemo.h"\r
#include "TaskNotify.h"\r
#include "IntSemTest.h"\r
/* The priority used by the UART command console task. */\r
#define mainUART_COMMAND_CONSOLE_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )\r
\r
-/* The LED used by the check timer. */\r
+/* The LED used by the check task. */\r
#define mainCHECK_LED ( 7 )\r
\r
\r
/* A block time of zero simply means "don't block". */\r
#define mainDONT_BLOCK ( 0UL )\r
\r
-/* The period after which the check timer will expire, in ms, provided no errors\r
-have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+/* The period of the check task, in ms, provided no errors have been reported by\r
+any of the standard demo tasks. ms are converted to the equivalent in ticks\r
+using the pdMS_TO_TICKS() macro constant. */\r
#define mainNO_ERROR_CHECK_TASK_PERIOD ( pdMS_TO_TICKS( 3000UL ) )\r
\r
-/* The period at which the check timer will expire, in ms, if an error has been\r
-reported in one of the standard demo tasks. ms are converted to the equivalent\r
-in ticks using the portTICK_PERIOD_MS constant. */\r
+/* The period of the check task, in ms, if an error has been reported in one of\r
+the standard demo tasks. ms are converted to the equivalent in ticks using the\r
+pdMS_TO_TICKS() macro. */\r
#define mainERROR_CHECK_TASK_PERIOD ( pdMS_TO_TICKS( 200UL ) )\r
\r
/* Parameters that are passed into the register check tasks solely for the\r
\r
/* The following two variables are used to communicate the status of the\r
register check tasks to the check task. If the variables keep incrementing,\r
-then the register check tasks has not discovered any errors. If a variable\r
+then the register check tasks have not discovered any errors. If a variable\r
stops incrementing, then an error has been found. */\r
volatile unsigned long ulRegTest1LoopCounter = 0UL, ulRegTest2LoopCounter = 0UL;\r
\r
\r
void main_full( void )\r
{\r
- /* Start all the other standard demo/test tasks. They have not particular\r
+ /* Start all the other standard demo/test tasks. They have no particular\r
functionality, but do demonstrate how to use the FreeRTOS API and test the\r
kernel port. */\r
-// vStartInterruptQueueTasks();\r
-\r
vStartDynamicPriorityTasks();\r
vCreateBlockTimeTasks();\r
vStartCountingSemaphoreTasks();\r
\r
/* If all is well, the scheduler will now be running, and the following\r
line will never be reached. If the following line does execute, then\r
- there was either insufficient FreeRTOS heap memory available for the idle\r
- and/or timer tasks to be created, or vTaskStartScheduler() was called from\r
- User mode. See the memory management section on the FreeRTOS web site for\r
- more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The\r
- mode from which main() is called is set in the C start up code and must be\r
- a privileged mode (not user mode). */\r
+ there was insufficient FreeRTOS heap memory available for the Idle and/or\r
+ timer tasks to be created. See the memory management section on the\r
+ FreeRTOS web site for more details on the FreeRTOS heap\r
+ http://www.freertos.org/a00111.html. */\r
for( ;; );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* Check all the demo tasks (other than the flash tasks) to ensure\r
that they are all still running, and that none have detected an error. */\r
-if( 0 )// if( xAreIntQueueTasksStillRunning() != pdTRUE )\r
- {\r
- ulErrorFound |= 1UL << 0UL;\r
- }\r
-\r
if( xAreMathsTaskStillRunning() != pdTRUE )\r
{\r
ulErrorFound |= 1UL << 1UL;\r
ulErrorFound |= 1UL << 8UL;\r
}\r
\r
- if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
- {\r
- ulErrorFound |= 1UL << 10UL;\r
- }\r
-\r
- if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )\r
+ if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
{\r
- ulErrorFound |= 1UL << 14UL;\r
+ ulErrorFound |= 1UL << 9UL;\r
}\r
\r
- if( xAreTimerDemoTasksStillRunning( ( TickType_t ) mainNO_ERROR_CHECK_TASK_PERIOD ) != pdPASS )\r
+ if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
{\r
- ulErrorFound |= 1UL << 9UL;\r
+ ulErrorFound |= 1UL << 10UL;\r
}\r
\r
if( xAreEventGroupTasksStillRunning() != pdPASS )\r
ulErrorFound |= 1UL << 13UL;\r
}\r
\r
+ if( xAreInterruptSemaphoreTasksStillRunning() != pdTRUE )\r
+ {\r
+ ulErrorFound |= 1UL << 14UL;\r
+ }\r
+\r
/* Check that the register test 1 task is still running. */\r
if( ulLastRegTest1Value == ulRegTest1LoopCounter )\r
{\r
{\r
/* An error has been detected in one of the tasks - flash the LED\r
at a higher frequency to give visible feedback that something has\r
- gone wrong (it might just be that the loop back connector required\r
- by the comtest tasks has not been fitted). */\r
+ gone wrong. */\r
xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;\r
}\r
}\r
}\r
\r
/* The following line will only execute if the task parameter is found to\r
- be incorrect. The check timer will detect that the regtest loop counter is\r
+ be incorrect. The check task will detect that the regtest loop counter is\r
not being incremented and flag an error. */\r
vTaskDelete( NULL );\r
}\r
}\r
\r
/* The following line will only execute if the task parameter is found to\r
- be incorrect. The check timer will detect that the regtest loop counter is\r
+ be incorrect. The check task will detect that the regtest loop counter is\r
not being incremented and flag an error. */\r
vTaskDelete( NULL );\r
}\r