]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/WIN32-MSVC/main_blinky.c
***IMMINENT RELEASE NOTICE***
[freertos] / FreeRTOS / Demo / WIN32-MSVC / main_blinky.c
index 246e7b9f5a1b5c643280bcc99e8ef25ab0bed9e3..918c832559564ea897808d5197a3be27859d82ac 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+    FreeRTOS V8.1.0 - Copyright (C) 2014 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
 /* The rate at which data is sent to the queue.  The 200ms value is converted\r
 to ticks using the portTICK_PERIOD_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS                    ( 200 / portTICK_PERIOD_MS )\r
+#define mainQUEUE_SEND_FREQUENCY_MS                    ( 200 )\r
 \r
 /* The number of items the queue can hold.  This is 1 as the receive task\r
 will remove items as they are added, meaning the send task should always find\r
@@ -190,6 +190,7 @@ static void prvQueueSendTask( void *pvParameters )
 {\r
 TickType_t xNextWakeTime;\r
 const unsigned long ulValueToSend = 100UL;\r
+const TickType_t xBlockTime = pdMS_TO_TICKS( mainQUEUE_SEND_FREQUENCY_MS );\r
 \r
        /* Remove compiler warning in the case that configASSERT() is not\r
        defined. */\r
@@ -207,7 +208,7 @@ const unsigned long ulValueToSend = 100UL;
                The block time is specified in ticks, the constant used converts ticks\r
                to ms.  While in the Blocked state this task will not consume any CPU\r
                time. */\r
-               vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );\r
+               vTaskDelayUntil( &xNextWakeTime, xBlockTime );\r
 \r
                /* Send to the queue - causing the queue receive task to unblock and\r
                toggle the LED.  0 is used as the block time so the sending operation\r