]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_STM32F100_Atollic/Simple_Demo_Source/main.c
Update the demo directory to use the version 8 type naming conventions.
[freertos] / FreeRTOS / Demo / CORTEX_STM32F100_Atollic / Simple_Demo_Source / main.c
index aa03b12c694962cefe848fc8975e3e7998aa4a30..eae2b6cb726aca1bd110f9cad15bad5eb4b91544 100644 (file)
@@ -130,8 +130,8 @@ remain on until a full five seconds pass without the button being pressed.
 #define        mainQUEUE_SEND_TASK_PRIORITY            ( tskIDLE_PRIORITY + 1 )\r
 \r
 /* The rate at which data is sent to the queue, specified in milliseconds, and\r
-converted to ticks using the portTICK_RATE_MS constant. */\r
-#define mainQUEUE_SEND_FREQUENCY_MS                    ( 200 / portTICK_RATE_MS )\r
+converted 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
@@ -155,17 +155,17 @@ static void prvQueueSendTask( void *pvParameters );
  * The LED timer callback function.  This does nothing but switch the red LED\r
  * off.\r
  */\r
-static void vLEDTimerCallback( xTimerHandle xTimer );\r
+static void vLEDTimerCallback( TimerHandle_t xTimer );\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 /* The queue used by both tasks. */\r
-static xQueueHandle xQueue = NULL;\r
+static QueueHandle_t xQueue = NULL;\r
 \r
 /* The LED software timer.  This uses vLEDTimerCallback() as its callback\r
  * function.\r
  */\r
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -188,7 +188,7 @@ int main(void)
                if the button is not pushed within 5000ms, as described at the top of\r
                this file. */\r
                xLEDTimer = xTimerCreate(       "LEDTimer",                             /* A text name, purely to help debugging. */\r
-                                                                       ( 5000 / portTICK_RATE_MS ),/* The timer period, in this case 5000ms (5s). */\r
+                                                                       ( 5000 / portTICK_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */\r
                                                                        pdFALSE,                                        /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
                                                                        ( void * ) 0,                           /* The ID is not used, so can be set to anything. */\r
                                                                        vLEDTimerCallback                       /* The callback function that switches the LED off. */\r
@@ -207,7 +207,7 @@ int main(void)
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void vLEDTimerCallback( xTimerHandle xTimer )\r
+static void vLEDTimerCallback( TimerHandle_t xTimer )\r
 {\r
        /* The timer has expired - so no button pushes have occurred in the last\r
        five seconds - turn the LED off.  NOTE - accessing the LED port should use\r
@@ -247,7 +247,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
 \r
 static void prvQueueSendTask( void *pvParameters )\r
 {\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
 const unsigned long ulValueToSend = 100UL;\r
 \r
        /* Initialise xNextWakeTime - this only needs to be done once. */\r
@@ -323,7 +323,7 @@ void vApplicationMallocFailedHook( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
 {\r
        ( void ) pcTaskName;\r
        ( void ) pxTask;\r