/*\r
- FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 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
-/* \r
+/*\r
* Task that provides the input and output for the FreeRTOS+CLI command\r
* interpreter. In this case a UDP port is used. See the URL in the comments\r
* within main.c for the location of the online documentation.\r
{\r
long lBytes, lByte;\r
signed char cInChar, cInputIndex = 0;\r
-static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
+static char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
portBASE_TYPE xMoreDataToFollow;\r
struct freertos_sockaddr xClient;\r
socklen_t xClientAddressLength = 0; /* This is required as a parameter to maintain the sendto() Berkeley sockets API - but it is not actually used so can take any value. */\r
string. */\r
if( cInChar == '\n' )\r
{\r
- /* Process the input string received prior to the \r
+ /* Process the input string received prior to the\r
newline. */\r
do\r
{\r
/* Pass the string to FreeRTOS+CLI. */\r
xMoreDataToFollow = FreeRTOS_CLIProcessCommand( cInputString, cOutputString, cmdMAX_OUTPUT_SIZE );\r
- \r
+\r
/* Send the output generated by the command's\r
implementation. */\r
- FreeRTOS_sendto( xSocket, cOutputString, strlen( ( const char * ) cOutputString ), 0, &xClient, xClientAddressLength );\r
+ FreeRTOS_sendto( xSocket, cOutputString, strlen( cOutputString ), 0, &xClient, xClientAddressLength );\r
\r
} while( xMoreDataToFollow != pdFALSE ); /* Until the command does not generate any more output. */\r
\r
- /* All the strings generated by the command processing \r
- have been sent. Clear the input string ready to receive \r
+ /* All the strings generated by the command processing\r
+ have been sent. Clear the input string ready to receive\r
the next command. */\r
cInputIndex = 0;\r
memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
- \r
+\r
/* Transmit a spacer, just to make the command console\r
easier to read. */\r
FreeRTOS_sendto( xSocket, "\r\n", strlen( "\r\n" ), 0, &xClient, xClientAddressLength );\r
{\r
if( cInChar == '\r' )\r
{\r
- /* Ignore the character. Newlines are used to \r
+ /* Ignore the character. Newlines are used to\r
detect the end of the input string. */\r
}\r
else if( cInChar == '\b' )\r
{\r
- /* Backspace was pressed. Erase the last character \r
+ /* Backspace was pressed. Erase the last character\r
in the string - if any. */\r
if( cInputIndex > 0 )\r
{\r
}\r
}\r
}\r
- } \r
+ }\r
}\r
else\r
{\r
\r
/* Bind the address to the socket. */\r
if( FreeRTOS_bind( xSocket, &xServer, sizeof( xServer ) ) == -1 )\r
- { \r
+ {\r
FreeRTOS_closesocket( xSocket );\r
xSocket = FREERTOS_INVALID_SOCKET;\r
}\r