/*\r
* Print out information on a single file.\r
*/\r
-static void prvCreateFileInfoString( int8_t *pcBuffer, F_FIND *pxFindStruct );\r
+static void prvCreateFileInfoString( char *pcBuffer, F_FIND *pxFindStruct );\r
\r
/*\r
* Copies an existing file into a newly created file.\r
*/\r
-static portBASE_TYPE prvPerformCopy( int8_t *pcSourceFile,\r
- int32_t lSourceFileLength,\r
- int8_t *pcDestinationFile,\r
- int8_t *pxWriteBuffer,\r
- size_t xWriteBufferLen );\r
+static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
+ int32_t lSourceFileLength,\r
+ const char *pcDestinationFile,\r
+ char *pxWriteBuffer,\r
+ size_t xWriteBufferLen );\r
\r
/*\r
* Implements the DIR command.\r
*/\r
-static portBASE_TYPE prvDIRCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the CD command.\r
*/\r
-static portBASE_TYPE prvCDCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the DEL command.\r
*/\r
-static portBASE_TYPE prvDELCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the TYPE command.\r
*/\r
-static portBASE_TYPE prvTYPECommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the COPY command.\r
*/\r
-static portBASE_TYPE prvCOPYCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the DIR command line command, which lists all the\r
files in the current directory. */\r
static const CLI_Command_Definition_t xDIR =\r
{\r
- ( const int8_t * const ) "dir", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ndir:\r\n Lists the files in the current directory\r\n",\r
+ "dir", /* The command string to type. */\r
+ "\r\ndir:\r\n Lists the files in the current directory\r\n",\r
prvDIRCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
working directory. */\r
static const CLI_Command_Definition_t xCD =\r
{\r
- ( const int8_t * const ) "cd", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ncd <dir name>:\r\n Changes the working directory\r\n",\r
+ "cd", /* The command string to type. */\r
+ "\r\ncd <dir name>:\r\n Changes the working directory\r\n",\r
prvCDCommand, /* The function to run. */\r
1 /* One parameter is expected. */\r
};\r
contents of a file to the console. */\r
static const CLI_Command_Definition_t xTYPE =\r
{\r
- ( const int8_t * const ) "type", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ntype <filename>:\r\n Prints file contents to the terminal\r\n",\r
+ "type", /* The command string to type. */\r
+ "\r\ntype <filename>:\r\n Prints file contents to the terminal\r\n",\r
prvTYPECommand, /* The function to run. */\r
1 /* One parameter is expected. */\r
};\r
/* Structure that defines the DEL command line command, which deletes a file. */\r
static const CLI_Command_Definition_t xDEL =\r
{\r
- ( const int8_t * const ) "del", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ndel <filename>:\r\n deletes a file or directory\r\n",\r
+ "del", /* The command string to type. */\r
+ "\r\ndel <filename>:\r\n deletes a file or directory\r\n",\r
prvDELCommand, /* The function to run. */\r
1 /* One parameter is expected. */\r
};\r
/* Structure that defines the COPY command line command, which deletes a file. */\r
static const CLI_Command_Definition_t xCOPY =\r
{\r
- ( const int8_t * const ) "copy", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ncopy <source file> <dest file>:\r\n Copies <source file> to <dest file>\r\n",\r
+ "copy", /* The command string to type. */\r
+ "\r\ncopy <source file> <dest file>:\r\n Copies <source file> to <dest file>\r\n",\r
prvCOPYCommand, /* The function to run. */\r
2 /* Two parameters are expected. */\r
};\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTYPECommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn = pdTRUE;\r
static F_FILE *pxFile = NULL;\r
int iChar;\r
if( pxFile == NULL )\r
{\r
/* The file has not been opened yet. Find the file name. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
}\r
else\r
{\r
- pcWriteBuffer[ xByte ] = ( int8_t ) iChar;\r
+ pcWriteBuffer[ xByte ] = ( char ) iChar;\r
}\r
}\r
}\r
xReturn = pdFALSE;\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCDCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength;\r
unsigned char ucReturned;\r
size_t xStringLength;\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
/* Attempt to move to the requested directory. */\r
- ucReturned = f_chdir( ( char * ) pcParameter );\r
+ ucReturned = f_chdir( pcParameter );\r
\r
if( ucReturned == F_NO_ERROR )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "In: " );\r
- xStringLength = strlen( ( const char * ) pcWriteBuffer );\r
- f_getcwd( ( char * ) &( pcWriteBuffer[ xStringLength ] ), ( unsigned char ) ( xWriteBufferLen - xStringLength ) );\r
+ sprintf( pcWriteBuffer, "In: " );\r
+ xStringLength = strlen( pcWriteBuffer );\r
+ f_getcwd( &( pcWriteBuffer[ xStringLength ] ), ( unsigned char ) ( xWriteBufferLen - xStringLength ) );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error" );\r
+ sprintf( pcWriteBuffer, "Error" );\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDIRCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static F_FIND *pxFindStruct = NULL;\r
unsigned char ucReturned;\r
}\r
else\r
{\r
- snprintf( ( char * ) pcWriteBuffer, xWriteBufferLen, "Error: f_findfirst() failed." );\r
+ snprintf( pcWriteBuffer, xWriteBufferLen, "Error: f_findfirst() failed." );\r
}\r
}\r
else\r
{\r
- snprintf( ( char * ) pcWriteBuffer, xWriteBufferLen, "Failed to allocate RAM (using heap_4.c will prevent fragmentation)." );\r
+ snprintf( pcWriteBuffer, xWriteBufferLen, "Failed to allocate RAM (using heap_4.c will prevent fragmentation)." );\r
}\r
}\r
else\r
}\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDELCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength;\r
unsigned char ucReturned;\r
\r
( void ) xWriteBufferLen;\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
if( ucReturned == F_NO_ERROR )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s was deleted", pcParameter );\r
+ sprintf( pcWriteBuffer, "%s was deleted", pcParameter );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error" );\r
+ sprintf( pcWriteBuffer, "Error" );\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCOPYCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcSourceFile, *pcDestinationFile;\r
+char *pcSourceFile, *pcDestinationFile;\r
portBASE_TYPE xParameterStringLength;\r
long lSourceLength, lDestinationLength = 0;\r
\r
/* Obtain the name of the destination file. */\r
- pcDestinationFile = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 2, /* Return the second parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcDestinationFile = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 2, /* Return the second parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcDestinationFile );\r
\r
/* Obtain the name of the source file. */\r
- pcSourceFile = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcSourceFile = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcSourceFile );\r
\r
if( lSourceLength == 0 )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Source file does not exist" );\r
+ sprintf( pcWriteBuffer, "Source file does not exist" );\r
}\r
else\r
{\r
\r
if( lDestinationLength != 0 )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error: Destination file already exists" );\r
+ sprintf( pcWriteBuffer, "Error: Destination file already exists" );\r
}\r
}\r
\r
{\r
if( prvPerformCopy( pcSourceFile, lSourceLength, pcDestinationFile, pcWriteBuffer, xWriteBufferLen ) == pdPASS )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Copy made" );\r
+ sprintf( pcWriteBuffer, "Copy made" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error during copy" );\r
+ sprintf( pcWriteBuffer, "Error during copy" );\r
}\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvPerformCopy( int8_t *pcSourceFile,\r
- int32_t lSourceFileLength,\r
- int8_t *pcDestinationFile,\r
- int8_t *pxWriteBuffer,\r
- size_t xWriteBufferLen )\r
+static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
+ int32_t lSourceFileLength,\r
+ const char *pcDestinationFile,\r
+ char *pxWriteBuffer,\r
+ size_t xWriteBufferLen )\r
{\r
int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining;\r
F_FILE *pxFile;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCreateFileInfoString( int8_t *pcBuffer, F_FIND *pxFindStruct )\r
+static void prvCreateFileInfoString( char *pcBuffer, F_FIND *pxFindStruct )\r
{\r
const char *pcWritableFile = "writable file", *pcReadOnlyFile = "read only file", *pcDirectory = "directory";\r
const char * pcAttrib;\r
\r
/* Create a string that includes the file name, the file size and the\r
attributes string. */\r
- sprintf( ( char * ) pcBuffer, "%s [%s] [size=%d]", pxFindStruct->filename, pcAttrib, ( int ) pxFindStruct->filesize );\r
+ sprintf( pcBuffer, "%s [%s] [size=%d]", pxFindStruct->filename, pcAttrib, ( int ) pxFindStruct->filesize );\r
}\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "run-time-stats" command line command. This\r
generates a table that shows how much run time each task has */\r
static const CLI_Command_Definition_t xRunTimeStats =\r
{\r
- ( const int8_t * const ) "run-time-stats", /* The command string to type. */\r
- ( const int8_t * const ) "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",\r
+ "run-time-stats", /* The command string to type. */\r
+ "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",\r
prvRunTimeStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
a table that gives information on each task in the system. */\r
static const CLI_Command_Definition_t xTaskStats =\r
{\r
- ( const int8_t * const ) "task-stats", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",\r
+ "task-stats", /* The command string to type. */\r
+ "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",\r
prvTaskStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
time. */\r
static const CLI_Command_Definition_t xThreeParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-3-parameters",\r
- ( const int8_t * const ) "\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",\r
+ "echo-3-parameters",\r
+ "\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",\r
prvThreeParameterEchoCommand, /* The function to run. */\r
3 /* Three parameters are expected, which can take any value. */\r
};\r
a time. */\r
static const CLI_Command_Definition_t xParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-parameters",\r
- ( const int8_t * const ) "\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",\r
+ "echo-parameters",\r
+ "\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",\r
prvParameterEchoCommand, /* The function to run. */\r
-1 /* The user can enter any number of commands. */\r
};\r
parameter, which can be either "start" or "stop". */\r
static const CLI_Command_Definition_t xStartStopTrace =\r
{\r
- ( const int8_t * const ) "trace",\r
- ( const int8_t * const ) "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",\r
+ "trace",\r
+ "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",\r
prvStartStopTraceCommand, /* The function to run. */\r
1 /* One parameter is expected. Valid values are "start" and "stop". */\r
};\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n";\r
+const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskList( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskList( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n";\r
+const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The three parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The three parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* If this is the last of the three parameters then there are no more\r
strings to return after this one. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter != NULL )\r
{\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* There might be more parameters to return after this one. */\r
xReturn = pdTRUE;\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- int8_t *pcParameter;\r
+ const char *pcParameter;\r
portBASE_TYPE lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
configASSERT( pcWriteBuffer );\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
vTraceClear();\r
vTraceStart();\r
\r
- sprintf( ( char * ) pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
+ sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
}\r
else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
{\r
/* End the trace, if one is running. */\r
vTraceStop();\r
- sprintf( ( char * ) pcWriteBuffer, "Stopping trace recording.\r\n" );\r
+ sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
+ sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
}\r
\r
/* There is no more data to return after this single string, so return\r
/*\r
* Defines a command that prints out IP address information.\r
*/\r
-static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out the gathered demo debug stats.\r
*/\r
-static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that sends an ICMP ping request to an IP address.\r
*/\r
-static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the "ip-config" command line command. */\r
static const CLI_Command_Definition_t xIPConfig =\r
{\r
- ( const int8_t * const ) "ip-config",\r
- ( const int8_t * const ) "ip-config:\r\n Displays IP address configuration\r\n\r\n",\r
+ "ip-config",\r
+ "ip-config:\r\n Displays IP address configuration\r\n\r\n",\r
prvDisplayIPConfig,\r
0\r
};\r
/* Structure that defines the "ip-debug-stats" command line command. */\r
static const CLI_Command_Definition_t xIPDebugStats =\r
{\r
- ( const int8_t * const ) "ip-debug-stats", /* The command string to type. */\r
- ( const int8_t * const ) "ip-debug-stats:\r\n Shows some IP stack stats useful for debug - an example only.\r\n\r\n",\r
+ "ip-debug-stats", /* The command string to type. */\r
+ "ip-debug-stats:\r\n Shows some IP stack stats useful for debug - an example only.\r\n\r\n",\r
prvDisplayIPDebugStats, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
parameters. */\r
static const CLI_Command_Definition_t xPing =\r
{\r
- ( const int8_t * const ) "ping",\r
- ( const int8_t * const ) "ping <ipaddress> <optional:bytes to send>:\r\n for example, ping 192.168.0.3 8, or ping www.example.com\r\n\r\n",\r
+ "ping",\r
+ "ping <ipaddress> <optional:bytes to send>:\r\n for example, ping 192.168.0.3 8, or ping www.example.com\r\n\r\n",\r
prvPingCommand, /* The function to run. */\r
-1 /* Ping can take either one or two parameter, so the number of parameters has to be determined by the ping command implementation. */\r
};\r
\r
#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
\r
- static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- int8_t * pcParameter;\r
+ const char * pcParameter;\r
portBASE_TYPE lParameterStringLength, xReturn;\r
uint32_t ulIPAddress, ulBytesToPing;\r
const uint32_t ulDefaultBytesToPing = 8UL;\r
- int8_t cBuffer[ 16 ];\r
+ char cBuffer[ 16 ];\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
pcWriteBuffer[ 0 ] = 0x00;\r
\r
/* Obtain the number of bytes to ping. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 2, /* Return the second parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 2, /* Return the second parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter == NULL )\r
{\r
}\r
\r
/* Obtain the IP address string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
}\r
\r
/* Convert IP address, which may have come from a DNS lookup, to string. */\r
- FreeRTOS_inet_ntoa( ulIPAddress, ( char * ) cBuffer );\r
+ FreeRTOS_inet_ntoa( ulIPAddress, cBuffer );\r
\r
if( ulIPAddress != 0 )\r
{\r
\r
if( xReturn == pdFALSE )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s", "Could not send ping request\r\n" );\r
+ sprintf( pcWriteBuffer, "%s", "Could not send ping request\r\n" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Ping sent to %s with identifier %d\r\n", cBuffer, ( int ) xReturn );\r
+ sprintf( pcWriteBuffer, "Ping sent to %s with identifier %d\r\n", cBuffer, ( int ) xReturn );\r
}\r
\r
return pdFALSE;\r
\r
#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
\r
- static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static portBASE_TYPE xIndex = -1;\r
extern xExampleDebugStatEntry_t xIPTraceValues[];\r
\r
if( xIndex < xExampleDebugStatEntries() )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s %d\r\n", ( char * ) xIPTraceValues[ xIndex ].pucDescription, ( int ) xIPTraceValues[ xIndex ].ulData );\r
+ sprintf( pcWriteBuffer, "%s %d\r\n", ( char * ) xIPTraceValues[ xIndex ].pucDescription, ( int ) xIPTraceValues[ xIndex ].ulData );\r
xReturn = pdPASS;\r
}\r
else\r
\r
#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
\r
-static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static portBASE_TYPE xIndex = 0;\r
portBASE_TYPE xReturn;\r
{\r
case 0 :\r
FreeRTOS_GetAddressConfiguration( &ulAddress, NULL, NULL, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nIP address " );\r
+ sprintf( pcWriteBuffer, "\r\nIP address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 1 :\r
FreeRTOS_GetAddressConfiguration( NULL, &ulAddress, NULL, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nNet mask " );\r
+ sprintf( pcWriteBuffer, "\r\nNet mask " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 2 :\r
FreeRTOS_GetAddressConfiguration( NULL, NULL, &ulAddress, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nGateway address " );\r
+ sprintf( pcWriteBuffer, "\r\nGateway address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 3 :\r
FreeRTOS_GetAddressConfiguration( NULL, NULL, NULL, &ulAddress );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nDNS server address " );\r
+ sprintf( pcWriteBuffer, "\r\nDNS server address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
default :\r
ulAddress = 0;\r
- sprintf( ( char * ) pcWriteBuffer, "\r\n\r\n" );\r
+ sprintf( pcWriteBuffer, "\r\n\r\n" );\r
xReturn = pdFALSE;\r
xIndex = 0;\r
break;\r
\r
if( ulAddress != 0 )\r
{\r
- FreeRTOS_inet_ntoa( ulAddress, ( ( char * ) &( pcWriteBuffer[ strlen( ( char * ) pcWriteBuffer ) ] ) ) );\r
+ FreeRTOS_inet_ntoa( ulAddress, ( &( pcWriteBuffer[ strlen( pcWriteBuffer ) ] ) ) );\r
}\r
\r
return xReturn;\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out IP address information.\r
*/\r
-static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out the gathered demo debug stats.\r
*/\r
-static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that sends an ICMP ping request to an IP address.\r
*/\r
-static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "ip-config" command line command. */\r
static const CLI_Command_Definition_t xIPConfig =\r
{\r
- ( const int8_t * const ) "ip-config",\r
- ( const int8_t * const ) "ip-config:\r\n Displays IP address configuration\r\n\r\n",\r
+ "ip-config",\r
+ "ip-config:\r\n Displays IP address configuration\r\n\r\n",\r
prvDisplayIPConfig,\r
0\r
};\r
/* Structure that defines the "ip-debug-stats" command line command. */\r
static const CLI_Command_Definition_t xIPDebugStats =\r
{\r
- ( const int8_t * const ) "ip-debug-stats", /* The command string to type. */\r
- ( const int8_t * const ) "ip-debug-stats:\r\n Shows some IP stack stats useful for debug - an example only.\r\n\r\n",\r
+ "ip-debug-stats", /* The command string to type. */\r
+ "ip-debug-stats:\r\n Shows some IP stack stats useful for debug - an example only.\r\n\r\n",\r
prvDisplayIPDebugStats, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
generates a table that shows how much run time each task has */\r
static const CLI_Command_Definition_t xRunTimeStats =\r
{\r
- ( const int8_t * const ) "run-time-stats", /* The command string to type. */\r
- ( const int8_t * const ) "run-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n\r\n",\r
+ "run-time-stats", /* The command string to type. */\r
+ "run-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n\r\n",\r
prvRunTimeStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
a table that gives information on each task in the system. */\r
static const CLI_Command_Definition_t xTaskStats =\r
{\r
- ( const int8_t * const ) "task-stats", /* The command string to type. */\r
- ( const int8_t * const ) "task-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n\r\n",\r
+ "task-stats", /* The command string to type. */\r
+ "task-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n\r\n",\r
prvTaskStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
time. */\r
static const CLI_Command_Definition_t xThreeParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-3-parameters",\r
- ( const int8_t * const ) "echo-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n\r\n",\r
+ "echo-3-parameters",\r
+ "echo-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n\r\n",\r
prvThreeParameterEchoCommand, /* The function to run. */\r
3 /* Three parameters are expected, which can take any value. */\r
};\r
a time. */\r
static const CLI_Command_Definition_t xParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-parameters",\r
- ( const int8_t * const ) "echo-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n\r\n",\r
+ "echo-parameters",\r
+ "echo-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n\r\n",\r
prvParameterEchoCommand, /* The function to run. */\r
-1 /* The user can enter any number of commands. */\r
};\r
parameters. */\r
static const CLI_Command_Definition_t xPing =\r
{\r
- ( const int8_t * const ) "ping",\r
- ( const int8_t * const ) "ping <ipaddress> <optional:bytes to send>:\r\n for example, ping 192.168.0.3 8, or ping www.example.com\r\n\r\n",\r
+ "ping",\r
+ "ping <ipaddress> <optional:bytes to send>:\r\n for example, ping 192.168.0.3 8, or ping www.example.com\r\n\r\n",\r
prvPingCommand, /* The function to run. */\r
-1 /* Ping can take either one or two parameter, so the number of parameters has to be determined by the ping command implementation. */\r
};\r
parameter, which can be either "start" or "stop". */\r
static const CLI_Command_Definition_t xStartStopTrace =\r
{\r
- ( const int8_t * const ) "trace",\r
- ( const int8_t * const ) "trace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n\r\n",\r
+ "trace",\r
+ "trace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n\r\n",\r
prvStartStopTraceCommand, /* The function to run. */\r
1 /* One parameter is expected. Valid values are "start" and "stop". */\r
};\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n";\r
+const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskList( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskList( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n";\r
+const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The three parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The three parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* If this is the last of the three parameters then there are no more\r
strings to return after this one. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter != NULL )\r
{\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* There might be more parameters to return after this one. */\r
xReturn = pdTRUE;\r
\r
#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
\r
- static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- int8_t * pcParameter;\r
+ char * pcParameter;\r
portBASE_TYPE lParameterStringLength, xReturn;\r
uint32_t ulIPAddress, ulBytesToPing;\r
const uint32_t ulDefaultBytesToPing = 8UL;\r
- int8_t cBuffer[ 16 ];\r
+ char cBuffer[ 16 ];\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
pcWriteBuffer[ 0 ] = 0x00;\r
\r
/* Obtain the number of bytes to ping. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 2, /* Return the second parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = ( char * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 2, /* Return the second parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter == NULL )\r
{\r
}\r
\r
/* Obtain the IP address string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = ( char * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
}\r
\r
/* Convert IP address, which may have come from a DNS lookup, to string. */\r
- FreeRTOS_inet_ntoa( ulIPAddress, ( char * ) cBuffer );\r
+ FreeRTOS_inet_ntoa( ulIPAddress, cBuffer );\r
\r
if( ulIPAddress != 0 )\r
{\r
\r
if( xReturn == pdFALSE )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s", "Could not send ping request\r\n" );\r
+ sprintf( pcWriteBuffer, "%s", "Could not send ping request\r\n" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Ping sent to %s with identifier %d\r\n", cBuffer, xReturn );\r
+ sprintf( pcWriteBuffer, "Ping sent to %s with identifier %d\r\n", cBuffer, xReturn );\r
}\r
\r
return pdFALSE;\r
\r
#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
\r
- static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static portBASE_TYPE xIndex = -1;\r
extern xExampleDebugStatEntry_t xIPTraceValues[];\r
\r
if( xIndex < xExampleDebugStatEntries() )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s %d\r\n", ( char * ) xIPTraceValues[ xIndex ].pucDescription, ( int ) xIPTraceValues[ xIndex ].ulData );\r
+ sprintf( pcWriteBuffer, "%s %d\r\n", xIPTraceValues[ xIndex ].pucDescription, ( int ) xIPTraceValues[ xIndex ].ulData );\r
xReturn = pdPASS;\r
}\r
else\r
\r
#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
\r
-static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static portBASE_TYPE xIndex = 0;\r
portBASE_TYPE xReturn;\r
{\r
case 0 :\r
FreeRTOS_GetAddressConfiguration( &ulAddress, NULL, NULL, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nIP address " );\r
+ sprintf( pcWriteBuffer, "\r\nIP address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 1 :\r
FreeRTOS_GetAddressConfiguration( NULL, &ulAddress, NULL, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nNet mask " );\r
+ sprintf( pcWriteBuffer, "\r\nNet mask " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 2 :\r
FreeRTOS_GetAddressConfiguration( NULL, NULL, &ulAddress, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nGateway address " );\r
+ sprintf( pcWriteBuffer, "\r\nGateway address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 3 :\r
FreeRTOS_GetAddressConfiguration( NULL, NULL, NULL, &ulAddress );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nDNS server address " );\r
+ sprintf( pcWriteBuffer, "\r\nDNS server address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
default :\r
ulAddress = 0;\r
- sprintf( ( char * ) pcWriteBuffer, "\r\n\r\n" );\r
+ sprintf( pcWriteBuffer, "\r\n\r\n" );\r
xReturn = pdFALSE;\r
xIndex = 0;\r
break;\r
\r
if( ulAddress != 0 )\r
{\r
- FreeRTOS_inet_ntoa( ulAddress, ( ( char * ) &( pcWriteBuffer[ strlen( ( char * ) pcWriteBuffer ) ] ) ) );\r
+ FreeRTOS_inet_ntoa( ulAddress, &( pcWriteBuffer[ strlen( pcWriteBuffer ) ] ) );\r
}\r
\r
return xReturn;\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- int8_t *pcParameter;\r
+ const char *pcParameter;\r
portBASE_TYPE lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
configASSERT( pcWriteBuffer );\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
vTraceClear();\r
vTraceStart();\r
\r
- sprintf( ( char * ) pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
+ sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
}\r
- else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+ else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
{\r
/* End the trace, if one is running. */\r
vTraceStop();\r
- sprintf( ( char * ) pcWriteBuffer, "Stopping trace recording.\r\n" );\r
+ sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
+ sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
}\r
\r
/* There is no more data to return after this single string, so return\r
* Defines a command that returns a table showing the state of each task at the\r
* time the command is called.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that returns a table showing how much time each task has\r
* spent in the Running state.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that expects exactly three parameters. Each of the three\r
* parameter are echoed back one at a time.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that can take a variable number of parameters. Each\r
* parameter is echoes back one at a time.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that starts/stops events being recorded for offline viewing\r
* in FreeRTOS+Trace.\r
*/\r
-static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the "run-time-stats" command line command. */\r
static const CLI_Command_Definition_t xRunTimeStats =\r
{\r
- ( const int8_t * const ) "run-time-stats", /* The command string to type. */\r
- ( const int8_t * const ) "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n\r\n",\r
+ "run-time-stats", /* The command string to type. */\r
+ "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n\r\n",\r
prvRunTimeStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
/* Structure that defines the "task-stats" command line command. */\r
static const CLI_Command_Definition_t xTaskStats =\r
{\r
- ( const int8_t * const ) "task-stats", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n\r\n",\r
+ "task-stats", /* The command string to type. */\r
+ "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n\r\n",\r
prvTaskStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
time. */\r
static const CLI_Command_Definition_t xThreeParameterEcho =\r
{\r
- ( const int8_t * const ) "echo_3_parameters",\r
- ( const int8_t * const ) "\r\necho_3_parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n\r\n",\r
+ "echo_3_parameters",\r
+ "\r\necho_3_parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n\r\n",\r
prvThreeParameterEchoCommand, /* The function to run. */\r
3 /* Three parameters are expected, which can take any value. */\r
};\r
a time. */\r
static const CLI_Command_Definition_t xParameterEcho =\r
{\r
- ( const int8_t * const ) "echo_parameters",\r
- ( const int8_t * const ) "\r\necho_parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n\r\n",\r
+ "echo_parameters",\r
+ "\r\necho_parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n\r\n",\r
prvParameterEchoCommand, /* The function to run. */\r
-1 /* The user can enter any number of commands. */\r
};\r
parameter, which can be either "start" or "stop". */\r
static const CLI_Command_Definition_t xStartTrace =\r
{\r
- ( const int8_t * const ) "trace",\r
- ( const int8_t * const ) "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n\r\n",\r
+ "trace",\r
+ "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n\r\n",\r
prvStartStopTraceCommand, /* The function to run. */\r
1 /* One parameter is expected. Valid values are "start" and "stop". */\r
};\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n";\r
+const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskList( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskList( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n";\r
+const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE lParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The three parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The three parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, lParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, lParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* If this is the last of the three parameters then there are no more\r
strings to return after this one. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE lParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter != NULL )\r
{\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, lParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, lParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* There might be more parameters to return after this one. */\r
xReturn = pdTRUE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
configASSERT( pcWriteBuffer );\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
vTraceClear();\r
uiTraceStart();\r
\r
- sprintf( ( char * ) pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
+ sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
}\r
else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
{\r
/* End the trace, if one is running. */\r
vTraceStop();\r
- sprintf( ( char * ) pcWriteBuffer, "Stopping trace recording and dumping log to disk.\r\n" );\r
+ sprintf( pcWriteBuffer, "Stopping trace recording and dumping log to disk.\r\n" );\r
prvSaveTraceFile();\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
+ sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
}\r
\r
/* There is no more data to return after this single string, so return\r
/*\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
* Print out information on a single file.\r
*/\r
-static void prvCreateFileInfoString( int8_t *pcBuffer, F_FIND *pxFindStruct );\r
+static void prvCreateFileInfoString( char *pcBuffer, F_FIND *pxFindStruct );\r
\r
/*\r
* Copies an existing file into a newly created file.\r
*/\r
-static portBASE_TYPE prvPerformCopy( int8_t *pcSourceFile,\r
+static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
int32_t lSourceFileLength,\r
- int8_t *pcDestinationFile,\r
- int8_t *pxWriteBuffer,\r
+ const char *pcDestinationFile,\r
+ char *pxWriteBuffer,\r
size_t xWriteBufferLen );\r
\r
/*\r
* Implements the DIR command.\r
*/\r
-static portBASE_TYPE prvDIRCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the CD command.\r
*/\r
-static portBASE_TYPE prvCDCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the DEL command.\r
*/\r
-static portBASE_TYPE prvDELCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the TYPE command.\r
*/\r
-static portBASE_TYPE prvTYPECommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the COPY command.\r
*/\r
-static portBASE_TYPE prvCOPYCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the TEST command.\r
*/\r
-static portBASE_TYPE prvTESTFSCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the DIR command line command, which lists all the\r
files in the current directory. */\r
static const CLI_Command_Definition_t xDIR =\r
{\r
- ( const int8_t * const ) "dir", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ndir:\r\n Lists the files in the current directory\r\n",\r
+ "dir", /* The command string to type. */\r
+ "\r\ndir:\r\n Lists the files in the current directory\r\n",\r
prvDIRCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
working directory. */\r
static const CLI_Command_Definition_t xCD =\r
{\r
- ( const int8_t * const ) "cd", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ncd <dir name>:\r\n Changes the working directory\r\n",\r
+ "cd", /* The command string to type. */\r
+ "\r\ncd <dir name>:\r\n Changes the working directory\r\n",\r
prvCDCommand, /* The function to run. */\r
1 /* One parameter is expected. */\r
};\r
contents of a file to the console. */\r
static const CLI_Command_Definition_t xTYPE =\r
{\r
- ( const int8_t * const ) "type", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ntype <filename>:\r\n Prints file contents to the terminal\r\n",\r
+ "type", /* The command string to type. */\r
+ "\r\ntype <filename>:\r\n Prints file contents to the terminal\r\n",\r
prvTYPECommand, /* The function to run. */\r
1 /* One parameter is expected. */\r
};\r
/* Structure that defines the DEL command line command, which deletes a file. */\r
static const CLI_Command_Definition_t xDEL =\r
{\r
- ( const int8_t * const ) "del", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ndel <filename>:\r\n deletes a file or directory\r\n",\r
+ "del", /* The command string to type. */\r
+ "\r\ndel <filename>:\r\n deletes a file or directory\r\n",\r
prvDELCommand, /* The function to run. */\r
1 /* One parameter is expected. */\r
};\r
/* Structure that defines the COPY command line command, which deletes a file. */\r
static const CLI_Command_Definition_t xCOPY =\r
{\r
- ( const int8_t * const ) "copy", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ncopy <source file> <dest file>:\r\n Copies <source file> to <dest file>\r\n",\r
+ "copy", /* The command string to type. */\r
+ "\r\ncopy <source file> <dest file>:\r\n Copies <source file> to <dest file>\r\n",\r
prvCOPYCommand, /* The function to run. */\r
2 /* Two parameters are expected. */\r
};\r
file system driver tests. */\r
static const CLI_Command_Definition_t xTEST_FS =\r
{\r
- ( const int8_t * const ) "test-fs", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ntest-fs:\r\n Executes file system tests. ALL FILES WILL BE DELETED!!!\r\n",\r
+ "test-fs", /* The command string to type. */\r
+ "\r\ntest-fs:\r\n Executes file system tests. ALL FILES WILL BE DELETED!!!\r\n",\r
prvTESTFSCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTYPECommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn = pdTRUE;\r
static F_FILE *pxFile = NULL;\r
int iChar;\r
if( pxFile == NULL )\r
{\r
/* The file has not been opened yet. Find the file name. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
}\r
else\r
{\r
- pcWriteBuffer[ xByte ] = ( int8_t ) iChar;\r
+ pcWriteBuffer[ xByte ] = ( char ) iChar;\r
}\r
}\r
}\r
xReturn = pdFALSE;\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCDCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength;\r
unsigned char ucReturned;\r
size_t xStringLength;\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
/* Attempt to move to the requested directory. */\r
- ucReturned = f_chdir( ( char * ) pcParameter );\r
+ ucReturned = f_chdir( pcParameter );\r
\r
if( ucReturned == F_NO_ERROR )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "In: " );\r
+ sprintf( pcWriteBuffer, "In: " );\r
xStringLength = strlen( ( const char * ) pcWriteBuffer );\r
- f_getcwd( ( char * ) &( pcWriteBuffer[ xStringLength ] ), ( unsigned char ) ( xWriteBufferLen - xStringLength ) );\r
+ f_getcwd( &( pcWriteBuffer[ xStringLength ] ), ( unsigned char ) ( xWriteBufferLen - xStringLength ) );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error" );\r
+ sprintf( pcWriteBuffer, "Error" );\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDIRCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static F_FIND *pxFindStruct = NULL;\r
unsigned char ucReturned;\r
}\r
else\r
{\r
- snprintf( ( char * ) pcWriteBuffer, xWriteBufferLen, "Error: f_findfirst() failed." );\r
+ snprintf( pcWriteBuffer, xWriteBufferLen, "Error: f_findfirst() failed." );\r
}\r
}\r
else\r
{\r
- snprintf( ( char * ) pcWriteBuffer, xWriteBufferLen, "Failed to allocate RAM (using heap_4.c will prevent fragmentation)." );\r
+ snprintf( pcWriteBuffer, xWriteBufferLen, "Failed to allocate RAM (using heap_4.c will prevent fragmentation)." );\r
}\r
}\r
else\r
}\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDELCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength;\r
unsigned char ucReturned;\r
\r
( void ) xWriteBufferLen;\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
if( ucReturned == F_NO_ERROR )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s was deleted", pcParameter );\r
+ sprintf( pcWriteBuffer, "%s was deleted", pcParameter );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error" );\r
+ sprintf( pcWriteBuffer, "Error" );\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTESTFSCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
unsigned portBASE_TYPE uxOriginalPriority;\r
\r
/* Reset back to the original priority. */\r
vTaskPrioritySet( NULL, uxOriginalPriority );\r
\r
- sprintf( ( char * ) pcWriteBuffer, "%s", "Test results were sent to Windows console" );\r
+ sprintf( pcWriteBuffer, "%s", "Test results were sent to Windows console" );\r
\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCOPYCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcSourceFile, *pcDestinationFile;\r
+char *pcSourceFile;\r
+const char *pcDestinationFile;\r
portBASE_TYPE xParameterStringLength;\r
long lSourceLength, lDestinationLength = 0;\r
\r
/* Obtain the name of the destination file. */\r
- pcDestinationFile = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 2, /* Return the second parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcDestinationFile = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 2, /* Return the second parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcDestinationFile );\r
\r
/* Obtain the name of the source file. */\r
- pcSourceFile = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ pcSourceFile = ( char * ) FreeRTOS_CLIGetParameter\r
(\r
pcCommandString, /* The command string itself. */\r
1, /* Return the first parameter. */\r
\r
if( lSourceLength == 0 )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Source file does not exist" );\r
+ sprintf( pcWriteBuffer, "Source file does not exist" );\r
}\r
else\r
{\r
\r
if( lDestinationLength != 0 )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error: Destination file already exists" );\r
+ sprintf( pcWriteBuffer, "Error: Destination file already exists" );\r
}\r
}\r
\r
{\r
if( prvPerformCopy( pcSourceFile, lSourceLength, pcDestinationFile, pcWriteBuffer, xWriteBufferLen ) == pdPASS )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Copy made" );\r
+ sprintf( pcWriteBuffer, "Copy made" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Error during copy" );\r
+ sprintf( pcWriteBuffer, "Error during copy" );\r
}\r
}\r
\r
- strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+ strcat( pcWriteBuffer, cliNEW_LINE );\r
\r
return pdFALSE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvPerformCopy( int8_t *pcSourceFile,\r
- int32_t lSourceFileLength,\r
- int8_t *pcDestinationFile,\r
- int8_t *pxWriteBuffer,\r
- size_t xWriteBufferLen )\r
+static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
+ int32_t lSourceFileLength,\r
+ const char *pcDestinationFile,\r
+ char *pxWriteBuffer,\r
+ size_t xWriteBufferLen )\r
{\r
int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining;\r
F_FILE *pxFile;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvCreateFileInfoString( int8_t *pcBuffer, F_FIND *pxFindStruct )\r
+static void prvCreateFileInfoString( char *pcBuffer, F_FIND *pxFindStruct )\r
{\r
const char *pcWritableFile = "writable file", *pcReadOnlyFile = "read only file", *pcDirectory = "directory";\r
const char * pcAttrib;\r
\r
/* Create a string that includes the file name, the file size and the\r
attributes string. */\r
- sprintf( ( char * ) pcBuffer, "%s [%s] [size=%d]", pxFindStruct->filename, pcAttrib, pxFindStruct->filesize );\r
+ sprintf( pcBuffer, "%s [%s] [size=%d]", pxFindStruct->filename, pcAttrib, pxFindStruct->filesize );\r
}\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "run-time-stats" command line command. This\r
generates a table that shows how much run time each task has */\r
static const CLI_Command_Definition_t xRunTimeStats =\r
{\r
- ( const int8_t * const ) "run-time-stats", /* The command string to type. */\r
- ( const int8_t * const ) "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",\r
+ "run-time-stats", /* The command string to type. */\r
+ "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",\r
prvRunTimeStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
a table that gives information on each task in the system. */\r
static const CLI_Command_Definition_t xTaskStats =\r
{\r
- ( const int8_t * const ) "task-stats", /* The command string to type. */\r
- ( const int8_t * const ) "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",\r
+ "task-stats", /* The command string to type. */\r
+ "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",\r
prvTaskStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
time. */\r
static const CLI_Command_Definition_t xThreeParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-3-parameters",\r
- ( const int8_t * const ) "\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",\r
+ "echo-3-parameters",\r
+ "\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",\r
prvThreeParameterEchoCommand, /* The function to run. */\r
3 /* Three parameters are expected, which can take any value. */\r
};\r
a time. */\r
static const CLI_Command_Definition_t xParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-parameters",\r
- ( const int8_t * const ) "\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",\r
+ "echo-parameters",\r
+ "\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",\r
prvParameterEchoCommand, /* The function to run. */\r
-1 /* The user can enter any number of commands. */\r
};\r
parameter, which can be either "start" or "stop". */\r
static const CLI_Command_Definition_t xStartStopTrace =\r
{\r
- ( const int8_t * const ) "trace",\r
- ( const int8_t * const ) "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",\r
+ "trace",\r
+ "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",\r
prvStartStopTraceCommand, /* The function to run. */\r
1 /* One parameter is expected. Valid values are "start" and "stop". */\r
};\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n";\r
+const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskList( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskList( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n";\r
+const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The three parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The three parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* If this is the last of the three parameters then there are no more\r
strings to return after this one. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter != NULL )\r
{\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* There might be more parameters to return after this one. */\r
xReturn = pdTRUE;\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- int8_t *pcParameter;\r
+ const char *pcParameter;\r
portBASE_TYPE lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
configASSERT( pcWriteBuffer );\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
vTraceClear();\r
vTraceStart();\r
\r
- sprintf( ( char * ) pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
+ sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
}\r
- else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+ else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
{\r
/* End the trace, if one is running. */\r
vTraceStop();\r
- sprintf( ( char * ) pcWriteBuffer, "Stopping trace recording.\r\n" );\r
+ sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
+ sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
}\r
\r
/* There is no more data to return after this single string, so return\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out IP address information.\r
*/\r
-static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out the gathered demo debug stats.\r
*/\r
-static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that sends an ICMP ping request to an IP address.\r
*/\r
-static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "ip-config" command line command. */\r
static const CLI_Command_Definition_t xIPConfig =\r
{\r
- ( const int8_t * const ) "ip-config",\r
- ( const int8_t * const ) "ip-config:\r\n Displays IP address configuration\r\n\r\n",\r
+ "ip-config",\r
+ "ip-config:\r\n Displays IP address configuration\r\n\r\n",\r
prvDisplayIPConfig,\r
0\r
};\r
/* Structure that defines the "ip-debug-stats" command line command. */\r
static const CLI_Command_Definition_t xIPDebugStats =\r
{\r
- ( const int8_t * const ) "ip-debug-stats", /* The command string to type. */\r
- ( const int8_t * const ) "ip-debug-stats:\r\n Shows some IP stack stats useful for debug - an example only.\r\n\r\n",\r
+ "ip-debug-stats", /* The command string to type. */\r
+ "ip-debug-stats:\r\n Shows some IP stack stats useful for debug - an example only.\r\n\r\n",\r
prvDisplayIPDebugStats, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
generates a table that shows how much run time each task has */\r
static const CLI_Command_Definition_t xRunTimeStats =\r
{\r
- ( const int8_t * const ) "run-time-stats", /* The command string to type. */\r
- ( const int8_t * const ) "run-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n\r\n",\r
+ "run-time-stats", /* The command string to type. */\r
+ "run-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n\r\n",\r
prvRunTimeStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
a table that gives information on each task in the system. */\r
static const CLI_Command_Definition_t xTaskStats =\r
{\r
- ( const int8_t * const ) "task-stats", /* The command string to type. */\r
- ( const int8_t * const ) "task-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n\r\n",\r
+ "task-stats", /* The command string to type. */\r
+ "task-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n\r\n",\r
prvTaskStatsCommand, /* The function to run. */\r
0 /* No parameters are expected. */\r
};\r
time. */\r
static const CLI_Command_Definition_t xThreeParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-3-parameters",\r
- ( const int8_t * const ) "echo-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n\r\n",\r
+ "echo-3-parameters",\r
+ "echo-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n\r\n",\r
prvThreeParameterEchoCommand, /* The function to run. */\r
3 /* Three parameters are expected, which can take any value. */\r
};\r
a time. */\r
static const CLI_Command_Definition_t xParameterEcho =\r
{\r
- ( const int8_t * const ) "echo-parameters",\r
- ( const int8_t * const ) "echo-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n\r\n",\r
+ "echo-parameters",\r
+ "echo-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n\r\n",\r
prvParameterEchoCommand, /* The function to run. */\r
-1 /* The user can enter any number of commands. */\r
};\r
parameters. */\r
static const CLI_Command_Definition_t xPing =\r
{\r
- ( const int8_t * const ) "ping",\r
- ( const int8_t * const ) "ping <ipaddress> <optional:bytes to send>:\r\n for example, ping 192.168.0.3 8, or ping www.example.com\r\n\r\n",\r
+ "ping",\r
+ "ping <ipaddress> <optional:bytes to send>:\r\n for example, ping 192.168.0.3 8, or ping www.example.com\r\n\r\n",\r
prvPingCommand, /* The function to run. */\r
-1 /* Ping can take either one or two parameter, so the number of parameters has to be determined by the ping command implementation. */\r
};\r
parameter, which can be either "start" or "stop". */\r
static const CLI_Command_Definition_t xStartStopTrace =\r
{\r
- ( const int8_t * const ) "trace",\r
- ( const int8_t * const ) "trace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n\r\n",\r
+ "trace",\r
+ "trace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n\r\n",\r
prvStartStopTraceCommand, /* The function to run. */\r
1 /* One parameter is expected. Valid values are "start" and "stop". */\r
};\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n";\r
+const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskList( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskList( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n";\r
+const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
configASSERT( pcWriteBuffer );\r
\r
/* Generate a table of task stats. */\r
- strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
- vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+ strcpy( pcWriteBuffer, pcHeader );\r
+ vTaskGetRunTimeStats( pcWriteBuffer + strlen( pcHeader ) );\r
\r
/* There is no more data to return after this single string, so return\r
pdFALSE. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The three parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The three parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* If this is the last of the three parameters then there are no more\r
strings to return after this one. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-int8_t *pcParameter;\r
+const char *pcParameter;\r
portBASE_TYPE xParameterStringLength, xReturn;\r
static portBASE_TYPE lParameterNumber = 0;\r
\r
{\r
/* The first time the function is called after the command has been\r
entered just a header string is returned. */\r
- sprintf( ( char * ) pcWriteBuffer, "The parameters were:\r\n" );\r
+ sprintf( pcWriteBuffer, "The parameters were:\r\n" );\r
\r
/* Next time the function is called the first parameter will be echoed\r
back. */\r
else\r
{\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- lParameterNumber, /* Return the next parameter. */\r
- &xParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter != NULL )\r
{\r
/* Return the parameter string. */\r
memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
- sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
- strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
- strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+ sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
\r
/* There might be more parameters to return after this one. */\r
xReturn = pdTRUE;\r
\r
#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
\r
- static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- int8_t * pcParameter;\r
+ char * pcParameter;\r
portBASE_TYPE lParameterStringLength, xReturn;\r
uint32_t ulIPAddress, ulBytesToPing;\r
const uint32_t ulDefaultBytesToPing = 8UL;\r
- int8_t cBuffer[ 16 ];\r
+ char cBuffer[ 16 ];\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
pcWriteBuffer[ 0 ] = 0x00;\r
\r
/* Obtain the number of bytes to ping. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 2, /* Return the second parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = ( char * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 2, /* Return the second parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
if( pcParameter == NULL )\r
{\r
}\r
else\r
{\r
- ulBytesToPing = atol( ( const char * ) pcParameter );\r
+ ulBytesToPing = atol( pcParameter );\r
}\r
\r
/* Obtain the IP address string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = ( char * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
}\r
\r
/* Convert IP address, which may have come from a DNS lookup, to string. */\r
- FreeRTOS_inet_ntoa( ulIPAddress, ( char * ) cBuffer );\r
+ FreeRTOS_inet_ntoa( ulIPAddress, cBuffer );\r
\r
if( ulIPAddress != 0 )\r
{\r
\r
if( xReturn == pdFALSE )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s", "Could not send ping request\r\n" );\r
+ sprintf( pcWriteBuffer, "%s", "Could not send ping request\r\n" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Ping sent to %s with identifier %d\r\n", cBuffer, xReturn );\r
+ sprintf( pcWriteBuffer, "Ping sent to %s with identifier %d\r\n", cBuffer, xReturn );\r
}\r
\r
return pdFALSE;\r
\r
#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
\r
- static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static portBASE_TYPE xIndex = -1;\r
extern xExampleDebugStatEntry_t xIPTraceValues[];\r
\r
if( xIndex < xExampleDebugStatEntries() )\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "%s %d\r\n", ( char * ) xIPTraceValues[ xIndex ].pucDescription, ( int ) xIPTraceValues[ xIndex ].ulData );\r
+ sprintf( pcWriteBuffer, "%s %d\r\n", xIPTraceValues[ xIndex ].pucDescription, ( int ) xIPTraceValues[ xIndex ].ulData );\r
xReturn = pdPASS;\r
}\r
else\r
\r
#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
\r
-static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static portBASE_TYPE xIndex = 0;\r
portBASE_TYPE xReturn;\r
{\r
case 0 :\r
FreeRTOS_GetAddressConfiguration( &ulAddress, NULL, NULL, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nIP address " );\r
+ sprintf( pcWriteBuffer, "\r\nIP address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 1 :\r
FreeRTOS_GetAddressConfiguration( NULL, &ulAddress, NULL, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nNet mask " );\r
+ sprintf( pcWriteBuffer, "\r\nNet mask " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 2 :\r
FreeRTOS_GetAddressConfiguration( NULL, NULL, &ulAddress, NULL );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nGateway address " );\r
+ sprintf( pcWriteBuffer, "\r\nGateway address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
case 3 :\r
FreeRTOS_GetAddressConfiguration( NULL, NULL, NULL, &ulAddress );\r
- sprintf( ( char * ) pcWriteBuffer, "\r\nDNS server address " );\r
+ sprintf( pcWriteBuffer, "\r\nDNS server address " );\r
xReturn = pdTRUE;\r
xIndex++;\r
break;\r
\r
default :\r
ulAddress = 0;\r
- sprintf( ( char * ) pcWriteBuffer, "\r\n\r\n" );\r
+ sprintf( pcWriteBuffer, "\r\n\r\n" );\r
xReturn = pdFALSE;\r
xIndex = 0;\r
break;\r
\r
if( ulAddress != 0 )\r
{\r
- FreeRTOS_inet_ntoa( ulAddress, ( ( char * ) &( pcWriteBuffer[ strlen( ( char * ) pcWriteBuffer ) ] ) ) );\r
+ FreeRTOS_inet_ntoa( ulAddress, &( pcWriteBuffer[ strlen( pcWriteBuffer ) ] ) );\r
}\r
\r
return xReturn;\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- int8_t *pcParameter;\r
+ const char *pcParameter;\r
portBASE_TYPE lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
configASSERT( pcWriteBuffer );\r
\r
/* Obtain the parameter string. */\r
- pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
- (\r
- pcCommandString, /* The command string itself. */\r
- 1, /* Return the first parameter. */\r
- &lParameterStringLength /* Store the parameter string length. */\r
- );\r
+ pcParameter = FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
\r
/* Sanity check something was returned. */\r
configASSERT( pcParameter );\r
vTraceClear();\r
vTraceStart();\r
\r
- sprintf( ( char * ) pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
+ sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
}\r
- else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+ else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
{\r
/* End the trace, if one is running. */\r
vTraceStop();\r
- sprintf( ( char * ) pcWriteBuffer, "Stopping trace recording.\r\n" );\r
+ sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );\r
}\r
else\r
{\r
- sprintf( ( char * ) pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
+ sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
}\r
\r
/* There is no more data to return after this single string, so return\r
/*\r
* FreeRTOS+CLI V1.0.2 (C) 2013 Real Time Engineers ltd. All rights reserved.\r
*\r
- * This file is part of the FreeRTOS+CLI distribution. The FreeRTOS+CLI license \r
+ * This file is part of the FreeRTOS+CLI distribution. The FreeRTOS+CLI license\r
* terms are different to the FreeRTOS license terms.\r
*\r
- * FreeRTOS+CLI uses a dual license model that allows the software to be used \r
- * under a standard GPL open source license, or a commercial license. The \r
- * standard GPL license (unlike the modified GPL license under which FreeRTOS \r
- * itself is distributed) requires that all software statically linked with \r
- * FreeRTOS+CLI is also distributed under the same GPL V2 license terms. \r
+ * FreeRTOS+CLI uses a dual license model that allows the software to be used\r
+ * under a standard GPL open source license, or a commercial license. The\r
+ * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
+ * itself is distributed) requires that all software statically linked with\r
+ * FreeRTOS+CLI is also distributed under the same GPL V2 license terms.\r
* Details of both license options follow:\r
*\r
* - Open source licensing -\r
* The callback function that is executed when "help" is entered. This is the\r
* only default command that is always present.\r
*/\r
-static portBASE_TYPE prvHelpCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+static portBASE_TYPE prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Return the number of parameters that follow the command name.\r
*/\r
-static int8_t prvGetNumberOfParameters( const int8_t * pcCommandString );\r
+static int8_t prvGetNumberOfParameters( const char *pcCommandString );\r
\r
/* The definition of the "help" command. This command is always at the front\r
of the list of registered commands. */\r
static const CLI_Command_Definition_t xHelpCommand =\r
{\r
- ( const int8_t * const ) "help",\r
- ( const int8_t * const ) "\r\nhelp:\r\n Lists all the registered commands\r\n\r\n",\r
+ "help",\r
+ "\r\nhelp:\r\n Lists all the registered commands\r\n\r\n",\r
prvHelpCommand,\r
0\r
};\r
so only one command interpreter interface can be used at any one time. For that\r
reason, no attempt at providing mutual exclusion to the cOutputBuffer array is\r
attempted. */\r
-static int8_t cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ];\r
+static char cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ];\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE FreeRTOS_CLIProcessCommand( const int8_t * const pcCommandInput, int8_t * pcWriteBuffer, size_t xWriteBufferLen )\r
+portBASE_TYPE FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen )\r
{\r
static const CLI_Definition_List_Item_t *pxCommand = NULL;\r
portBASE_TYPE xReturn = pdTRUE;\r
-const int8_t *pcRegisteredCommandString;\r
+const char *pcRegisteredCommandString;\r
size_t xCommandStringLength;\r
\r
/* Note: This function is not re-entrant. It must not be called from more\r
for( pxCommand = &xRegisteredCommands; pxCommand != NULL; pxCommand = pxCommand->pxNext )\r
{\r
pcRegisteredCommandString = pxCommand->pxCommandLineDefinition->pcCommand;\r
- xCommandStringLength = strlen( ( const char * ) pcRegisteredCommandString );\r
+ xCommandStringLength = strlen( pcRegisteredCommandString );\r
\r
/* To ensure the string lengths match exactly, so as not to pick up\r
a sub-string of a longer command, check the byte after the expected\r
a parameter. */\r
if( ( pcCommandInput[ xCommandStringLength ] == ' ' ) || ( pcCommandInput[ xCommandStringLength ] == 0x00 ) )\r
{\r
- if( strncmp( ( const char * ) pcCommandInput, ( const char * ) pcRegisteredCommandString, xCommandStringLength ) == 0 )\r
+ if( strncmp( pcCommandInput, pcRegisteredCommandString, xCommandStringLength ) == 0 )\r
{\r
/* The command has been found. Check it has the expected\r
number of parameters. If cExpectedNumberOfParameters is -1,\r
{\r
/* The command was found, but the number of parameters with the command\r
was incorrect. */\r
- strncpy( ( char * ) pcWriteBuffer, "Incorrect command parameter(s). Enter \"help\" to view a list of available commands.\r\n\r\n", xWriteBufferLen );\r
+ strncpy( pcWriteBuffer, "Incorrect command parameter(s). Enter \"help\" to view a list of available commands.\r\n\r\n", xWriteBufferLen );\r
pxCommand = NULL;\r
}\r
else if( pxCommand != NULL )\r
else\r
{\r
/* pxCommand was NULL, the command was not found. */\r
- strncpy( ( char * ) pcWriteBuffer, ( const char * const ) "Command not recognised. Enter 'help' to view a list of available commands.\r\n\r\n", xWriteBufferLen );\r
+ strncpy( pcWriteBuffer, "Command not recognised. Enter 'help' to view a list of available commands.\r\n\r\n", xWriteBufferLen );\r
xReturn = pdFALSE;\r
}\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-int8_t *FreeRTOS_CLIGetOutputBuffer( void )\r
+char *FreeRTOS_CLIGetOutputBuffer( void )\r
{\r
return cOutputBuffer;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-const int8_t *FreeRTOS_CLIGetParameter( const int8_t *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength )\r
+const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength )\r
{\r
unsigned portBASE_TYPE uxParametersFound = 0;\r
-const int8_t *pcReturn = NULL;\r
+const char *pcReturn = NULL;\r
\r
*pxParameterStringLength = 0;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvHelpCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+static portBASE_TYPE prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static const CLI_Definition_List_Item_t * pxCommand = NULL;\r
signed portBASE_TYPE xReturn;\r
\r
/* Return the next command help string, before moving the pointer on to\r
the next command in the list. */\r
- strncpy( ( char * ) pcWriteBuffer, ( const char * ) pxCommand->pxCommandLineDefinition->pcHelpString, xWriteBufferLen );\r
+ strncpy( pcWriteBuffer, pxCommand->pxCommandLineDefinition->pcHelpString, xWriteBufferLen );\r
pxCommand = pxCommand->pxNext;\r
\r
if( pxCommand == NULL )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static int8_t prvGetNumberOfParameters( const int8_t * pcCommandString )\r
+static int8_t prvGetNumberOfParameters( const char *pcCommandString )\r
{\r
int8_t cParameters = 0;\r
portBASE_TYPE xLastCharacterWasSpace = pdFALSE;\r
/*\r
* FreeRTOS+CLI V1.0.2 (C) 2013 Real Time Engineers ltd. All rights reserved.\r
*\r
- * This file is part of the FreeRTOS+CLI distribution. The FreeRTOS+CLI license \r
+ * This file is part of the FreeRTOS+CLI distribution. The FreeRTOS+CLI license\r
* terms are different to the FreeRTOS license terms.\r
*\r
- * FreeRTOS+CLI uses a dual license model that allows the software to be used \r
- * under a standard GPL open source license, or a commercial license. The \r
- * standard GPL license (unlike the modified GPL license under which FreeRTOS \r
- * itself is distributed) requires that all software statically linked with \r
- * FreeRTOS+CLI is also distributed under the same GPL V2 license terms. \r
+ * FreeRTOS+CLI uses a dual license model that allows the software to be used\r
+ * under a standard GPL open source license, or a commercial license. The\r
+ * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
+ * itself is distributed) requires that all software statically linked with\r
+ * FreeRTOS+CLI is also distributed under the same GPL V2 license terms.\r
* Details of both license options follow:\r
*\r
* - Open source licensing -\r
#define COMMAND_INTERPRETER_H\r
\r
/* The prototype to which callback functions used to process command line\r
-commands must comply. pcWriteBuffer is a buffer into which the output from \r
-executing the command can be written, xWriteBufferLen is the length, in bytes of \r
+commands must comply. pcWriteBuffer is a buffer into which the output from\r
+executing the command can be written, xWriteBufferLen is the length, in bytes of\r
the pcWriteBuffer buffer, and pcCommandString is the entire string as input by\r
the user (from which parameters can be extracted).*/\r
-typedef portBASE_TYPE (*pdCOMMAND_LINE_CALLBACK)( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t * pcCommandString );\r
+typedef portBASE_TYPE (*pdCOMMAND_LINE_CALLBACK)( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* The structure that defines command line commands. A command line command\r
should be defined by declaring a const structure of this type. */\r
typedef struct xCOMMAND_LINE_INPUT\r
{\r
- const int8_t * const pcCommand; /* The command that causes pxCommandInterpreter to be executed. For example "help". Must be all lower case. */\r
- const int8_t * const pcHelpString; /* String that describes how to use the command. Should start with the command itself, and end with "\r\n". For example "help: Returns a list of all the commands\r\n". */\r
+ const char * const pcCommand; /* The command that causes pxCommandInterpreter to be executed. For example "help". Must be all lower case. */\r
+ const char * const pcHelpString; /* String that describes how to use the command. Should start with the command itself, and end with "\r\n". For example "help: Returns a list of all the commands\r\n". */\r
const pdCOMMAND_LINE_CALLBACK pxCommandInterpreter; /* A pointer to the callback function that will return the output generated by the command. */\r
int8_t cExpectedNumberOfParameters; /* Commands expect a fixed number of parameters, which may be zero. */\r
} CLI_Command_Definition_t;\r
* pcCmdIntProcessCommand is not reentrant. It must not be called from more\r
* than one task - or at least - by more than one task at a time.\r
*/\r
-portBASE_TYPE FreeRTOS_CLIProcessCommand( const int8_t * const pcCommandInput, int8_t * pcWriteBuffer, size_t xWriteBufferLen );\r
+portBASE_TYPE FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen );\r
\r
/*-----------------------------------------------------------*/\r
\r
*\r
* FreeRTOS_CLIGetOutputBuffer() returns the address of the output buffer.\r
*/\r
-int8_t *FreeRTOS_CLIGetOutputBuffer( void );\r
+char *FreeRTOS_CLIGetOutputBuffer( void );\r
\r
/*\r
* Return a pointer to the xParameterNumber'th word in pcCommandString.\r
*/\r
-const int8_t *FreeRTOS_CLIGetParameter( const int8_t *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength );\r
+const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength );\r
\r
#endif /* COMMAND_INTERPRETER_H */\r
\r