-#include "queue.h"\r
-\r
-/* Standard demo includes. */\r
-#include "BlockQ.h"\r
-#include "integer.h"\r
-#include "semtest.h"\r
-#include "PollQ.h"\r
-#include "GenQTest.h"\r
-#include "QPeek.h"\r
-#include "recmutex.h"\r
-#include "flop.h"\r
-\r
-/* Priorities at which the tasks are created. */\r
-#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )\r
-#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
-#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
-#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
-#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )\r
-#define mainFLASH_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
-#define mainuIP_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
-#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
-#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
-#define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
-\r
-/* Task function prototypes. */\r
-static void prvCheckTask( void *pvParameters );\r
+\r
+/* This project provides two demo applications. A simple blinky style project,\r
+and a more comprehensive test and demo application. The\r
+mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is used to select between the two. \r
+The simply blinky demo is implemented and described in main_blinky.c. The more \r
+comprehensive test and demo application is implemented and described in \r
+main_full.c. */\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1\r
+\r
+/*\r
+ * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
+ */\r
+extern void main_blinky( void );\r
+extern void main_full( void );\r
+\r
+/* Some of the RTOS hook (callback) functions only need special processing when\r
+the full demo is being used. The simply blinky demo has no special requirements,\r
+so these functions are called from the hook functions defined in this file, but\r
+are defined in main_full.c. */\r
+void vFullDemoTickHookFunction( void );\r
+void vFullDemoIdleFunction( void );\r
+\r
+/* Prototypes for the standard FreeRTOS callback/hook functions implemented\r
+within this file. */\r
+void vApplicationMallocFailedHook( void );\r
+void vApplicationIdleHook( void );\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName );\r
+void vApplicationTickHook( void );\r
+\r
+/*\r
+ * Writes trace data to a disk file when the trace recording is stopped.\r
+ * This function will simply overwrite any trace files that already exist.\r
+ */\r
+static void prvSaveTraceFile( void );\r
+\r
+/* The user trace event posted to the trace recording on each tick interrupt.\r
+Note tick events will not appear in the trace recording with regular period\r
+because this project runs in a Windows simulator, and does not therefore\r
+exhibit deterministic behaviour. */\r
+traceLabel xTickTraceUserEvent;\r
+static portBASE_TYPE xTraceRunning = pdTRUE;\r