]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/RX200_RX210-RSK_Renesas/RTOSDemo/ButtonAndLCD.c
Update the demo directory to use the version 8 type naming conventions.
[freertos] / FreeRTOS / Demo / RX200_RX210-RSK_Renesas / RTOSDemo / ButtonAndLCD.c
index 90e8a1f86a0267842418113977818492e6821b3f..704f2875129d194c07dbfc8531500ca96feaab4b 100644 (file)
@@ -92,7 +92,7 @@ display. */
 \r
 /* Defines the minimum time that must pass between consecutive button presses\r
 to accept a button press as a unique press rather than just a bounce. */\r
-#define lcdMIN_TIME_BETWEEN_INTERRUPTS_MS ( 125UL / portTICK_RATE_MS )\r
+#define lcdMIN_TIME_BETWEEN_INTERRUPTS_MS ( 125UL / portTICK_PERIOD_MS )\r
 \r
 /* Button interrupt handlers. */\r
 #pragma interrupt ( prvIRQ1_Handler( vect = 65, enable ) )\r
@@ -144,17 +144,17 @@ static void prvDisplayNextString( unsigned char ucLine, char *pcString );
  * lcdMIN_TIME_BETWEEN_INTERRUPTS_MS milliseconds have passed since the button\r
  * was last pushed (for debouncing). \r
  */\r
-static portBASE_TYPE prvSendCommandOnDebouncedInput( portTickType *pxTimeLastInterrupt, unsigned char ucCommand );\r
+static portBASE_TYPE prvSendCommandOnDebouncedInput( TickType_t *pxTimeLastInterrupt, unsigned char ucCommand );\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 /* The queue used to pass commands from the button interrupt handlers to the\r
 prvLCDTaskLine2() task. */\r
-static xQueueHandle xButtonCommandQueue = NULL;\r
+static QueueHandle_t xButtonCommandQueue = NULL;\r
 \r
 /* The mutex used to ensure only one task writes to the display at any one\r
 time. */\r
-static xSemaphoreHandle xLCDMutex = NULL;\r
+static SemaphoreHandle_t xLCDMutex = NULL;\r
 \r
 /* The string that is scrolled up and down the first line of the display. */\r
 static const char cDataString1[] = "        http://www.FreeRTOS.org        ";\r
@@ -206,7 +206,7 @@ unsigned char ucDirection = lcdRIGHT_TO_LEFT;
        \r
        for( ;; )\r
        {\r
-               vTaskDelay( pxLCDParamaters->Speed / portTICK_RATE_MS );                \r
+               vTaskDelay( pxLCDParamaters->Speed / portTICK_PERIOD_MS );              \r
 \r
                /* Write the string. */\r
                prvDisplayNextString( pxLCDParamaters->Line, &( pxLCDParamaters->ptr_str[ usPosition ] ) );\r
@@ -223,7 +223,7 @@ static void prvLCDTaskLine2( void *pvParameters )
 struct _LCD_Params *pxLCDParamaters = ( struct _LCD_Params * ) pvParameters;\r
 unsigned short usPosition = 0U;\r
 unsigned char ucDirection = lcdRIGHT_TO_LEFT, ucStatus = lcdRUNNING, ucQueueData;\r
-portTickType xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );\r
+TickType_t xDelayTicks = ( pxLCDParamaters->Speed / portTICK_PERIOD_MS );\r
        \r
        for(;;)\r
        {\r
@@ -251,7 +251,7 @@ portTickType xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );
                                        \r
                                        if( ucStatus == lcdRUNNING )\r
                                        {\r
-                                               xDelayTicks = ( pxLCDParamaters->Speed / portTICK_RATE_MS );\r
+                                               xDelayTicks = ( pxLCDParamaters->Speed / portTICK_PERIOD_MS );\r
                                        }\r
                                        else\r
                                        {\r
@@ -372,10 +372,10 @@ static char cSingleLine[ lcdSTRING_LEN + 1 ];
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static portBASE_TYPE prvSendCommandOnDebouncedInput( portTickType *pxTimeLastInterrupt, unsigned char ucCommand )\r
+static portBASE_TYPE prvSendCommandOnDebouncedInput( TickType_t *pxTimeLastInterrupt, unsigned char ucCommand )\r
 {\r
 portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-portTickType xCurrentTickCount;\r
+TickType_t xCurrentTickCount;\r
        \r
        /* Check the time now for debouncing purposes. */\r
        xCurrentTickCount = xTaskGetTickCountFromISR();\r
@@ -397,7 +397,7 @@ portTickType xCurrentTickCount;
 \r
 static void prvIRQ1_Handler( void )\r
 {\r
-static portTickType xTimeLastInterrupt = 0UL;\r
+static TickType_t xTimeLastInterrupt = 0UL;\r
 static const unsigned char ucCommand = lcdSHIFT_BACK_COMMAND;\r
 portBASE_TYPE xHigherPriorityTaskWoken;\r
 \r
@@ -408,7 +408,7 @@ portBASE_TYPE xHigherPriorityTaskWoken;
 \r
 static void prvIRQ3_Handler(void)\r
 {\r
-static portTickType xTimeLastInterrupt = 0UL;\r
+static TickType_t xTimeLastInterrupt = 0UL;\r
 static const unsigned char ucCommand = lcdSTART_STOP_COMMAND;\r
 portBASE_TYPE xHigherPriorityTaskWoken;\r
 \r
@@ -419,7 +419,7 @@ portBASE_TYPE xHigherPriorityTaskWoken;
 \r
 static void prvIRQ4_Handler(void)\r
 {\r
-static portTickType xTimeLastInterrupt = 0UL;\r
+static TickType_t xTimeLastInterrupt = 0UL;\r
 static const unsigned char ucCommand = lcdSHIFT_FORWARD_COMMAND;\r
 portBASE_TYPE xHigherPriorityTaskWoken;\r
 \r