]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/PPC405_Xilinx_Virtex4_GCC/RTOSDemo/serial/serial.c
Replace use of legacy portTYPE macros from old demos and standard demo files.
[freertos] / FreeRTOS / Demo / PPC405_Xilinx_Virtex4_GCC / RTOSDemo / serial / serial.c
index a3cb8cab4b19eca2dfb9b34604cd13a2c0ab3b0a..b23fb21bfa512b18d5bb6a37575ef105192047d5 100644 (file)
@@ -100,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
@@ -108,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
@@ -133,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, portTickType xBlockTime )\r
 {\r
        /* The port handle is not required as this driver only supports one UART. */\r
        ( void ) pxPort;\r
@@ -151,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, portTickType xBlockTime )\r
 {\r
 portBASE_TYPE xReturn = pdTRUE;\r
 \r
@@ -202,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
@@ -220,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