/*\r
- FreeRTOS V7.5.1 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ FreeRTOS V8.0.0:rc1 - 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
/*-----------------------------------------------------------*/\r
\r
/* Misc defines. */\r
-#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )\r
-#define serNO_BLOCK ( ( portTickType ) 0 )\r
-#define serTX_BLOCK_TIME ( 40 / portTICK_RATE_MS )\r
+#define serINVALID_QUEUE ( ( QueueHandle_t ) 0 )\r
+#define serNO_BLOCK ( ( TickType_t ) 0 )\r
+#define serTX_BLOCK_TIME ( 40 / portTICK_PERIOD_MS )\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to hold received characters. */\r
-static xQueueHandle xRxedChars;\r
-static xQueueHandle xCharsForTx;\r
+static QueueHandle_t xRxedChars;\r
+static QueueHandle_t xCharsForTx;\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* See the serial2.h header file.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
xComPortHandle xReturn;\r
USART_InitTypeDef USART_InitStructure;\r
GPIO_InitTypeDef GPIO_InitStructure;\r
\r
/* Create the queues used to hold Rx/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
/* If the queue/semaphore was created correctly then setup the serial port\r
hardware. */\r
}\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 port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
-signed portCHAR *pxNext;\r
+signed char *pxNext;\r
\r
/* A couple of parameters that this port does not use. */\r
( void ) usStringLength;\r
( void ) pxPort;\r
\r
/* Send each character in the string, one at a time. */\r
- pxNext = ( signed portCHAR * ) pcString;\r
+ pxNext = ( signed char * ) pcString;\r
while( *pxNext )\r
{\r
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );\r
}\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
signed portBASE_TYPE xReturn;\r
\r
void vUARTInterruptHandler( void )\r
{\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-portCHAR cChar;\r
+char cChar;\r
\r
if( USART_GetITStatus( USART1, USART_IT_TXE ) == SET )\r
{\r