]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/PollQ.c
Test the RTC and BURTC tickless implementations on the Gecko parts, and make correct...
[freertos] / FreeRTOS / Demo / Common / Minimal / PollQ.c
index 699b37fd45183fa13c30eb32bdacb6bd32eaaa85..67ed1f3a5d16f51a613b405e2106b597b4c8d7b2 100644 (file)
@@ -109,7 +109,7 @@ Changes from V2.0.0
 \r
 #define pollqSTACK_SIZE                        configMINIMAL_STACK_SIZE\r
 #define pollqQUEUE_SIZE                        ( 10 )\r
-#define pollqPRODUCER_DELAY            ( ( TickType_t ) 200 / portTICK_PERIOD_MS )\r
+#define pollqPRODUCER_DELAY            ( pdMS_TO_TICKS( ( TickType_t ) 200 ) )\r
 #define pollqCONSUMER_DELAY            ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) )\r
 #define pollqNO_DELAY                  ( ( TickType_t ) 0 )\r
 #define pollqVALUES_TO_PRODUCE ( ( BaseType_t ) 3 )\r
@@ -135,10 +135,10 @@ static QueueHandle_t xPolledQueue;
        xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( UBaseType_t ) sizeof( uint16_t ) );\r
 \r
        /* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
-       in use.  The queue registry is provided as a means for kernel aware \r
+       in use.  The queue registry is provided as a means for kernel aware\r
        debuggers to locate queues and has no purpose if a kernel aware debugger\r
        is not being used.  The call to vQueueAddToRegistry() will be removed\r
-       by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is \r
+       by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is\r
        defined to be less than 1. */\r
        vQueueAddToRegistry( xPolledQueue, "Poll_Test_Queue" );\r
 \r
@@ -154,7 +154,7 @@ uint16_t usValue = ( uint16_t ) 0;
 BaseType_t xError = pdFALSE, xLoop;\r
 \r
        for( ;; )\r
-       {               \r
+       {\r
                for( xLoop = 0; xLoop < pollqVALUES_TO_PRODUCE; xLoop++ )\r
                {\r
                        /* Send an incrementing number on the queue without blocking. */\r
@@ -193,7 +193,7 @@ uint16_t usData, usExpectedValue = ( uint16_t ) 0;
 BaseType_t xError = pdFALSE;\r
 \r
        for( ;; )\r
-       {               \r
+       {\r
                /* Loop until the queue is empty. */\r
                while( uxQueueMessagesWaiting( *( ( QueueHandle_t * ) pvParameters ) ) )\r
                {\r