]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/serial/serial.c
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Demo / ColdFire_MCF5282_Eclipse / RTOSDemo / serial / serial.c
index 6355692c1b01bbc6b719407f92e74a6be7074fa7..5b2d822cc5c4e72c960b444bd4c12659da4ff4c7 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
-    FreeRTOS V7.5.1 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.1.2 - 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
@@ -81,21 +82,21 @@ an example of an efficient driver. */
 #include "serial.h"\r
 \r
 /* Hardware definitions. */\r
-#define serNO_PARITY           ( ( unsigned portCHAR ) 0x02 << 3 )\r
-#define ser8DATA_BITS          ( ( unsigned portCHAR ) 0x03 )\r
-#define ser1STOP_BIT           ( ( unsigned portCHAR ) 0x07 )\r
-#define serSYSTEM_CLOCK                ( ( unsigned portCHAR ) 0xdd )\r
-#define serTX_OUTPUT           ( ( unsigned portCHAR ) 0x04 )\r
-#define serRX_INPUT                    ( ( unsigned portCHAR ) 0x08 )\r
-#define serTX_ENABLE           ( ( unsigned portCHAR ) 0x04 )\r
-#define serRX_ENABLE           ( ( unsigned portCHAR ) 0x01 )\r
-#define serTX_INT                      ( ( unsigned portCHAR ) 0x01 )\r
-#define serRX_INT                      ( ( unsigned portCHAR ) 0x02 )\r
+#define serNO_PARITY           ( ( unsigned char ) 0x02 << 3 )\r
+#define ser8DATA_BITS          ( ( unsigned char ) 0x03 )\r
+#define ser1STOP_BIT           ( ( unsigned char ) 0x07 )\r
+#define serSYSTEM_CLOCK                ( ( unsigned char ) 0xdd )\r
+#define serTX_OUTPUT           ( ( unsigned char ) 0x04 )\r
+#define serRX_INPUT                    ( ( unsigned char ) 0x08 )\r
+#define serTX_ENABLE           ( ( unsigned char ) 0x04 )\r
+#define serRX_ENABLE           ( ( unsigned char ) 0x01 )\r
+#define serTX_INT                      ( ( unsigned char ) 0x01 )\r
+#define serRX_INT                      ( ( unsigned char ) 0x02 )\r
 \r
 \r
 /* The queues used to communicate between tasks and ISR's. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
 \r
 /* Flag used to indicate the tx status. */\r
 static portBASE_TYPE xTxHasEnded = pdTRUE;\r
@@ -107,13 +108,13 @@ void __attribute__( ( interrupt ) ) __cs3_isr_interrupt_78( void );
 \r
 /*-----------------------------------------------------------*/\r
 \r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
 {\r
-const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );\r
+const unsigned long ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );\r
 \r
        /* Create the queues used by the com test task. */\r
-       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
-       xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+       xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
 \r
        xTxHasEnded = pdTRUE;\r
 \r
@@ -132,8 +133,8 @@ const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWa
        MCF_UART1_UMR2 = ser1STOP_BIT;\r
        MCF_UART1_UCSR = serSYSTEM_CLOCK;\r
 \r
-       MCF_UART1_UBG1 = ( unsigned portCHAR ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );\r
-       MCF_UART1_UBG2 = ( unsigned portCHAR ) ( ulBaudRateDivisor & 0xffUL );\r
+       MCF_UART1_UBG1 = ( unsigned char ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );\r
+       MCF_UART1_UBG2 = ( unsigned char ) ( ulBaudRateDivisor & 0xffUL );\r
 \r
        /* Turn it on. */\r
        MCF_UART1_UCR = serTX_ENABLE | serRX_ENABLE;\r
@@ -151,7 +152,7 @@ const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWa
 }\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
        /* Only one port is supported. */\r
        ( void ) pxPort;\r
@@ -169,7 +170,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
        /* Only one port is supported. */\r
        ( void ) pxPort;\r
@@ -200,7 +201,7 @@ void vSerialClose( xComPortHandle xPort )
 \r
 void __cs3_isr_interrupt_78( void )\r
 {\r
-unsigned portCHAR ucChar;\r
+unsigned char ucChar;\r
 portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, xDoneSomething = pdTRUE;\r
 \r
        while( xDoneSomething != pdFALSE )\r