]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c
Update the demo directory to use the version 8 type naming conventions.
[freertos] / FreeRTOS / Demo / CORTEX_A2F200_IAR_and_Keil / main-blinky.c
index cd3cfae11af07b52f2a55bd9d182cf2edaec4ce1..e3e9af187b547f2e7df458cddc2946b821211ded 100644 (file)
 #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
@@ -160,16 +160,16 @@ static void prvQueueSendTask( void *pvParameters );
  * The LED timer callback function.  This does nothing but switch off the\r
  * LED defined by the mainTIMER_CONTROLLED_LED constant.\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
-static xTimerHandle xLEDTimer = NULL;\r
+static TimerHandle_t xLEDTimer = NULL;\r
 \r
 /* Maintains the current LED output state. */\r
 static volatile unsigned long ulGPIOState = 0UL;\r
@@ -195,7 +195,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
@@ -214,7 +214,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
@@ -256,7 +256,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
@@ -355,7 +355,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