]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_blinky.c
Update version number to V8.0.0 (without the release candidate number).
[freertos] / FreeRTOS / Demo / CORTEX_M4_ATSAM4E_Atmel_Studio / src / main_blinky.c
index c49f9a9e1983b63a27ad708095e9d97284553ff8..9b8d76458a2305926dab555bbc0625af6d334a9e 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.0.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
 #define        mainQUEUE_SEND_TASK_PRIORITY            ( tskIDLE_PRIORITY + 1 )\r
 \r
 /* The rate at which data is sent to the queue.  The 200ms value is converted\r
-to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS                    ( 200 / portTICK_RATE_MS )\r
+to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS                    ( 200 / portTICK_PERIOD_MS )\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
@@ -117,8 +117,8 @@ the queue empty. */
 #define mainQUEUE_LENGTH                                       ( 1 )\r
 \r
 /* The period of the blinky software timer.  The period is specified in ms and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainBLINKY_TIMER_PERIOD                                ( 50 / portTICK_RATE_MS )\r
+converted to ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainBLINKY_TIMER_PERIOD                                ( 50 / portTICK_PERIOD_MS )\r
 \r
 /* A block time of zero simply means "don't block". */\r
 #define mainDONT_BLOCK                                         ( 0 )\r
@@ -139,7 +139,7 @@ static void prvQueueSendTask( void *pvParameters );
  * The callback function for the blinky software timer, as described at the top\r
  * of this file.\r
  */\r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer );\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer );\r
 \r
 /*\r
  * Called by main() to create the simply blinky style application if\r
@@ -151,8 +151,8 @@ void main_blinky( void );
 \r
 void main_blinky( void )\r
 {\r
-xTimerHandle xTimer;\r
-xQueueHandle xQueue;\r
+TimerHandle_t xTimer;\r
+QueueHandle_t xQueue;\r
 \r
        /* Create the queue. */\r
        xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );\r
@@ -161,22 +161,22 @@ xQueueHandle xQueue;
        {\r
                /* Start the two tasks as described in the comments at the top of this\r
                file. */\r
-               xTaskCreate( prvQueueReceiveTask,                                       /* The function that implements the task. */\r
-                                       ( signed char * ) "Rx",                                 /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
-                                       configMINIMAL_STACK_SIZE,                               /* The size of the stack to allocate to the task. */\r
-                                       ( void * ) xQueue,                                              /* Pass the queue into the task using the task parameter. */\r
-                                       mainQUEUE_RECEIVE_TASK_PRIORITY,                /* The priority assigned to the task. */\r
-                                       NULL );                                                                 /* The task handle is not required, so NULL is passed. */\r
+               xTaskCreate( prvQueueReceiveTask,                               /* The function that implements the task. */\r
+                                       "Rx",                                                           /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
+                                       configMINIMAL_STACK_SIZE,                       /* The size of the stack to allocate to the task. */\r
+                                       ( void * ) xQueue,                                      /* Pass the queue into the task using the task parameter. */\r
+                                       mainQUEUE_RECEIVE_TASK_PRIORITY,        /* The priority assigned to the task. */\r
+                                       NULL );                                                         /* The task handle is not required, so NULL is passed. */\r
 \r
-               xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) xQueue, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
+               xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) xQueue, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
 \r
                /* Create the blinky software timer as described at the top of this\r
                file. */\r
-               xTimer = xTimerCreate(  ( const signed char * ) "Blinky",/* A text name, purely to help debugging. */\r
-                                                               ( mainBLINKY_TIMER_PERIOD ),    /* The timer period. */\r
-                                                               pdTRUE,                                                 /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
-                                                               ( void * ) 0,                                   /* The ID is not used, so can be set to anything. */\r
-                                                               prvBlinkyTimerCallback );               /* The callback function that inspects the status of all the other tasks. */\r
+               xTimer = xTimerCreate(  "Blinky",                                       /* A text name, purely to help debugging. */\r
+                                                               ( mainBLINKY_TIMER_PERIOD ),/* The timer period. */\r
+                                                               pdTRUE,                                         /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+                                                               ( void * ) 0,                           /* The ID is not used, so can be set to anything. */\r
+                                                               prvBlinkyTimerCallback );       /* The callback function that inspects the status of all the other tasks. */\r
 \r
                configASSERT( xTimer );\r
 \r
@@ -200,12 +200,12 @@ xQueueHandle xQueue;
 \r
 static void prvQueueSendTask( void *pvParameters )\r
 {\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
 const unsigned long ulValueToSend = 100UL;\r
-xQueueHandle xQueue;\r
+QueueHandle_t xQueue;\r
 \r
        /* The handle of the queue is passed in using the task's parameter. */\r
-       xQueue = ( xQueueHandle ) pvParameters;\r
+       xQueue = ( QueueHandle_t ) pvParameters;\r
 \r
        /* Initialise xNextWakeTime - this only needs to be done once. */\r
        xNextWakeTime = xTaskGetTickCount();\r
@@ -230,10 +230,10 @@ xQueueHandle xQueue;
 static void prvQueueReceiveTask( void *pvParameters )\r
 {\r
 unsigned long ulReceivedValue;\r
-xQueueHandle xQueue;\r
+QueueHandle_t xQueue;\r
 \r
        /* The queue is passed in as the task's parameter. */\r
-       xQueue = ( xQueueHandle ) pvParameters;\r
+       xQueue = ( QueueHandle_t ) pvParameters;\r
 \r
        for( ;; )\r
        {\r
@@ -253,7 +253,7 @@ xQueueHandle xQueue;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvBlinkyTimerCallback( xTimerHandle xTimer )\r
+static void prvBlinkyTimerCallback( TimerHandle_t xTimer )\r
 {\r
        /* Avoid compiler warnings. */\r
        ( void ) xTimer;\r