]> git.sur5r.net Git - freertos/commitdiff
Update demos that use FreeRTOS+CLI to remove casting to int8_t * from strings.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 30 Dec 2013 14:06:57 +0000 (14:06 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 30 Dec 2013 14:06:57 +0000 (14:06 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2153 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/File-releated-CLI-commands.c
FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.c
FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/UARTCommandConsole.c
FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/serial.c
FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/Sample-CLI-commands.c
FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/UARTCommandConsole.c
FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-releated-CLI-commands.c
FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/Sample-CLI-commands.c
FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/UARTCommandConsole.c

index 66215974ba8d30b2ea24a3a2971cfc412573a2dd..a902846c3c5e4c5cd6db572a114c408cc99f8555 100644 (file)
@@ -1,5 +1,5 @@
 /*\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
     FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\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
-                                                       int32_t lSourceFileLength,\r
-                                                       int8_t *pcDestinationFile,\r
-                                                       int8_t *pxWriteBuffer,\r
-                                                       size_t xWriteBufferLen );\r
+static portBASE_TYPE prvPerformCopy( char *pcSourceFile,\r
+                                                                       int32_t lSourceFileLength,\r
+                                                                       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
  * Registers the CLI commands that are specific to the files system with the\r
@@ -207,9 +207,9 @@ void vRegisterFileSystemCLICommands( void )
 }\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
@@ -233,12 +233,12 @@ size_t xColumns = 50U;
        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
@@ -263,7 +263,7 @@ size_t xColumns = 50U;
                        }\r
                        else\r
                        {\r
-                               pcWriteBuffer[ xByte ] = ( int8_t ) iChar;\r
+                               pcWriteBuffer[ xByte ] = ( char ) iChar;\r
                        }\r
                }\r
        }\r
@@ -275,51 +275,51 @@ size_t xColumns = 50U;
                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
@@ -349,12 +349,12 @@ portBASE_TYPE xReturn = pdFALSE;
                        }\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
@@ -379,15 +379,15 @@ portBASE_TYPE 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 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
@@ -395,12 +395,12 @@ unsigned char ucReturned;
        ( 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
@@ -410,43 +410,43 @@ unsigned char ucReturned;
 \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 = ( char * ) 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 = ( char * ) 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
@@ -459,7 +459,7 @@ long lSourceLength, lDestinationLength = 0;
 \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
@@ -468,7 +468,7 @@ long lSourceLength, lDestinationLength = 0;
 \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
@@ -478,25 +478,25 @@ long lSourceLength, lDestinationLength = 0;
        {\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(   char *pcSourceFile,\r
+                                                                               int32_t lSourceFileLength,\r
+                                                                               char *pcDestinationFile,\r
+                                                                               char *pxWriteBuffer,\r
+                                                                               size_t xWriteBufferLen )\r
 {\r
 int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining;\r
 F_FILE *pxFile;\r
@@ -557,7 +557,7 @@ portBASE_TYPE xReturn = pdPASS;
 }\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
@@ -578,5 +578,5 @@ const char * pcAttrib;
 \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
index 561f886e4428ad4cc3f21626facc78531ae6355e..32d56895e9ecbb8c954e19e3ad664fd29533e658 100644 (file)
 /*\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
  * Registers the CLI commands defined within this file with the FreeRTOS+CLI\r
@@ -128,7 +128,7 @@ void vRegisterSampleCLICommands( void );
  * 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
@@ -203,7 +203,7 @@ void vRegisterSampleCLICommands( void )
 }\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 char *const pcHeader = "Task          State  Priority  Stack     #\r\n************************************************\r\n";\r
 \r
@@ -215,8 +215,8 @@ const char *const pcHeader = "Task          State  Priority  Stack  #\r\n********
        configASSERT( pcWriteBuffer );\r
 \r
        /* Generate a table of task stats. */\r
-       strcpy( ( char * ) pcWriteBuffer, pcHeader );\r
-       vTaskList( ( char * ) pcWriteBuffer + strlen( 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
@@ -224,7 +224,7 @@ const char *const pcHeader = "Task          State  Priority  Stack  #\r\n********
 }\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 char * const pcHeader = "Task            Abs Time      % Time\r\n****************************************\r\n";\r
 \r
@@ -236,8 +236,8 @@ const char * const pcHeader = "Task            Abs Time      % Time\r\n*********
        configASSERT( pcWriteBuffer );\r
 \r
        /* Generate a table of task stats. */\r
-       strcpy( ( char * ) pcWriteBuffer, pcHeader );\r
-       vTaskGetRunTimeStats( ( ( char * ) pcWriteBuffer ) + strlen( 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
@@ -245,9 +245,9 @@ const char * const pcHeader = "Task            Abs Time      % Time\r\n*********
 }\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
@@ -262,7 +262,7 @@ static portBASE_TYPE lParameterNumber = 0;
        {\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
@@ -275,21 +275,21 @@ static portBASE_TYPE lParameterNumber = 0;
        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, 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
@@ -312,9 +312,9 @@ static portBASE_TYPE lParameterNumber = 0;
 }\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
@@ -329,7 +329,7 @@ static portBASE_TYPE lParameterNumber = 0;
        {\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
@@ -342,20 +342,20 @@ static portBASE_TYPE lParameterNumber = 0;
        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, 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
@@ -381,9 +381,9 @@ static portBASE_TYPE lParameterNumber = 0;
 \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
+       char *pcParameter;\r
        portBASE_TYPE lParameterStringLength;\r
 \r
                /* Remove compile time warnings about unused parameters, and check the\r
@@ -394,12 +394,12 @@ static portBASE_TYPE lParameterNumber = 0;
                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
@@ -412,17 +412,17 @@ static portBASE_TYPE lParameterNumber = 0;
                        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
index ac17672bdaaa8b8244831ad6ac6ed078debf6930..dff842fdb5f0136da7e067d5b162874b9c532c69 100644 (file)
@@ -84,9 +84,9 @@ static void prvUARTCommandConsoleTask( void *pvParameters );
 /*-----------------------------------------------------------*/\r
 \r
 /* Const messages output by the command console. */\r
-static const signed char * const pcWelcomeMessage = "FreeRTOS command server.\r\nType Help to view a list of registered commands.\r\n\r\n>";\r
-static const signed char * const pcEndOfOutputMessage = "\r\n[Press ENTER to execute the previous command again]\r\n>";\r
-static const signed char * const pcNewLine = "\r\n";\r
+static const char * const pcWelcomeMessage = "FreeRTOS command server.\r\nType Help to view a list of registered commands.\r\n\r\n>";\r
+static const char * const pcEndOfOutputMessage = "\r\n[Press ENTER to execute the previous command again]\r\n>";\r
+static const char * const pcNewLine = "\r\n";\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -104,8 +104,8 @@ void vUARTCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPr
 \r
 static void prvUARTCommandConsoleTask( void *pvParameters )\r
 {\r
-int8_t cRxedChar, cInputIndex = 0, *pcOutputString;\r
-static int8_t cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
+char cRxedChar, cInputIndex = 0, *pcOutputString;\r
+static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
 portBASE_TYPE xReturned;\r
 \r
        ( void ) pvParameters;\r
@@ -116,12 +116,12 @@ portBASE_TYPE xReturned;
        pcOutputString = FreeRTOS_CLIGetOutputBuffer();\r
 \r
        /* Send the welcome message. */\r
-       vSerialPutString( NULL, pcWelcomeMessage, strlen( ( char * ) pcWelcomeMessage ) );\r
+       vSerialPutString( NULL, ( const signed char * ) pcWelcomeMessage, strlen( ( char * ) pcWelcomeMessage ) );\r
 \r
        for( ;; )\r
        {\r
                /* Only interested in reading one character at a time. */\r
-               while( xSerialGetChar( NULL, &cRxedChar, portMAX_DELAY ) == pdFALSE );\r
+               while( xSerialGetChar( NULL, ( signed char * ) &cRxedChar, portMAX_DELAY ) == pdFALSE );\r
 \r
                /* Echo the character back. */\r
                xSerialPutChar( NULL, cRxedChar, portMAX_DELAY );\r
@@ -130,7 +130,7 @@ portBASE_TYPE xReturned;
                if( cRxedChar == '\n' || cRxedChar == '\r' )\r
                {\r
                        /* Just to space the output from the input. */\r
-                       vSerialPutString( NULL, pcNewLine, strlen( ( char * ) pcNewLine ) );\r
+                       vSerialPutString( NULL, ( const signed char * ) pcNewLine, strlen( ( char * ) pcNewLine ) );\r
 \r
                        /* See if the command is empty, indicating that the last command is\r
                        to be executed again. */\r
@@ -150,7 +150,7 @@ portBASE_TYPE xReturned;
                                xReturned = FreeRTOS_CLIProcessCommand( cInputString, pcOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE );\r
 \r
                                /* Write the generated string to the UART. */\r
-                               vSerialPutString( NULL, pcOutputString, strlen( ( char * ) pcOutputString ) );\r
+                               vSerialPutString( NULL, ( const signed char * ) pcOutputString, strlen( ( char * ) pcOutputString ) );\r
 \r
                        } while( xReturned != pdFALSE );\r
 \r
@@ -161,7 +161,7 @@ portBASE_TYPE xReturned;
                        strcpy( ( char * ) cLastInputString, ( char * ) cInputString );\r
                        cInputIndex = 0;\r
                        memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
-                       vSerialPutString( NULL, pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
+                       vSerialPutString( NULL, ( const signed char * ) pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
                }\r
                else\r
                {\r
index b9257c814dcdc0700853910462a4864e10dff7fc..9e39bb3ded14deb4d9b497473d8478a3cd383176 100644 (file)
@@ -1,5 +1,5 @@
 /*\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
@@ -122,8 +122,8 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port
 \r
        /* Create the queues used to hold Rx/Tx characters.  Note the comments at\r
        the top of this file regarding the use of queues in this manner. */\r
-       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
-       xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+       xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( char ) );\r
+       xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( char ) );\r
 \r
        /* If the queues were created correctly then setup the serial port\r
        hardware. */\r
@@ -177,14 +177,14 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedC
 \r
 void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
 {\r
-signed char *pxNext;\r
+char *pxNext;\r
 \r
        /* A couple of parameters that this port does not use. */\r
        ( void ) usStringLength;\r
        ( void ) pxPort;\r
 \r
        /* Send each character in the string, one at a time. */\r
-       pxNext = ( signed char * ) pcString;\r
+       pxNext = ( char * ) pcString;\r
        while( *pxNext )\r
        {\r
                xSerialPutChar( pxPort, *pxNext, portMAX_DELAY );\r
index f70a208c4381261ade14d412b70c7ce4a87c6436..bce7c40dd70260e85098a4ece753da75c4db328e 100644 (file)
 /*\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
@@ -139,8 +139,8 @@ static const CLI_Command_Definition_t xRunTimeStats =
 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
@@ -150,8 +150,8 @@ takes exactly three parameters that the command simply echos back one at a
 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
@@ -161,8 +161,8 @@ takes a variable number of parameters that the command simply echos back one at
 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
@@ -172,8 +172,8 @@ static const CLI_Command_Definition_t xParameterEcho =
        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
@@ -197,7 +197,7 @@ void vRegisterSampleCLICommands( void )
 }\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 char *const pcHeader = "Task          State  Priority  Stack     #\r\n************************************************\r\n";\r
 \r
@@ -209,8 +209,8 @@ const char *const pcHeader = "Task          State  Priority  Stack  #\r\n********
        configASSERT( pcWriteBuffer );\r
 \r
        /* Generate a table of task stats. */\r
-       strcpy( ( char * ) pcWriteBuffer, 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
@@ -218,7 +218,7 @@ const char *const pcHeader = "Task          State  Priority  Stack  #\r\n********
 }\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 char * const pcHeader = "Task            Abs Time      % Time\r\n****************************************\r\n";\r
 \r
@@ -230,8 +230,8 @@ const char * const pcHeader = "Task            Abs Time      % Time\r\n*********
        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
@@ -239,9 +239,9 @@ const char * const pcHeader = "Task            Abs Time      % Time\r\n*********
 }\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
@@ -256,7 +256,7 @@ static portBASE_TYPE lParameterNumber = 0;
        {\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
@@ -269,21 +269,21 @@ static portBASE_TYPE lParameterNumber = 0;
        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, 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
@@ -306,9 +306,9 @@ static portBASE_TYPE lParameterNumber = 0;
 }\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
@@ -323,7 +323,7 @@ static portBASE_TYPE lParameterNumber = 0;
        {\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
@@ -336,20 +336,20 @@ static portBASE_TYPE lParameterNumber = 0;
        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
@@ -375,9 +375,9 @@ static portBASE_TYPE lParameterNumber = 0;
 \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
@@ -388,12 +388,12 @@ static portBASE_TYPE lParameterNumber = 0;
                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
@@ -406,17 +406,17 @@ static portBASE_TYPE lParameterNumber = 0;
                        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
index e561b9c4b125b4343e0f3e1d672b34a333c75907..b488d016e542812f5449ff9867289c2c8dc77fa1 100644 (file)
@@ -105,7 +105,7 @@ static void prvUARTCommandConsoleTask( void *pvParameters );
  * Ensure a previous interrupt driven Tx has completed before sending the next\r
  * data block to the UART.\r
  */\r
-static void prvSendBuffer( struct usart_module *pxCDCUsart, uint8_t * pcBuffer, size_t xBufferLength );\r
+static void prvSendBuffer( struct usart_module *pxCDCUsart, const char * pcBuffer, size_t xBufferLength );\r
 \r
 /*\r
  * Register the 'standard' sample CLI commands with FreeRTOS+CLI.\r
@@ -129,9 +129,9 @@ static void prvUARTRxNotificationHandler( const struct usart_module *const pxUSA
 /*-----------------------------------------------------------*/\r
 \r
 /* Const messages output by the command console. */\r
-static uint8_t * const pcWelcomeMessage = ( uint8_t * ) "\r\n\r\nFreeRTOS command server.\r\nType Help to view a list of registered commands.\r\n\r\n>";\r
-static const uint8_t * const pcEndOfOutputMessage = ( uint8_t * ) "\r\n[Press ENTER to execute the previous command again]\r\n>";\r
-static const uint8_t * const pcNewLine = ( uint8_t * ) "\r\n";\r
+static char * const pcWelcomeMessage = "\r\n\r\nFreeRTOS command server.\r\nType Help to view a list of registered commands.\r\n\r\n>";\r
+static const char * const pcEndOfOutputMessage = "\r\n[Press ENTER to execute the previous command again]\r\n>";\r
+static const char * const pcNewLine = "\r\n";\r
 \r
 /* This semaphore is used to allow the task to wait for a Tx to complete\r
 without wasting any CPU time. */\r
@@ -159,8 +159,9 @@ void vUARTCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPr
 \r
 static void prvUARTCommandConsoleTask( void *pvParameters )\r
 {\r
-uint8_t ucRxedChar, ucInputIndex = 0, *pucOutputString;\r
-static int8_t cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
+char cRxedChar, *pcOutputString;\r
+uint8_t ucInputIndex = 0;\r
+static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
 portBASE_TYPE xReturned;\r
 static struct usart_module xCDCUsart; /* Static so it doesn't take up too much stack. */\r
 \r
@@ -174,7 +175,7 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
        /* Obtain the address of the output buffer.  Note there is no mutual\r
        exclusion on this buffer as it is assumed only one command console\r
        interface will be used at any one time. */\r
-       pucOutputString = ( uint8_t * ) FreeRTOS_CLIGetOutputBuffer();\r
+       pcOutputString = FreeRTOS_CLIGetOutputBuffer();\r
 \r
        /* Send the welcome message. */\r
        prvSendBuffer( &xCDCUsart, pcWelcomeMessage, strlen( ( char * ) pcWelcomeMessage ) );\r
@@ -183,17 +184,17 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
        {\r
                /* Wait for the next character to arrive.  A semaphore is used to\r
                ensure no CPU time is used until data has arrived. */\r
-               usart_read_buffer_job( &xCDCUsart, &ucRxedChar, sizeof( ucRxedChar ) );         \r
+               usart_read_buffer_job( &xCDCUsart, ( uint8_t * ) &cRxedChar, sizeof( cRxedChar ) );             \r
                if( xSemaphoreTake( xRxCompleteSemaphore, portMAX_DELAY ) == pdPASS )\r
                {\r
                        /* Echo the character back. */\r
-                       prvSendBuffer( &xCDCUsart, ( uint8_t * ) &ucRxedChar, sizeof( ucRxedChar ) );\r
+                       prvSendBuffer( &xCDCUsart, &cRxedChar, sizeof( cRxedChar ) );\r
 \r
                        /* Was it the end of the line? */\r
-                       if( ucRxedChar == '\n' || ucRxedChar == '\r' )\r
+                       if( cRxedChar == '\n' || cRxedChar == '\r' )\r
                        {\r
                                /* Just to space the output from the input. */\r
-                               prvSendBuffer( &xCDCUsart, ( uint8_t * ) pcNewLine, strlen( ( char * ) pcNewLine ) );\r
+                               prvSendBuffer( &xCDCUsart, pcNewLine, strlen( pcNewLine ) );\r
 \r
                                /* See if the command is empty, indicating that the last command is\r
                                to be executed again. */\r
@@ -210,10 +211,10 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
                                do\r
                                {\r
                                        /* Get the next output string from the command interpreter. */\r
-                                       xReturned = FreeRTOS_CLIProcessCommand( cInputString, ( int8_t * ) pucOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE );\r
+                                       xReturned = FreeRTOS_CLIProcessCommand( cInputString, pcOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE );\r
 \r
                                        /* Write the generated string to the UART. */\r
-                                       prvSendBuffer( &xCDCUsart, ( uint8_t * ) pucOutputString, strlen( ( char * ) pucOutputString ) );\r
+                                       prvSendBuffer( &xCDCUsart, pcOutputString, strlen( pcOutputString ) );\r
 \r
                                } while( xReturned != pdFALSE );\r
 \r
@@ -225,15 +226,15 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
                                ucInputIndex = 0;\r
                                memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
 \r
-                               prvSendBuffer( &xCDCUsart, ( uint8_t * ) pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
+                               prvSendBuffer( &xCDCUsart, pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
                        }\r
                        else\r
                        {\r
-                               if( ucRxedChar == '\r' )\r
+                               if( cRxedChar == '\r' )\r
                                {\r
                                        /* Ignore the character. */\r
                                }\r
-                               else if( ( ucRxedChar == '\b' ) || ( ucRxedChar == cmdASCII_DEL ) )\r
+                               else if( ( cRxedChar == '\b' ) || ( cRxedChar == cmdASCII_DEL ) )\r
                                {\r
                                        /* Backspace was pressed.  Erase the last character in the\r
                                        string - if any. */\r
@@ -248,11 +249,11 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
                                        /* A character was entered.  Add it to the string\r
                                        entered so far.  When a \n is entered the complete\r
                                        string will be passed to the command interpreter. */\r
-                                       if( ( ucRxedChar >= ' ' ) && ( ucRxedChar <= '~' ) )\r
+                                       if( ( cRxedChar >= ' ' ) && ( cRxedChar <= '~' ) )\r
                                        {\r
                                                if( ucInputIndex < cmdMAX_INPUT_SIZE )\r
                                                {\r
-                                                       cInputString[ ucInputIndex ] = ucRxedChar;\r
+                                                       cInputString[ ucInputIndex ] = cRxedChar;\r
                                                        ucInputIndex++;\r
                                                }\r
                                        }\r
@@ -263,13 +264,13 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvSendBuffer( struct usart_module *pxCDCUsart, uint8_t * pcBuffer, size_t xBufferLength )\r
+static void prvSendBuffer( struct usart_module *pxCDCUsart, const char * pcBuffer, size_t xBufferLength )\r
 {\r
 const portTickType xBlockMax100ms = 100UL / portTICK_RATE_MS;\r
 \r
        if( xBufferLength > 0 )\r
        {               \r
-               usart_write_buffer_job( pxCDCUsart, pcBuffer, xBufferLength );\r
+               usart_write_buffer_job( pxCDCUsart, ( uint8_t * ) pcBuffer, xBufferLength );\r
                \r
                /* Wait for the Tx to complete so the buffer can be reused without\r
                corrupting the data that is being sent. */\r
index e99e57528e5c2f1205c651332f07e07607e7f0a7..13d5e1bdbf48f5997e7308f9ee3a5cbf1a634e90 100644 (file)
@@ -1,5 +1,5 @@
 /*\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
     FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\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
-                                                       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
@@ -154,8 +154,8 @@ static const CLI_Command_Definition_t xDIR =
 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
@@ -164,8 +164,8 @@ static const CLI_Command_Definition_t xCD =
 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
@@ -173,8 +173,8 @@ static const CLI_Command_Definition_t xTYPE =
 /* 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
@@ -182,8 +182,8 @@ static const CLI_Command_Definition_t xDEL =
 /* 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
@@ -201,9 +201,9 @@ void vRegisterFileSystemCLICommands( void )
 }\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
@@ -227,12 +227,12 @@ size_t xColumns = 50U;
        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
@@ -257,7 +257,7 @@ size_t xColumns = 50U;
                        }\r
                        else\r
                        {\r
-                               pcWriteBuffer[ xByte ] = ( int8_t ) iChar;\r
+                               pcWriteBuffer[ xByte ] = ( char ) iChar;\r
                        }\r
                }\r
        }\r
@@ -269,51 +269,51 @@ size_t xColumns = 50U;
                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
@@ -343,12 +343,12 @@ portBASE_TYPE xReturn = pdFALSE;
                        }\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
@@ -373,15 +373,15 @@ portBASE_TYPE 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 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
@@ -389,12 +389,12 @@ unsigned char ucReturned;
        ( 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
@@ -404,43 +404,44 @@ unsigned char ucReturned;
 \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
+const char *pcDestinationFile;\r
+char *pcSourceFile;\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
@@ -449,20 +450,20 @@ long lSourceLength, lDestinationLength = 0;
        pcSourceFile[ xParameterStringLength ] = 0x00;\r
 \r
        /* See if the source file exists, obtain its length if it does. */\r
-       lSourceLength = f_filelength( ( const char * ) pcSourceFile );\r
+       lSourceLength = f_filelength( 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
                /* See if the destination file exists. */\r
-               lDestinationLength = f_filelength( ( const char * ) pcDestinationFile );\r
+               lDestinationLength = f_filelength( pcDestinationFile );\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
@@ -472,25 +473,25 @@ long lSourceLength, lDestinationLength = 0;
        {\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
@@ -551,7 +552,7 @@ portBASE_TYPE xReturn = pdPASS;
 }\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
@@ -572,5 +573,5 @@ const char * pcAttrib;
 \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
index 9fd423f8a36209d741af8bc0e4be11f8e8236104..1df4ab16facab65a0a5be40c20321fe9f6c13c17 100644 (file)
 /*\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
@@ -139,8 +139,8 @@ static const CLI_Command_Definition_t xRunTimeStats =
 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
@@ -150,8 +150,8 @@ takes exactly three parameters that the command simply echos back one at a
 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
@@ -161,8 +161,8 @@ takes a variable number of parameters that the command simply echos back one at
 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
@@ -172,8 +172,8 @@ static const CLI_Command_Definition_t xParameterEcho =
        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
@@ -197,7 +197,7 @@ void vRegisterSampleCLICommands( void )
 }\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 char *const pcHeader = "Task          State  Priority  Stack     #\r\n************************************************\r\n";\r
 \r
@@ -218,7 +218,7 @@ const char *const pcHeader = "Task          State  Priority  Stack  #\r\n********
 }\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 char * const pcHeader = "Task            Abs Time      % Time\r\n****************************************\r\n";\r
 \r
@@ -239,7 +239,7 @@ const char * const pcHeader = "Task            Abs Time      % Time\r\n*********
 }\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
 portBASE_TYPE xParameterStringLength, xReturn;\r
@@ -306,7 +306,7 @@ static portBASE_TYPE lParameterNumber = 0;
 }\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
 portBASE_TYPE xParameterStringLength, xReturn;\r
@@ -375,7 +375,7 @@ static portBASE_TYPE lParameterNumber = 0;
 \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
        portBASE_TYPE lParameterStringLength;\r
index 6f0cab30a35cd2874c7ea1768a537bd2f2515599..c5555eff38eb6a2d7f863ca41cf75eb55d4dc1fe 100644 (file)
@@ -101,7 +101,7 @@ static void prvUARTCommandConsoleTask( void *pvParameters );
  * Ensure a previous interrupt driven Tx has completed before sending the next\r
  * data block to the UART.\r
  */\r
-static void prvSendBuffer( const uint8_t * pcBuffer, size_t xBufferLength );\r
+static void prvSendBuffer( const char * pcBuffer, size_t xBufferLength );\r
 \r
 /*\r
  * A UART is used for printf() output and CLI input and output.  Configure the\r
@@ -113,9 +113,9 @@ static void prvUARTRxNotificationHandler( mss_uart_instance_t * this_uart );
 /*-----------------------------------------------------------*/\r
 \r
 /* Const messages output by the command console. */\r
-static const uint8_t * const pcWelcomeMessage = ( uint8_t * ) "\r\n\r\nFreeRTOS command server.\r\nType Help to view a list of registered commands.\r\n\r\n>";\r
-static const uint8_t * const pcEndOfOutputMessage = ( uint8_t * ) "\r\n[Press ENTER to execute the previous command again]\r\n>";\r
-static const uint8_t * const pcNewLine = ( uint8_t * ) "\r\n";\r
+static const char * const pcWelcomeMessage = "\r\n\r\nFreeRTOS command server.\r\nType Help to view a list of registered commands.\r\n\r\n>";\r
+static const char * const pcEndOfOutputMessage = "\r\n[Press ENTER to execute the previous command again]\r\n>";\r
+static const char * const pcNewLine = "\r\n";\r
 \r
 /* The UART used by the CLI. */\r
 #if configBUILD_FOR_DEVELOPMENT_KIT == 1\r
@@ -152,8 +152,9 @@ void vUARTCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPr
 \r
 static void prvUARTCommandConsoleTask( void *pvParameters )\r
 {\r
-int8_t cRxedChar, cInputIndex = 0, *pcOutputString;\r
-static int8_t cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
+char cRxedChar, *pcOutputString;\r
+unsigned char cInputIndex = 0;\r
+static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
 portBASE_TYPE xReturned;\r
 \r
        ( void ) pvParameters;\r
@@ -172,13 +173,13 @@ portBASE_TYPE xReturned;
                if( xQueueReceive( xRxedChars, &cRxedChar, portMAX_DELAY ) == pdPASS )\r
                {\r
                        /* Echo the character back. */\r
-                       prvSendBuffer( ( uint8_t * ) &cRxedChar, sizeof( cRxedChar ) );\r
+                       prvSendBuffer( &cRxedChar, sizeof( cRxedChar ) );\r
 \r
                        /* Was it the end of the line? */\r
                        if( cRxedChar == '\n' || cRxedChar == '\r' )\r
                        {\r
                                /* Just to space the output from the input. */\r
-                               prvSendBuffer( ( uint8_t * ) pcNewLine, strlen( ( char * ) pcNewLine ) );\r
+                               prvSendBuffer( pcNewLine, strlen( ( char * ) pcNewLine ) );\r
 \r
                                /* See if the command is empty, indicating that the last command is\r
                                to be executed again. */\r
@@ -198,7 +199,7 @@ portBASE_TYPE xReturned;
                                        xReturned = FreeRTOS_CLIProcessCommand( cInputString, pcOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE );\r
 \r
                                        /* Write the generated string to the UART. */\r
-                                       prvSendBuffer( ( uint8_t * ) pcOutputString, strlen( ( char * ) pcOutputString ) );\r
+                                       prvSendBuffer( pcOutputString, strlen( pcOutputString ) );\r
 \r
                                } while( xReturned != pdFALSE );\r
 \r
@@ -210,7 +211,7 @@ portBASE_TYPE xReturned;
                                cInputIndex = 0;\r
                                memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
 \r
-                               prvSendBuffer( ( uint8_t * ) pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
+                               prvSendBuffer( pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
                        }\r
                        else\r
                        {\r
@@ -248,13 +249,13 @@ portBASE_TYPE xReturned;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvSendBuffer( const uint8_t * pcBuffer, size_t xBufferLength )\r
+static void prvSendBuffer( const char * pcBuffer, size_t xBufferLength )\r
 {\r
 const portTickType xVeryShortDelay = 2UL;\r
 \r
        if( xBufferLength > 0 )\r
        {\r
-               MSS_UART_irq_tx( ( mss_uart_instance_t * ) pxUART, pcBuffer, xBufferLength );\r
+               MSS_UART_irq_tx( ( mss_uart_instance_t * ) pxUART, ( uint8_t * ) pcBuffer, xBufferLength );\r
 \r
                /* Ensure any previous transmissions have completed.  The default UART\r
                interrupt does not provide an event based method of     signally the end of a Tx\r
@@ -292,13 +293,13 @@ static void prvConfigureUART( void )
 \r
 static void prvUARTRxNotificationHandler( mss_uart_instance_t * pxUART )\r
 {\r
-uint8_t cRxed;\r
+char cRxed;\r
 portBASE_TYPE xHigherPriorityTaskWoken;\r
 \r
        /* The command console receives data very slowly (at the speed of somebody\r
        typing), therefore it is ok to just handle one character at a time and use\r
        a queue to send the characters to the task. */\r
-       if( MSS_UART_get_rx( pxUART, &cRxed, sizeof( cRxed ) ) == sizeof( cRxed ) )\r
+       if( MSS_UART_get_rx( pxUART, ( uint8_t * ) &cRxed, sizeof( cRxed ) ) == sizeof( cRxed ) )\r
        {\r
                xHigherPriorityTaskWoken = pdFALSE;\r
                xQueueSendFromISR( xRxedChars, &cRxed, &xHigherPriorityTaskWoken );\r