]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
Update version number ready for release.
[freertos] / FreeRTOS / Demo / PPC405_Xilinx_Virtex4_GCC / RTOSDemo / serial / serial.c
index 6a1472ec707c8afe1a42c8176b7ce2bf3570ddb2..e00c346c7d8afa2b1d83f6e50c304d8015e78309 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
-    FreeRTOS V7.5.1 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.0.1 - 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
 \r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
@@ -84,8 +85,8 @@
 \r
 /* Queues used to hold received characters, and characters waiting to be\r
 transmitted. */\r
-static xQueueHandle xRxedChars; \r
-static xQueueHandle xCharsForTx; \r
+static QueueHandle_t xRxedChars; \r
+static QueueHandle_t xCharsForTx; \r
 \r
 /* Structure that maintains information on the UART being used. */\r
 static XUartLite xUART;\r
@@ -99,7 +100,7 @@ static void vSerialISR( XUartLite *pxUART );
 \r
 /*-----------------------------------------------------------*/\r
 \r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
 {\r
        /* NOTE: The baud rate used by this driver is determined by the hardware\r
        parameterization of the UART Lite peripheral, and the baud value passed to\r
@@ -107,8 +108,8 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
        ( void ) ulWantedBaud;\r
 \r
        /* Create the queues used to hold Rx and Tx characters. */\r
-       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
-       xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+       xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
 \r
        /* Only initialise the UART if the queues were created correctly. */\r
        if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )\r
@@ -132,7 +133,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime )\r
 {\r
        /* The port handle is not required as this driver only supports one UART. */\r
        ( void ) pxPort;\r
@@ -150,7 +151,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime )\r
 {\r
 portBASE_TYPE xReturn = pdTRUE;\r
 \r
@@ -201,9 +202,9 @@ void vSerialClose( xComPortHandle xPort )
 \r
 static void vSerialISR( XUartLite *pxUART )\r
 {\r
-unsigned portLONG ulISRStatus;\r
+unsigned long ulISRStatus;\r
 portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;\r
-portCHAR cChar;\r
+char cChar;\r
 \r
        /* Just to remove compiler warning. */\r
        ( void ) pxUART;\r
@@ -219,7 +220,7 @@ portCHAR cChar;
                        /* A character is available - place it in the queue of received\r
                        characters.  This might wake a task that was blocked waiting for \r
                        data. */\r
-                       cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
+                       cChar = ( char ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
                        xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );\r
                        lDidSomething = pdTRUE;\r
                }\r