From: richardbarry Date: Wed, 9 Feb 2011 19:30:44 +0000 (+0000) Subject: Add the timer demo/test task creating to the WIN32-MSVC/main.c file. X-Git-Tag: V7.0.0~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1fc88f10ff7d3969afda8d07877169f54c659ee9;p=freertos Add the timer demo/test task creating to the WIN32-MSVC/main.c file. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1288 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/WIN32-MSVC/main.c b/Demo/WIN32-MSVC/main.c index e9fe4bf47..4ce366beb 100644 --- a/Demo/WIN32-MSVC/main.c +++ b/Demo/WIN32-MSVC/main.c @@ -96,6 +96,7 @@ #include "QPeek.h" #include "recmutex.h" #include "flop.h" +#include "TimerDemo.h" /* Priorities at which the tasks are created. */ #define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) @@ -109,6 +110,8 @@ #define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY ) #define mainFLOP_TASK_PRIORITY ( tskIDLE_PRIORITY ) +#define mainTIMER_FREQUENCY ( configTICK_RATE_HZ ) + /* Task function prototypes. */ static void prvCheckTask( void *pvParameters ); @@ -128,6 +131,7 @@ int main( void ) vStartQueuePeekTasks(); vStartMathTasks( mainFLOP_TASK_PRIORITY ); vStartRecursiveMutexTasks(); + vStartTimerDemoTask( mainTIMER_FREQUENCY ); /* Start the scheduler itself. */ vTaskStartScheduler(); @@ -156,7 +160,11 @@ char *pcStatusMessage = "OK"; vTaskDelayUntil( &xNextWakeTime, xCycleFrequency ); /* Check the standard demo tasks are running without error. */ - if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) + if( xAreTimerDemoTasksStillRunning() != pdTRUE ) + { + pcStatusMessage = "Error: TimerDemo"; + } + else if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) { pcStatusMessage = "Error: IntMath"; }