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

32 files changed:
FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c
FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c
FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c
FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c
FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c
FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c
FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DNS.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_DNS.h
FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_Sockets.h
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/File-system-demo.c
FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/Sample-CLI-commands.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_M4_ATSAM4E_Atmel_Studio/Read_Me_Instructions.url [new file with mode: 0644]
FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-releated-CLI-commands.c
FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/Full-Demo/File-system-demo.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 828d7e26c74b6a28286249cfe7fe3e63101abdf2..0f840a68834b355286304295d7a6afda1483fd05 100644 (file)
@@ -230,7 +230,7 @@ size_t xColumns = 50U;
                configASSERT( pcParameter );\r
 \r
                /* Attempt to open the requested file. */\r
-               pxFile = f_open( ( const char * ) pcParameter, "r" );\r
+               pxFile = f_open( pcParameter, "r" );\r
        }\r
 \r
        if( pxFile != NULL )\r
@@ -392,7 +392,7 @@ unsigned char ucReturned;
        configASSERT( pcParameter );\r
 \r
        /* Attempt to delete the file. */\r
-       ucReturned = f_delete( ( const char * ) pcParameter );\r
+       ucReturned = f_delete( pcParameter );\r
 \r
        if( ucReturned == F_NO_ERROR )\r
        {\r
@@ -416,23 +416,23 @@ portBASE_TYPE xParameterStringLength;
 long lSourceLength, lDestinationLength = 0;\r
 \r
        /* Obtain the name of the destination file. */\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
+       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 = 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
@@ -441,7 +441,7 @@ 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
@@ -450,7 +450,7 @@ long lSourceLength, lDestinationLength = 0;
        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
@@ -509,7 +509,7 @@ portBASE_TYPE xReturn = pdPASS;
                /* Open the source file, seek past the data that has already been\r
                read from the file, read the next block of data, then close the\r
                file again so the destination file can be opened. */\r
-               pxFile = f_open( ( const char * ) pcSourceFile, "r" );\r
+               pxFile = f_open( pcSourceFile, "r" );\r
                if( pxFile != NULL )\r
                {\r
                        f_seek( pxFile, lBytesRead, F_SEEK_SET );\r
@@ -524,7 +524,7 @@ portBASE_TYPE xReturn = pdPASS;
 \r
                /* Open the destination file and write the block of data to the end of\r
                the file. */\r
-               pxFile = f_open( ( const char * ) pcDestinationFile, "a" );\r
+               pxFile = f_open( pcDestinationFile, "a" );\r
                if( pxFile != NULL )\r
                {\r
                        f_write( pxWriteBuffer, lBytesToRead, 1, pxFile );\r
index 39939347ec5901375f5a6e8b1c0bc5a76eeee2a4..1947030180fca875b662e6dafb0da0e493bd3889 100644 (file)
@@ -274,7 +274,7 @@ static portBASE_TYPE lParameterNumber = 0;
                /* Return the parameter string. */\r
                memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-               strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -340,7 +340,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        /* Return the parameter string. */\r
                        memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                        sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-                       strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -391,7 +391,7 @@ static portBASE_TYPE lParameterNumber = 0;
                configASSERT( pcParameter );\r
 \r
                /* There are only two valid parameter values. */\r
-               if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+               if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
                {\r
                        /* Start or restart the trace. */\r
                        vTraceStop();\r
@@ -400,7 +400,7 @@ static portBASE_TYPE lParameterNumber = 0;
 \r
                        sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
                }\r
-               else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+               else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
                {\r
                        /* End the trace, if one is running. */\r
                        vTraceStop();\r
index 311e756df000269912e4be5237dda84b60baf00d..39feb797351d8a7ce122ac8a5c14659674a89c5b 100644 (file)
@@ -164,7 +164,7 @@ void vRegisterUDPCLICommands( void )
 \r
        static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
        {\r
-       const char * pcParameter;\r
+       char * pcParameter;\r
        portBASE_TYPE lParameterStringLength, xReturn;\r
        uint32_t ulIPAddress, ulBytesToPing;\r
        const uint32_t ulDefaultBytesToPing = 8UL;\r
@@ -181,12 +181,12 @@ void vRegisterUDPCLICommands( void )
                pcWriteBuffer[ 0 ] = 0x00;\r
 \r
                /* Obtain the number of bytes to ping. */\r
-               pcParameter = FreeRTOS_CLIGetParameter\r
-                                               (\r
-                                                       pcCommandString,                /* The command string itself. */\r
-                                                       2,                                              /* Return the second parameter. */\r
-                                                       &lParameterStringLength /* Store the parameter string length. */\r
-                                               );\r
+               pcParameter = ( char * ) FreeRTOS_CLIGetParameter\r
+                                                               (\r
+                                                                       pcCommandString,                /* The command string itself. */\r
+                                                                       2,                                              /* Return the second parameter. */\r
+                                                                       &lParameterStringLength /* Store the parameter string length. */\r
+                                                               );\r
 \r
                if( pcParameter == NULL )\r
                {\r
@@ -195,16 +195,16 @@ void vRegisterUDPCLICommands( void )
                }\r
                else\r
                {\r
-                       ulBytesToPing = atol( ( const char * ) pcParameter );\r
+                       ulBytesToPing = atol( pcParameter );\r
                }\r
 \r
                /* Obtain the IP address string. */\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
+               pcParameter = ( char * ) FreeRTOS_CLIGetParameter\r
+                                                               (\r
+                                                                       pcCommandString,                /* The command string itself. */\r
+                                                                       1,                                              /* Return the first parameter. */\r
+                                                                       &lParameterStringLength /* Store the parameter string length. */\r
+                                                               );\r
 \r
                /* Sanity check something was returned. */\r
                configASSERT( pcParameter );\r
@@ -213,7 +213,7 @@ void vRegisterUDPCLICommands( void )
                digit, assume the host name has been passed in. */\r
                if( ( *pcParameter >= '0' ) && ( *pcParameter <= '9' ) )\r
                {\r
-                       ulIPAddress = FreeRTOS_inet_addr( ( const uint8_t * ) pcParameter );\r
+                       ulIPAddress = FreeRTOS_inet_addr( pcParameter );\r
                }\r
                else\r
                {\r
@@ -221,7 +221,7 @@ void vRegisterUDPCLICommands( void )
                        pcParameter[ lParameterStringLength ] = 0x00;\r
 \r
                        /* Attempt to resolve host. */\r
-                       ulIPAddress = FreeRTOS_gethostbyname( ( uint8_t * ) pcParameter );\r
+                       ulIPAddress = FreeRTOS_gethostbyname( pcParameter );\r
                }\r
 \r
                /* Convert IP address, which may have come from a DNS lookup, to string. */\r
index 3d238ad99a1cc5818a5c75c960d703c12316db9b..6d4627d631348b519099aa51918f1176b59e441e 100644 (file)
@@ -285,7 +285,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
 \r
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
@@ -311,7 +311,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
 \r
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcRoot ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcRoot ) == 0 );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -328,7 +328,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
 \r
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
index 8446604cb61425aa1a3bf8bc84b694af6b8e4685..6119a1a91a4a086b887273f47870eb996d00c355 100644 (file)
@@ -333,7 +333,7 @@ static portBASE_TYPE lParameterNumber = 0;
                /* Return the parameter string. */\r
                memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-               strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -399,7 +399,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        /* Return the parameter string. */\r
                        memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                        sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-                       strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -459,7 +459,7 @@ static portBASE_TYPE lParameterNumber = 0;
                }\r
                else\r
                {\r
-                       ulBytesToPing = atol( ( const char * ) pcParameter );\r
+                       ulBytesToPing = atol( pcParameter );\r
                }\r
 \r
                /* Obtain the IP address string. */\r
@@ -477,7 +477,7 @@ static portBASE_TYPE lParameterNumber = 0;
                digit, assume the host name has been passed in. */\r
                if( ( *pcParameter >= '0' ) && ( *pcParameter <= '9' ) )\r
                {\r
-                       ulIPAddress = FreeRTOS_inet_addr( ( const uint8_t * ) pcParameter );\r
+                       ulIPAddress = FreeRTOS_inet_addr( pcParameter );\r
                }\r
                else\r
                {\r
@@ -485,7 +485,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        pcParameter[ lParameterStringLength ] = 0x00;\r
 \r
                        /* Attempt to resolve host. */\r
-                       ulIPAddress = FreeRTOS_gethostbyname( ( uint8_t * ) pcParameter );\r
+                       ulIPAddress = FreeRTOS_gethostbyname( pcParameter );\r
                }\r
 \r
                /* Convert IP address, which may have come from a DNS lookup, to string. */\r
@@ -639,7 +639,7 @@ uint32_t ulAddress;
                configASSERT( pcParameter );\r
 \r
                /* There are only two valid parameter values. */\r
-               if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+               if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
                {\r
                        /* Start or restart the trace. */\r
                        vTraceStop();\r
index 819d13bfb4f5fbd614af5819b63e0994a4a62fea..3677908a38a3a0d9a7940aeaf55674e92a800cef 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
@@ -108,7 +108,7 @@ void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, uns
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-/* \r
+/*\r
  * Task that provides the input and output for the FreeRTOS+CLI command\r
  * interpreter.  In this case a UDP port is used.  See the URL in the comments\r
  * within main.c for the location of the online documentation.\r
@@ -117,7 +117,7 @@ void vUDPCommandInterpreterTask( void *pvParameters )
 {\r
 long lBytes, lByte;\r
 signed char cInChar, cInputIndex = 0;\r
-static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
+static char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
 portBASE_TYPE xMoreDataToFollow;\r
 struct freertos_sockaddr xClient;\r
 socklen_t xClientAddressLength = 0; /* This is required as a parameter to maintain the sendto() Berkeley sockets API - but it is not actually used so can take any value. */\r
@@ -152,25 +152,25 @@ xSocket_t xSocket;
                                        string. */\r
                                        if( cInChar == '\n' )\r
                                        {\r
-                                               /* Process the input string received prior to the \r
+                                               /* Process the input string received prior to the\r
                                                newline. */\r
                                                do\r
                                                {\r
                                                        /* Pass the string to FreeRTOS+CLI. */\r
                                                        xMoreDataToFollow = FreeRTOS_CLIProcessCommand( cInputString, cOutputString, cmdMAX_OUTPUT_SIZE );\r
-                                                       \r
+\r
                                                        /* Send the output generated by the command's\r
                                                        implementation. */\r
-                                                       FreeRTOS_sendto( xSocket, cOutputString,  strlen( ( const char * ) cOutputString ), 0, &xClient, xClientAddressLength );\r
+                                                       FreeRTOS_sendto( xSocket, cOutputString,  strlen( cOutputString ), 0, &xClient, xClientAddressLength );\r
 \r
                                                } while( xMoreDataToFollow != pdFALSE ); /* Until the command does not generate any more output. */\r
 \r
-                                               /* All the strings generated by the command processing \r
-                                               have been sent.  Clear the input string ready to receive \r
+                                               /* All the strings generated by the command processing\r
+                                               have been sent.  Clear the input string ready to receive\r
                                                the next command. */\r
                                                cInputIndex = 0;\r
                                                memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
-                                               \r
+\r
                                                /* Transmit a spacer, just to make the command console\r
                                                easier to read. */\r
                                                FreeRTOS_sendto( xSocket, "\r\n",  strlen( "\r\n" ), 0, &xClient, xClientAddressLength );\r
@@ -179,12 +179,12 @@ xSocket_t xSocket;
                                        {\r
                                                if( cInChar == '\r' )\r
                                                {\r
-                                                       /* Ignore the character.  Newlines are used to \r
+                                                       /* Ignore the character.  Newlines are used to\r
                                                        detect the end of the input string. */\r
                                                }\r
                                                else if( cInChar == '\b' )\r
                                                {\r
-                                                       /* Backspace was pressed.  Erase the last character \r
+                                                       /* Backspace was pressed.  Erase the last character\r
                                                        in the string - if any. */\r
                                                        if( cInputIndex > 0 )\r
                                                        {\r
@@ -206,7 +206,7 @@ xSocket_t xSocket;
                                        }\r
                                }\r
                        }\r
-               } \r
+               }\r
        }\r
        else\r
        {\r
@@ -232,7 +232,7 @@ xSocket_t xSocket = FREERTOS_INVALID_SOCKET;
 \r
                /* Bind the address to the socket. */\r
                if( FreeRTOS_bind( xSocket, &xServer, sizeof( xServer ) ) == -1 )\r
-               {                       \r
+               {\r
                        FreeRTOS_closesocket( xSocket );\r
                        xSocket = FREERTOS_INVALID_SOCKET;\r
                }\r
index b772bb868a5252ce9a911ca5a78d46e28764dc88..cd88b535a13241583021eb3998a27dbc38feec09 100644 (file)
@@ -156,7 +156,7 @@ static void prvEchoClientTask( void *pvParameters )
 {\r
 xSocket_t xSocket;\r
 struct freertos_sockaddr xEchoServerAddress;\r
-int8_t cTxString[ 25 ], cRxString[ 25 ]; /* Make sure the stack is large enough to hold these.  Turn on stack overflow checking during debug to be sure. */\r
+char cTxString[ 25 ], cRxString[ 25 ]; /* Make sure the stack is large enough to hold these.  Turn on stack overflow checking during debug to be sure. */\r
 int32_t lLoopCount = 0UL;\r
 const int32_t lMaxLoopCount = 50;\r
 volatile uint32_t ulRxCount = 0UL, ulTxCount = 0UL;\r
@@ -188,7 +188,7 @@ uint32_t xAddressLength = sizeof( xEchoServerAddress );
                for( lLoopCount = 0; lLoopCount < lMaxLoopCount; lLoopCount++ )\r
                {\r
                        /* Create the string that is sent to the echo server. */\r
-                       sprintf( ( char * ) cTxString, "Message number %u\r\n", ( unsigned int ) ulTxCount );\r
+                       sprintf( cTxString, "Message number %u\r\n", ( unsigned int ) ulTxCount );\r
 \r
                        /* Send the string to the socket.  ulFlags is set to 0, so the zero\r
                        copy interface is not used.  That means the data from cTxString is\r
@@ -197,7 +197,7 @@ uint32_t xAddressLength = sizeof( xEchoServerAddress );
                        to ensure the NULL string terminator is sent as part of the message. */\r
                        FreeRTOS_sendto( xSocket,                               /* The socket being sent to. */\r
                                                        ( void * ) cTxString,   /* The data being sent. */\r
-                                                       strlen( ( const char * ) cTxString ) + 1, /* The length of the data being sent. */\r
+                                                       strlen( cTxString ) + 1,/* The length of the data being sent. */\r
                                                        0,                                              /* ulFlags with the FREERTOS_ZERO_COPY bit clear. */\r
                                                        &xEchoServerAddress,    /* The destination address. */\r
                                                        sizeof( xEchoServerAddress ) );\r
@@ -223,7 +223,7 @@ uint32_t xAddressLength = sizeof( xEchoServerAddress );
                                                                &xAddressLength );\r
 \r
                        /* Compare the transmitted string to the received string. */\r
-                       if( strcmp( ( char * ) cRxString, ( char * ) cTxString ) == 0 )\r
+                       if( strcmp( cRxString, cTxString ) == 0 )\r
                        {\r
                                /* The echo reply was received without error. */\r
                                ulRxCount++;\r
@@ -244,7 +244,7 @@ static void prvZeroCopyEchoClientTask( void *pvParameters )
 {\r
 xSocket_t xSocket;\r
 struct freertos_sockaddr xEchoServerAddress;\r
-static int8_t cTxString[ 40 ];\r
+static char cTxString[ 40 ];\r
 int32_t lLoopCount = 0UL;\r
 volatile uint32_t ulRxCount = 0UL, ulTxCount = 0UL;\r
 uint32_t xAddressLength = sizeof( xEchoServerAddress );\r
@@ -252,9 +252,9 @@ int32_t lReturned;
 uint8_t *pucUDPPayloadBuffer;\r
 \r
 const int32_t lMaxLoopCount = 50;\r
-const uint8_t * const pucStringToSend = ( const uint8_t * const ) "Zero copy message number";\r
+const char * const pcStringToSend = "Zero copy message number";\r
 /* The buffer is large enough to hold the string, a number, and the string terminator. */\r
-const size_t xBufferLength = strlen( ( char * ) pucStringToSend ) + 15;\r
+const size_t xBufferLength = strlen( pcStringToSend ) + 15;\r
 \r
        #if ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1\r
        {\r
@@ -309,11 +309,11 @@ const size_t xBufferLength = strlen( ( char * ) pucStringToSend ) + 15;
                                /* A buffer was successfully obtained.  Create the string that is\r
                                sent to the echo server.  Note the string is written directly\r
                                into the buffer obtained from the IP stack. */\r
-                               sprintf( ( char * ) pucUDPPayloadBuffer, "%s %u\r\n", ( const char * ) "Zero copy message number", ( unsigned int ) ulTxCount );\r
+                               sprintf( ( char * ) pucUDPPayloadBuffer, "%s %u\r\n", "Zero copy message number", ( unsigned int ) ulTxCount );\r
 \r
                                /* Also copy the string into a local buffer so it can be compared\r
                                with the string that is later received back from the echo server. */\r
-                               strcpy( ( char * ) cTxString, ( char * ) pucUDPPayloadBuffer );\r
+                               strcpy( cTxString, ( char * ) pucUDPPayloadBuffer );\r
 \r
                                /* Pass the buffer into the send function.  ulFlags has the\r
                                FREERTOS_ZERO_COPY bit set so the IP stack will take control of\r
@@ -321,7 +321,7 @@ const size_t xBufferLength = strlen( ( char * ) pucStringToSend ) + 15;
                                echoMARK_SEND_IN_TRACE_BUFFER( xZeroCopySendEvent );\r
                                lReturned = FreeRTOS_sendto(    xSocket,                                        /* The socket being sent to. */\r
                                                                                                ( void * ) pucUDPPayloadBuffer, /* The buffer being passed into the IP stack. */\r
-                                                                                               strlen( ( const char * ) cTxString ) + 1, /* The length of the data being sent.  Plus 1 to ensure the null terminator is part of the data. */\r
+                                                                                               strlen( cTxString ) + 1,        /* The length of the data being sent.  Plus 1 to ensure the null terminator is part of the data. */\r
                                                                                                FREERTOS_ZERO_COPY,                     /* ulFlags with the zero copy bit is set. */\r
                                                                                                &xEchoServerAddress,            /* Where the data is being sent. */\r
                                                                                                sizeof( xEchoServerAddress ) );\r
@@ -372,7 +372,7 @@ const size_t xBufferLength = strlen( ( char * ) pucStringToSend ) + 15;
                                {\r
                                        /* Compare the string sent to the echo server with the string\r
                                        received back from the echo server. */\r
-                                       if( strcmp( ( char * ) pucUDPPayloadBuffer, ( char * ) cTxString ) == 0 )\r
+                                       if( strcmp( ( char * ) pucUDPPayloadBuffer, cTxString ) == 0 )\r
                                        {\r
                                                /* The strings matched. */\r
                                                ulRxCount++;\r
index ab5fd80adb319d4040d882f5c40677c9a6fef208..4aac2f674d95b2f8fab0de4a0e347030437c4072 100644 (file)
@@ -257,7 +257,7 @@ static portBASE_TYPE lParameterNumber = 0;
                /* Return the parameter string. */\r
                memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                sprintf( pcWriteBuffer, "%d: ", lParameterNumber );\r
-               strncat( pcWriteBuffer, ( const char * ) pcParameter, lParameterStringLength );\r
+               strncat( pcWriteBuffer, pcParameter, lParameterStringLength );\r
                strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
 \r
                /* If this is the last of the three parameters then there are no more\r
@@ -323,7 +323,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        /* Return the parameter string. */\r
                        memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                        sprintf( pcWriteBuffer, "%d: ", lParameterNumber );\r
-                       strncat( pcWriteBuffer, ( const char * ) pcParameter, lParameterStringLength );\r
+                       strncat( pcWriteBuffer, pcParameter, lParameterStringLength );\r
                        strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
 \r
                        /* There might be more parameters to return after this one. */\r
@@ -372,7 +372,7 @@ portBASE_TYPE lParameterStringLength;
        configASSERT( pcParameter );\r
 \r
        /* There are only two valid parameter values. */\r
-       if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+       if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
        {\r
                /* Start or restart the trace. */\r
                vTraceStop();\r
@@ -381,7 +381,7 @@ portBASE_TYPE lParameterStringLength;
 \r
                sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
        }\r
-       else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+       else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
        {\r
                /* End the trace, if one is running. */\r
                vTraceStop();\r
index 309877ef2fb53c01005078278b19666b4fe0000e..3c87c1bb568b1da9ad35f65da022b67c8c2e5f2e 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
@@ -94,7 +94,7 @@ struct sockaddr_in xConnection;
 CYASSL* xCyaSSL_Object;\r
 WORD wVersionRequested;\r
 WSADATA xWSAData;\r
-uint8_t cString[ 50 ];\r
+char cString[ 50 ];\r
 portBASE_TYPE lReturned;\r
 uint32_t ulCount = 0UL;\r
 \r
@@ -128,13 +128,13 @@ uint32_t ulCount = 0UL;
                /* Connect to the secure server. */\r
                if( connect( xClientSocket, ( SOCKADDR * ) &xConnection, sizeof( xConnection ) ) == 0 )\r
                {\r
-                       /* The connect was successful.  Create a CyaSSL object to associate \r
+                       /* The connect was successful.  Create a CyaSSL object to associate\r
                        with this connection. */\r
                        xCyaSSL_Object = CyaSSL_new( xCyaSSL_ClientContext );\r
-        \r
+\r
                        if( xCyaSSL_Object != NULL )\r
                        {\r
-                               /* Associate the created CyaSSL object with the connected \r
+                               /* Associate the created CyaSSL object with the connected\r
                                socket. */\r
                                lReturned = CyaSSL_set_fd( xCyaSSL_Object, xClientSocket );\r
                                configASSERT( lReturned == SSL_SUCCESS );\r
@@ -146,14 +146,14 @@ uint32_t ulCount = 0UL;
                                do\r
                                {\r
                                        /* Create the string that is sent to the secure server. */\r
-                                       sprintf( ( char * ) cString, "Message number %lu\r\n", ulCount );\r
+                                       sprintf( cString, "Message number %lu\r\n", ulCount );\r
 \r
-                                       /* The next line is the secure equivalent of the standard \r
+                                       /* The next line is the secure equivalent of the standard\r
                                        sockets call:\r
                                        lReturned = send( xClientSocket, cString, strlen( cString ) + 1, 0 ); */\r
-                                       lReturned = CyaSSL_write( xCyaSSL_Object, ( const char * ) cString, strlen( ( const char * ) cString ) + 1 );\r
-                                       \r
-                                       \r
+                                       lReturned = CyaSSL_write( xCyaSSL_Object, cString, strlen( cString ) + 1 );\r
+\r
+\r
                                        /* Short delay to prevent the messages streaming up the\r
                                        console too quickly. */\r
                                        vTaskDelay( 50 );\r
@@ -161,7 +161,7 @@ uint32_t ulCount = 0UL;
 \r
                                } while( ( lReturned != SOCKET_ERROR ) && ( ulCount < 10UL ) );\r
                        }\r
-                                               \r
+\r
                        CyaSSL_free( xCyaSSL_Object );\r
                        closesocket( xClientSocket );\r
 \r
index 45d8c074a8d288c20de34761c29561b5954dda74..7a6445ab381a653b75d8740286567b1342e93e90 100644 (file)
@@ -244,7 +244,7 @@ size_t xColumns = 50U;
                configASSERT( pcParameter );\r
 \r
                /* Attempt to open the requested file. */\r
-               pxFile = f_open( ( const char * ) pcParameter, "r" );\r
+               pxFile = f_open( pcParameter, "r" );\r
        }\r
 \r
        if( pxFile != NULL )\r
@@ -305,7 +305,7 @@ size_t xStringLength;
        if( ucReturned == F_NO_ERROR )\r
        {\r
                sprintf( pcWriteBuffer, "In: " );\r
-               xStringLength = strlen( ( const char * ) pcWriteBuffer );\r
+               xStringLength = strlen( pcWriteBuffer );\r
                f_getcwd( &( pcWriteBuffer[ xStringLength ] ), ( unsigned char ) ( xWriteBufferLen - xStringLength ) );\r
        }\r
        else\r
@@ -406,7 +406,7 @@ unsigned char ucReturned;
        configASSERT( pcParameter );\r
 \r
        /* Attempt to delete the file. */\r
-       ucReturned = f_delete( ( const char * ) pcParameter );\r
+       ucReturned = f_delete( pcParameter );\r
 \r
        if( ucReturned == F_NO_ERROR )\r
        {\r
@@ -483,7 +483,7 @@ 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
@@ -492,7 +492,7 @@ long lSourceLength, lDestinationLength = 0;
        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
@@ -551,7 +551,7 @@ portBASE_TYPE xReturn = pdPASS;
                /* Open the source file, seek past the data that has already been\r
                read from the file, read the next block of data, then close the\r
                file again so the destination file can be opened. */\r
-               pxFile = f_open( ( const char * ) pcSourceFile, "r" );\r
+               pxFile = f_open( pcSourceFile, "r" );\r
                if( pxFile != NULL )\r
                {\r
                        f_seek( pxFile, lBytesRead, F_SEEK_SET );\r
@@ -566,7 +566,7 @@ portBASE_TYPE xReturn = pdPASS;
 \r
                /* Open the destination file and write the block of data to the end of\r
                the file. */\r
-               pxFile = f_open( ( const char * ) pcDestinationFile, "a" );\r
+               pxFile = f_open( pcDestinationFile, "a" );\r
                if( pxFile != NULL )\r
                {\r
                        f_write( pxWriteBuffer, lBytesToRead, 1, pxFile );\r
index d836c76eba8c57e023fb900c4e12d0eba954bfdb..c6de21142daf6e131f4edb51f36af1f32f2af712 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
@@ -289,7 +289,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "In directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
@@ -318,7 +318,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "Back in root directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcRoot ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcRoot ) == 0 );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -336,7 +336,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "Back in directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
index ece8e2770a090d19a91b9fe6ea1316e7fa4fe783..be5653d74ca9a529e90360bcdff75b897ba91a9a 100644 (file)
@@ -272,7 +272,7 @@ static portBASE_TYPE lParameterNumber = 0;
                /* Return the parameter string. */\r
                memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-               strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -338,7 +338,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        /* Return the parameter string. */\r
                        memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                        sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-                       strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -389,7 +389,7 @@ static portBASE_TYPE lParameterNumber = 0;
                configASSERT( pcParameter );\r
 \r
                /* There are only two valid parameter values. */\r
-               if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+               if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
                {\r
                        /* Start or restart the trace. */\r
                        vTraceStop();\r
index 633c120fbdc0abee5605ad11ee174d06864d07b6..6119a1a91a4a086b887273f47870eb996d00c355 100644 (file)
@@ -333,7 +333,7 @@ static portBASE_TYPE lParameterNumber = 0;
                /* Return the parameter string. */\r
                memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-               strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -399,7 +399,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        /* Return the parameter string. */\r
                        memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                        sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-                       strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -477,7 +477,7 @@ static portBASE_TYPE lParameterNumber = 0;
                digit, assume the host name has been passed in. */\r
                if( ( *pcParameter >= '0' ) && ( *pcParameter <= '9' ) )\r
                {\r
-                       ulIPAddress = FreeRTOS_inet_addr( ( const uint8_t * ) pcParameter );\r
+                       ulIPAddress = FreeRTOS_inet_addr( pcParameter );\r
                }\r
                else\r
                {\r
@@ -485,7 +485,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        pcParameter[ lParameterStringLength ] = 0x00;\r
 \r
                        /* Attempt to resolve host. */\r
-                       ulIPAddress = FreeRTOS_gethostbyname( ( uint8_t * ) pcParameter );\r
+                       ulIPAddress = FreeRTOS_gethostbyname( pcParameter );\r
                }\r
 \r
                /* Convert IP address, which may have come from a DNS lookup, to string. */\r
@@ -639,7 +639,7 @@ uint32_t ulAddress;
                configASSERT( pcParameter );\r
 \r
                /* There are only two valid parameter values. */\r
-               if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+               if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
                {\r
                        /* Start or restart the trace. */\r
                        vTraceStop();\r
index 99d3772b465d7e24b8ce83d5e71813cf6a74116e..b406e10c0dbd83fea825e882530d5982cbb06e1f 100644 (file)
@@ -91,7 +91,7 @@ static void prvCDCCommandConsoleTask( void *pvParameters );
  * Obtain a character from the CDC input.  The calling task will be held in the\r
  * Blocked state (so other tasks can execute) until a character is avilable.\r
  */\r
-int8_t cGetCDCChar( void );\r
+char cGetCDCChar( void );\r
 \r
 /*\r
  * Initialise the third party virtual comport files driver\r
@@ -109,9 +109,9 @@ task. */
 static xSemaphoreHandle xCDCMutex = NULL;\r
 \r
 /* Const messages output by the command console. */\r
-static const uint8_t * const pcWelcomeMessage = ( uint8_t * ) "FreeRTOS 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 = "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
@@ -140,8 +140,10 @@ void vCDCCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPri
 \r
 static void prvCDCCommandConsoleTask( 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;\r
+uint8_t ucInputIndex = 0;\r
+char *pcOutputString;\r
+static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
 portBASE_TYPE xReturned;\r
 \r
        ( void ) pvParameters;\r
@@ -156,7 +158,7 @@ portBASE_TYPE xReturned;
 \r
        /* Send the welcome message.  This probably won't be seen as the console\r
        will not have been connected yet. */\r
-       USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcWelcomeMessage, strlen( ( const char * ) pcWelcomeMessage ) );\r
+       USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcWelcomeMessage, strlen( pcWelcomeMessage ) );\r
 \r
        for( ;; )\r
        {\r
@@ -175,14 +177,14 @@ portBASE_TYPE xReturned;
                        if( cRxedChar == '\n' || cRxedChar == '\r' )\r
                        {\r
                                /* Just to space the output from the input. */\r
-                               USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcNewLine, strlen( ( const char * ) pcNewLine ) );\r
+                               USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcNewLine, strlen( pcNewLine ) );\r
 \r
                                /* See if the command is empty, indicating that the last command is\r
                                to be executed again. */\r
-                               if( cInputIndex == 0 )\r
+                               if( ucInputIndex == 0 )\r
                                {\r
                                        /* Copy the last command back into the input string. */\r
-                                       strcpy( ( char * ) cInputString, ( char * ) cLastInputString );\r
+                                       strcpy( cInputString, cLastInputString );\r
                                }\r
 \r
                                /* Pass the received command to the command interpreter.  The\r
@@ -195,7 +197,7 @@ portBASE_TYPE xReturned;
                                        xReturned = FreeRTOS_CLIProcessCommand( cInputString, pcOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE );\r
 \r
                                        /* Write the generated string to the CDC. */\r
-                                       USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcOutputString, strlen( ( const char * ) pcOutputString ) );\r
+                                       USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcOutputString, strlen( pcOutputString ) );\r
                                        vTaskDelay( 1 );\r
 \r
                                } while( xReturned != pdFALSE );\r
@@ -204,11 +206,11 @@ portBASE_TYPE xReturned;
                                Clear the input string ready to receive the next command.  Remember\r
                                the command that was just processed first in case it is to be\r
                                processed again. */\r
-                               strcpy( ( char * ) cLastInputString, ( char * ) cInputString );\r
-                               cInputIndex = 0;\r
+                               strcpy( cLastInputString, cInputString );\r
+                               ucInputIndex = 0;\r
                                memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
 \r
-                               USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcEndOfOutputMessage, strlen( ( const char * ) pcEndOfOutputMessage ) );\r
+                               USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcEndOfOutputMessage, strlen( pcEndOfOutputMessage ) );\r
                        }\r
                        else\r
                        {\r
@@ -220,10 +222,10 @@ portBASE_TYPE xReturned;
                                {\r
                                        /* Backspace was pressed.  Erase the last character in the\r
                                        string - if any. */\r
-                                       if( cInputIndex > 0 )\r
+                                       if( ucInputIndex > 0 )\r
                                        {\r
-                                               cInputIndex--;\r
-                                               cInputString[ cInputIndex ] = '\0';\r
+                                               ucInputIndex--;\r
+                                               cInputString[ ucInputIndex ] = '\0';\r
                                        }\r
                                }\r
                                else\r
@@ -233,10 +235,10 @@ portBASE_TYPE xReturned;
                                        string will be passed to the command interpreter. */\r
                                        if( ( cRxedChar >= ' ' ) && ( cRxedChar <= '~' ) )\r
                                        {\r
-                                               if( cInputIndex < cmdMAX_INPUT_SIZE )\r
+                                               if( ucInputIndex < cmdMAX_INPUT_SIZE )\r
                                                {\r
-                                                       cInputString[ cInputIndex ] = cRxedChar;\r
-                                                       cInputIndex++;\r
+                                                       cInputString[ ucInputIndex ] = cRxedChar;\r
+                                                       ucInputIndex++;\r
                                                }\r
                                        }\r
                                }\r
@@ -249,20 +251,20 @@ portBASE_TYPE xReturned;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vOutputString( const uint8_t * const pucMessage )\r
+void vOutputString( const char * const pcMessage )\r
 {\r
        if( xSemaphoreTake( xCDCMutex, cmdMAX_MUTEX_WAIT ) == pdPASS )\r
        {\r
-               USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pucMessage, strlen( ( const char * ) pucMessage ) );\r
+               USB_WriteEP( CDC_DEP_IN, ( uint8_t * ) pcMessage, strlen( pcMessage ) );\r
                xSemaphoreGive( xCDCMutex );\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-int8_t cGetCDCChar( void )\r
+char cGetCDCChar( void )\r
 {\r
 int32_t lAvailableBytes, xBytes = 0;\r
-int8_t cInputChar;\r
+char cInputChar;\r
 \r
        do\r
        {\r
@@ -274,7 +276,7 @@ int8_t cInputChar;
                        {\r
                                /* Attempt to read one character. */\r
                                xBytes = 1;\r
-                               xBytes = CDC_RdOutBuf( ( char * ) &cInputChar, &xBytes );\r
+                               xBytes = CDC_RdOutBuf( &cInputChar, &xBytes );\r
 \r
                                xSemaphoreGive( xCDCMutex );\r
                        }\r
index 46cc253943fc3a9ec9e182e4b1694ef047db00b6..61a20d4903f7f5f23bbcb122f9e7df17ac13394f 100644 (file)
@@ -232,24 +232,24 @@ static portBASE_TYPE xTaskAlreadyCreated = pdFALSE;
 /* Called by FreeRTOS+UDP when a reply is received to an outgoing ping request. */\r
 void vApplicationPingReplyHook( ePingReplyStatus_t eStatus, uint16_t usIdentifier )\r
 {\r
-static const uint8_t *pucSuccess = ( uint8_t * ) "\r\n\r\nPing reply received - ";\r
-static const uint8_t *pucInvalidChecksum = ( uint8_t * ) "\r\n\r\nPing reply received with invalid checksum - ";\r
-static const uint8_t *pucInvalidData = ( uint8_t * ) "\r\n\r\nPing reply received with invalid data - ";\r
-static uint8_t ucMessage[ 50 ];\r
-void vOutputString( const uint8_t * const pucMessage );\r
+static const char *pcSuccess = "\r\n\r\nPing reply received - ";\r
+static const char *pcInvalidChecksum = "\r\n\r\nPing reply received with invalid checksum - ";\r
+static const char *pcInvalidData = "\r\n\r\nPing reply received with invalid data - ";\r
+static char cMessage[ 50 ];\r
+void vOutputString( const char * const pcMessage );\r
 \r
        switch( eStatus )\r
        {\r
                case eSuccess   :\r
-                       vOutputString( pucSuccess );\r
+                       vOutputString( pcSuccess );\r
                        break;\r
 \r
                case eInvalidChecksum :\r
-                       vOutputString( pucInvalidChecksum );\r
+                       vOutputString( pcInvalidChecksum );\r
                        break;\r
 \r
                case eInvalidData :\r
-                       vOutputString( pucInvalidData );\r
+                       vOutputString( pcInvalidData );\r
                        break;\r
 \r
                default :\r
@@ -258,7 +258,7 @@ void vOutputString( const uint8_t * const pucMessage );
                        break;\r
        }\r
 \r
-       sprintf( ( char * ) ucMessage, "identifier %d\r\n\r\n", ( int ) usIdentifier );\r
-       vOutputString( ucMessage );\r
+       sprintf( cMessage, "identifier %d\r\n\r\n", ( int ) usIdentifier );\r
+       vOutputString( cMessage );\r
 }\r
 \r
index 18564bc1ab01d553195353aa382cc86ae975568a..7df209455e95b1d9eefba96b69cbe1498dffe8e9 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
@@ -63,7 +63,7 @@
     1 tab == 4 spaces!\r
 */\r
 \r
-/* \r
+/*\r
  * Creates two transmitting tasks and two receiving tasks.  The transmitting\r
  * tasks send values that are received by the receiving tasks.  One set of tasks\r
  * uses the standard API.  The other set of tasks uses the zero copy API.\r
@@ -126,7 +126,7 @@ static void prvSimpleClientTask( void *pvParameters )
 {\r
 xSocket_t xClientSocket;\r
 struct freertos_sockaddr xDestinationAddress;\r
-uint8_t cString[ 50 ];\r
+char cString[ 50 ];\r
 portBASE_TYPE lReturned;\r
 uint32_t ulCount = 0UL, ulIPAddress;\r
 const uint32_t ulLoopsPerSocket = 10UL;\r
@@ -162,13 +162,13 @@ const portTickType x150ms = 150UL / portTICK_RATE_MS;
                do\r
                {\r
                        /* Create the string that is sent to the server. */\r
-                       sprintf( ( char * ) cString, "Server received (not zero copy): Message number %lu\r\n", ulCount );\r
+                       sprintf( cString, "Server received (not zero copy): Message number %lu\r\n", ulCount );\r
 \r
                        /* Send the string to the socket.  ulFlags is set to 0, so the zero\r
                        copy option is not selected.  That means the data from cString[] is\r
                        copied into a network buffer inside FreeRTOS_sendto(), and cString[]\r
                        can be reused as soon as FreeRTOS_sendto() has returned. */\r
-                       lReturned = FreeRTOS_sendto( xClientSocket, ( void * ) cString, strlen( ( const char * ) cString ), 0, &xDestinationAddress, sizeof( xDestinationAddress ) );\r
+                       lReturned = FreeRTOS_sendto( xClientSocket, ( void * ) cString, strlen( cString ), 0, &xDestinationAddress, sizeof( xDestinationAddress ) );\r
 \r
                        ulCount++;\r
 \r
@@ -187,7 +187,7 @@ const portTickType x150ms = 150UL / portTICK_RATE_MS;
 static void prvSimpleServerTask( void *pvParameters )\r
 {\r
 long lBytes;\r
-uint8_t cReceivedString[ 60 ];\r
+char cReceivedString[ 60 ];\r
 struct freertos_sockaddr xClient, xBindAddress;\r
 uint32_t xClientLength = sizeof( xClient );\r
 xSocket_t xListeningSocket;\r
@@ -226,11 +226,11 @@ xSocket_t xListeningSocket;
                /* Print the received characters. */\r
                if( lBytes > 0 )\r
                {\r
-                       vOutputString( ( char * ) cReceivedString );\r
+                       vOutputString( cReceivedString );\r
                }\r
 \r
                /* Error check. */\r
-               configASSERT( lBytes == ( portBASE_TYPE ) strlen( ( const char * ) cReceivedString ) );\r
+               configASSERT( lBytes == ( portBASE_TYPE ) strlen( cReceivedString ) );\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -243,10 +243,10 @@ struct freertos_sockaddr xDestinationAddress;
 portBASE_TYPE lReturned;\r
 uint32_t ulCount = 0UL, ulIPAddress;\r
 const uint32_t ulLoopsPerSocket = 10UL;\r
-const uint8_t *pucStringToSend = ( const uint8_t * ) "Server received (using zero copy): Message number ";\r
+const char *pcStringToSend = "Server received (using zero copy): Message number ";\r
 const portTickType x150ms = 150UL / portTICK_RATE_MS;\r
 /* 15 is added to ensure the number, \r\n and terminating zero fit. */\r
-const size_t xStringLength = strlen( ( char * ) pucStringToSend ) + 15;\r
+const size_t xStringLength = strlen( pcStringToSend ) + 15;\r
 \r
        /* Remove compiler warning about unused parameters. */\r
        ( void ) pvParameters;\r
@@ -296,7 +296,7 @@ const size_t xStringLength = strlen( ( char * ) pucStringToSend ) + 15;
                        end.  Note that the string is being written directly into the buffer\r
                        obtained from the IP stack above. */\r
                        memset( ( void * ) pucUDPPayloadBuffer, 0x00, xStringLength );\r
-                       sprintf( ( char * ) pucUDPPayloadBuffer, "%s%lu\r\n", ( char * ) pucStringToSend, ulCount );\r
+                       sprintf( ( char * ) pucUDPPayloadBuffer, "%s%lu\r\n", pcStringToSend, ulCount );\r
 \r
                        /* Pass the buffer into the send function.  ulFlags has the\r
                        FREERTOS_ZERO_COPY bit set so the IP stack will take control of the\r
index 4b7198585b74a6f879ddc986d9e1be6b61f05bbd..d36543e35ca3a6bdb0989ae41e08204a6cb8583b 100644 (file)
@@ -163,7 +163,7 @@ extern const uint8_t ucMACAddress[ 6 ];
 \r
                                                        /* Send the output generated by the command's\r
                                                        implementation. */\r
-                                                       FreeRTOS_sendto( xSocket, cOutputString,  strlen( ( const char * ) cOutputString ), 0, &xClient, xClientAddressLength );\r
+                                                       FreeRTOS_sendto( xSocket, cOutputString,  strlen( cOutputString ), 0, &xClient, xClientAddressLength );\r
 \r
                                                } while( xMoreDataToFollow != pdFALSE ); /* Until the command does not generate any more output. */\r
 \r
index 57366eea11bb8064c794312972af798b4ad55a63..5eb6e2a49897433030d79b9e3b58880f43c49437 100644 (file)
@@ -5,11 +5,11 @@
  * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
  * terms are different to the FreeRTOS license terms.\r
  *\r
- * FreeRTOS+UDP uses a dual license model that allows the software to be used \r
- * under a standard GPL open source license, or a commercial license.  The \r
- * standard GPL license (unlike the modified GPL license under which FreeRTOS \r
- * itself is distributed) requires that all software statically linked with \r
- * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.  \r
+ * FreeRTOS+UDP uses a dual license model that allows the software to be used\r
+ * under a standard GPL open source license, or a commercial license.  The\r
+ * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
+ * itself is distributed) requires that all software statically linked with\r
+ * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.\r
  * Details of both license options follow:\r
  *\r
  * - Open source licensing -\r
@@ -21,9 +21,9 @@
  *\r
  * - Commercial licensing -\r
  * Businesses and individuals that for commercial or other reasons cannot comply\r
- * with the terms of the GPL V2 license must obtain a commercial license before \r
- * incorporating FreeRTOS+UDP into proprietary software for distribution in any \r
- * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp \r
+ * with the terms of the GPL V2 license must obtain a commercial license before\r
+ * incorporating FreeRTOS+UDP into proprietary software for distribution in any\r
+ * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp\r
  * and do not require any source files to be changed.\r
  *\r
  * FreeRTOS+UDP is distributed in the hope that it will be useful.  You cannot\r
@@ -99,7 +99,7 @@ static xSocket_t prvCreateDNSSocket( void );
 /*\r
  * Create the DNS message in the zero copy buffer passed in the first parameter.\r
  */\r
-static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, const uint8_t *pcHostName, uint16_t usIdentifier );\r
+static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, const char *pcHostName, uint16_t usIdentifier );\r
 \r
 /*\r
  * Simple routine that jumps over the NAME field of a resource record.\r
@@ -128,7 +128,7 @@ typedef struct xDNSMessage xDNSMessage_t;
 \r
 /*-----------------------------------------------------------*/\r
 \r
-uint32_t FreeRTOS_gethostbyname( const uint8_t *pcHostName )\r
+uint32_t FreeRTOS_gethostbyname( const char *pcHostName )\r
 {\r
 static uint16_t usIdentifier = 0;\r
 struct freertos_sockaddr xAddress;\r
@@ -139,7 +139,7 @@ static uint32_t ulAddressLength;
 portBASE_TYPE xAttempt;\r
 int32_t lBytes;\r
 size_t xPayloadLength;\r
-const size_t xExpectedPayloadLength = sizeof( xDNSMessage_t ) + strlen( ( const char * const ) pcHostName ) + sizeof( uint16_t ) + sizeof( uint16_t ) + 2; /* Two for the count of characters in the first subdomain part, and the string end byte */\r
+const size_t xExpectedPayloadLength = sizeof( xDNSMessage_t ) + strlen( pcHostName ) + sizeof( uint16_t ) + sizeof( uint16_t ) + 2; /* Two for the count of characters in the first subdomain part, and the string end byte */\r
 \r
        if( xDNSSocket == NULL )\r
        {\r
@@ -207,7 +207,7 @@ const size_t xExpectedPayloadLength = sizeof( xDNSMessage_t ) + strlen( ( const
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, const uint8_t *pcHostName, uint16_t usIdentifier )\r
+static size_t prvCreateDNSMessage( uint8_t *pucUDPPayloadBuffer, const char *pcHostName, uint16_t usIdentifier )\r
 {\r
 xDNSMessage_t *pxDNSMessageHeader;\r
 uint8_t *pucStart, *pucByte;\r
@@ -237,10 +237,10 @@ static const xDNSMessage_t xDefaultPartDNSHeader =
        pucByte = pucStart + 1;\r
 \r
        /* Copy in the host name. */\r
-       strcpy( ( char * ) pucByte, ( const char * ) pcHostName );\r
+       strcpy( ( char * ) pucByte, pcHostName );\r
 \r
        /* Mark the end of the string. */\r
-       pucByte += strlen( ( const char * ) pcHostName );\r
+       pucByte += strlen( pcHostName );\r
        *pucByte = 0x00;\r
 \r
        /* Walk the string to replace the '.' characters with byte counts.\r
index a4e74f272890204f18a01e384d3e275f827bd69b..488018ad8173c502480dccece21ca25ade6ef471 100644 (file)
@@ -5,11 +5,11 @@
  * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
  * terms are different to the FreeRTOS license terms.\r
  *\r
- * FreeRTOS+UDP uses a dual license model that allows the software to be used \r
- * under a standard GPL open source license, or a commercial license.  The \r
- * standard GPL license (unlike the modified GPL license under which FreeRTOS \r
- * itself is distributed) requires that all software statically linked with \r
- * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.  \r
+ * FreeRTOS+UDP uses a dual license model that allows the software to be used\r
+ * under a standard GPL open source license, or a commercial license.  The\r
+ * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
+ * itself is distributed) requires that all software statically linked with\r
+ * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.\r
  * Details of both license options follow:\r
  *\r
  * - Open source licensing -\r
@@ -21,9 +21,9 @@
  *\r
  * - Commercial licensing -\r
  * Businesses and individuals that for commercial or other reasons cannot comply\r
- * with the terms of the GPL V2 license must obtain a commercial license before \r
- * incorporating FreeRTOS+UDP into proprietary software for distribution in any \r
- * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp \r
+ * with the terms of the GPL V2 license must obtain a commercial license before\r
+ * incorporating FreeRTOS+UDP into proprietary software for distribution in any\r
+ * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp\r
  * and do not require any source files to be changed.\r
  *\r
  * FreeRTOS+UDP is distributed in the hope that it will be useful.  You cannot\r
@@ -230,7 +230,7 @@ xFreeRTOS_Socket_t *pxSocket;
 \r
 #if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
 \r
-       portBASE_TYPE FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet ) \r
+       portBASE_TYPE FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet )\r
        {\r
        xFreeRTOS_Socket_t *pxSocket = ( xFreeRTOS_Socket_t * ) xSocket;\r
        portBASE_TYPE xReturn;\r
@@ -881,29 +881,29 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
                                /* Is the socket a member of a select() group? */\r
                                if( pxSocket->xSelectQueue != NULL )\r
                                {\r
-                                       /* Can the select group be notified that the socket is \r
+                                       /* Can the select group be notified that the socket is\r
                                        ready to be read? */\r
                                        if( xQueueSendFromISR( pxSocket->xSelectQueue, &pxSocket, &xHigherPriorityTaskWoken ) != pdPASS )\r
                                        {\r
                                                /* Could not notify the select group. */\r
                                                xReturn = pdFAIL;\r
                                                iptraceFAILED_TO_NOTIFY_SELECT_GROUP( pxSocket );\r
-                                       }                               \r
+                                       }\r
                                }\r
                        }\r
-                       #endif \r
+                       #endif\r
 \r
                        if( xReturn == pdPASS )\r
                        {\r
                                taskENTER_CRITICAL();\r
                                {\r
-                                       /* Add the network packet to the list of packets to be \r
+                                       /* Add the network packet to the list of packets to be\r
                                        processed by the socket. */\r
                                        vListInsertEnd( &( pxSocket->xWaitingPacketsList ), &( pxNetworkBuffer->xBufferListItem ) );\r
                                }\r
                                taskEXIT_CRITICAL();\r
 \r
-                               /* The socket's counting semaphore records how many packets are \r
+                               /* The socket's counting semaphore records how many packets are\r
                                waiting to be processed by the socket. */\r
                                xSemaphoreGiveFromISR( pxSocket->xWaitingPacketSemaphore, &xHigherPriorityTaskWoken );\r
                        }\r
@@ -972,34 +972,34 @@ xListItem *pxIterator, *pxReturn;
 \r
 #if ipconfigINCLUDE_FULL_INET_ADDR == 1\r
 \r
-       uint32_t FreeRTOS_inet_addr( const uint8_t * pucIPAddress )\r
+       uint32_t FreeRTOS_inet_addr( const char *pcIPAddress )\r
        {\r
        const uint8_t ucDecimalBase = 10;\r
        uint8_t ucOctet[ socketMAX_IP_ADDRESS_OCTETS ];\r
-       const uint8_t *pucPointerOnEntering;\r
+       const char *pcPointerOnEntering;\r
        uint32_t ulReturn = 0UL, ulOctetNumber, ulValue;\r
        portBASE_TYPE xResult = pdPASS;\r
 \r
                for( ulOctetNumber = 0; ulOctetNumber < socketMAX_IP_ADDRESS_OCTETS; ulOctetNumber++ )\r
                {\r
                        ulValue = 0;\r
-                       pucPointerOnEntering = pucIPAddress;\r
+                       pcPointerOnEntering = pcIPAddress;\r
 \r
-                       while( ( *pucIPAddress >= ( uint8_t ) '0' ) && ( *pucIPAddress <= ( uint8_t ) '9' ) )\r
+                       while( ( *pcIPAddress >= ( uint8_t ) '0' ) && ( *pcIPAddress <= ( uint8_t ) '9' ) )\r
                        {\r
                                /* Move previous read characters into the next decimal\r
                                position. */\r
                                ulValue *= ucDecimalBase;\r
 \r
                                /* Add the binary value of the ascii character. */\r
-                               ulValue += ( *pucIPAddress - ( uint8_t ) '0' );\r
+                               ulValue += ( *pcIPAddress - ( uint8_t ) '0' );\r
 \r
                                /* Move to next character in the string. */\r
-                               pucIPAddress++;\r
+                               pcIPAddress++;\r
                        }\r
 \r
                        /* Check characters were read. */\r
-                       if( pucIPAddress == pucPointerOnEntering )\r
+                       if( pcIPAddress == pcPointerOnEntering )\r
                        {\r
                                xResult = pdFAIL;\r
                        }\r
@@ -1016,14 +1016,14 @@ xListItem *pxIterator, *pxReturn;
                                /* Check the next character is as expected. */\r
                                if( ulOctetNumber < ( socketMAX_IP_ADDRESS_OCTETS - 1 ) )\r
                                {\r
-                                       if( *pucIPAddress != ( uint8_t ) '.' )\r
+                                       if( *pcIPAddress != ( uint8_t ) '.' )\r
                                        {\r
                                                xResult = pdFAIL;\r
                                        }\r
                                        else\r
                                        {\r
                                                /* Move past the dot. */\r
-                                               pucIPAddress++;\r
+                                               pcIPAddress++;\r
                                        }\r
                                }\r
                        }\r
@@ -1035,7 +1035,7 @@ xListItem *pxIterator, *pxReturn;
                        }\r
                }\r
 \r
-               if( *pucIPAddress != ( uint8_t ) 0x00 )\r
+               if( *pcIPAddress != ( uint8_t ) 0x00 )\r
                {\r
                        /* Expected the end of the string. */\r
                        xResult = pdFAIL;\r
index 015afce89fa3f62106d007c5cc590cbee0ed605c..0255456bbad38fc4c5a73d708b792568dfd34253 100644 (file)
@@ -5,11 +5,11 @@
  * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
  * terms are different to the FreeRTOS license terms.\r
  *\r
- * FreeRTOS+UDP uses a dual license model that allows the software to be used \r
- * under a standard GPL open source license, or a commercial license.  The \r
- * standard GPL license (unlike the modified GPL license under which FreeRTOS \r
- * itself is distributed) requires that all software statically linked with \r
- * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.  \r
+ * FreeRTOS+UDP uses a dual license model that allows the software to be used\r
+ * under a standard GPL open source license, or a commercial license.  The\r
+ * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
+ * itself is distributed) requires that all software statically linked with\r
+ * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.\r
  * Details of both license options follow:\r
  *\r
  * - Open source licensing -\r
@@ -21,9 +21,9 @@
  *\r
  * - Commercial licensing -\r
  * Businesses and individuals that for commercial or other reasons cannot comply\r
- * with the terms of the GPL V2 license must obtain a commercial license before \r
- * incorporating FreeRTOS+UDP into proprietary software for distribution in any \r
- * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp \r
+ * with the terms of the GPL V2 license must obtain a commercial license before\r
+ * incorporating FreeRTOS+UDP into proprietary software for distribution in any\r
+ * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp\r
  * and do not require any source files to be changed.\r
  *\r
  * FreeRTOS+UDP is distributed in the hope that it will be useful.  You cannot\r
@@ -52,7 +52,7 @@
  * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL:\r
  * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/FreeRTOS_UDP_API_Functions.shtml\r
  */\r
-uint32_t FreeRTOS_gethostbyname( const uint8_t *pcHostName );\r
+uint32_t FreeRTOS_gethostbyname( const char *pcHostName );\r
 \r
 #endif /* FREERTOS_DNS_H */\r
 \r
index d1043302d78821a4bc12ec1807aaf04e09906d1c..5946c3247d9143bb9e39c6cd509c6b1718945e15 100644 (file)
@@ -5,11 +5,11 @@
  * This file is part of the FreeRTOS+UDP distribution.  The FreeRTOS+UDP license\r
  * terms are different to the FreeRTOS license terms.\r
  *\r
- * FreeRTOS+UDP uses a dual license model that allows the software to be used \r
- * under a standard GPL open source license, or a commercial license.  The \r
- * standard GPL license (unlike the modified GPL license under which FreeRTOS \r
- * itself is distributed) requires that all software statically linked with \r
- * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.  \r
+ * FreeRTOS+UDP uses a dual license model that allows the software to be used\r
+ * under a standard GPL open source license, or a commercial license.  The\r
+ * standard GPL license (unlike the modified GPL license under which FreeRTOS\r
+ * itself is distributed) requires that all software statically linked with\r
+ * FreeRTOS+UDP is also distributed under the same GPL V2 license terms.\r
  * Details of both license options follow:\r
  *\r
  * - Open source licensing -\r
@@ -21,9 +21,9 @@
  *\r
  * - Commercial licensing -\r
  * Businesses and individuals that for commercial or other reasons cannot comply\r
- * with the terms of the GPL V2 license must obtain a commercial license before \r
- * incorporating FreeRTOS+UDP into proprietary software for distribution in any \r
- * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp \r
+ * with the terms of the GPL V2 license must obtain a commercial license before\r
+ * incorporating FreeRTOS+UDP into proprietary software for distribution in any\r
+ * form.  Commercial licenses can be purchased from http://shop.freertos.org/udp\r
  * and do not require any source files to be changed.\r
  *\r
  * FreeRTOS+UDP is distributed in the hope that it will be useful.  You cannot\r
@@ -139,7 +139,7 @@ struct freertos_sockaddr
 /* The socket type itself. */\r
 typedef void *xSocket_t;\r
 \r
-/* The xSocketSet_t type is the equivalent to the fd_set type used by the \r
+/* The xSocketSet_t type is the equivalent to the fd_set type used by the\r
 Berkeley API. */\r
 typedef void *xSocketSet_t;\r
 \r
@@ -154,8 +154,8 @@ int32_t FreeRTOS_sendto( xSocket_t xSocket, const void *pvBuffer, size_t xTotalD
 portBASE_TYPE FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength );\r
 portBASE_TYPE FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength );\r
 portBASE_TYPE FreeRTOS_closesocket( xSocket_t xSocket );\r
-uint32_t FreeRTOS_gethostbyname( const uint8_t *pcHostName );\r
-uint32_t FreeRTOS_inet_addr( const uint8_t * pucIPAddress );\r
+uint32_t FreeRTOS_gethostbyname( const char *pcHostName );\r
+uint32_t FreeRTOS_inet_addr( const char *pcIPAddress );\r
 \r
 #if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
        xSocketSet_t FreeRTOS_CreateSocketSet( unsigned portBASE_TYPE uxEventQueueLength );\r
index a902846c3c5e4c5cd6db572a114c408cc99f8555..faf456af7816ddb7af473c00aa4c8381d2b9b140 100644 (file)
@@ -244,7 +244,7 @@ size_t xColumns = 50U;
                configASSERT( pcParameter );\r
 \r
                /* Attempt to open the requested file. */\r
-               pxFile = f_open( ( const char * ) pcParameter, "r" );\r
+               pxFile = f_open( pcParameter, "r" );\r
        }\r
 \r
        if( pxFile != NULL )\r
@@ -406,7 +406,7 @@ unsigned char ucReturned;
        configASSERT( pcParameter );\r
 \r
        /* Attempt to delete the file. */\r
-       ucReturned = f_delete( ( const char * ) pcParameter );\r
+       ucReturned = f_delete( pcParameter );\r
 \r
        if( ucReturned == F_NO_ERROR )\r
        {\r
@@ -455,7 +455,7 @@ 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
@@ -464,7 +464,7 @@ long lSourceLength, lDestinationLength = 0;
        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
@@ -523,7 +523,7 @@ portBASE_TYPE xReturn = pdPASS;
                /* Open the source file, seek past the data that has already been\r
                read from the file, read the next block of data, then close the\r
                file again so the destination file can be opened. */\r
-               pxFile = f_open( ( const char * ) pcSourceFile, "r" );\r
+               pxFile = f_open( pcSourceFile, "r" );\r
                if( pxFile != NULL )\r
                {\r
                        f_seek( pxFile, lBytesRead, F_SEEK_SET );\r
@@ -538,7 +538,7 @@ portBASE_TYPE xReturn = pdPASS;
 \r
                /* Open the destination file and write the block of data to the end of\r
                the file. */\r
-               pxFile = f_open( ( const char * ) pcDestinationFile, "a" );\r
+               pxFile = f_open( pcDestinationFile, "a" );\r
                if( pxFile != NULL )\r
                {\r
                        f_write( pxWriteBuffer, lBytesToRead, 1, pxFile );\r
index e42fd155176619f17b53970ee0b073a5a0d5aea3..e0606f23d4995792f612416f1ea96d6c9db44909 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
@@ -302,7 +302,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "In directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
@@ -331,7 +331,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "Back in root directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcRoot ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcRoot ) == 0 );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -349,7 +349,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "Back in directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
index 32d56895e9ecbb8c954e19e3ad664fd29533e658..7bae71bec57ebb7a4dd2bc07d44438418859b06c 100644 (file)
@@ -405,7 +405,7 @@ static portBASE_TYPE lParameterNumber = 0;
                configASSERT( pcParameter );\r
 \r
                /* There are only two valid parameter values. */\r
-               if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+               if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
                {\r
                        /* Start or restart the trace. */\r
                        vTraceStop();\r
@@ -414,7 +414,7 @@ static portBASE_TYPE lParameterNumber = 0;
 \r
                        sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
                }\r
-               else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+               else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
                {\r
                        /* End the trace, if one is running. */\r
                        vTraceStop();\r
index bce7c40dd70260e85098a4ece753da75c4db328e..9db8cb154acb77a8c82c6945db033251b3a4e890 100644 (file)
@@ -348,7 +348,7 @@ static portBASE_TYPE lParameterNumber = 0;
                        /* Return the parameter string. */\r
                        memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
                        sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
-                       strncat( pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\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
@@ -399,7 +399,7 @@ static portBASE_TYPE lParameterNumber = 0;
                configASSERT( pcParameter );\r
 \r
                /* There are only two valid parameter values. */\r
-               if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+               if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
                {\r
                        /* Start or restart the trace. */\r
                        vTraceStop();\r
@@ -408,7 +408,7 @@ static portBASE_TYPE lParameterNumber = 0;
 \r
                        sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
                }\r
-               else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+               else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
                {\r
                        /* End the trace, if one is running. */\r
                        vTraceStop();\r
index b488d016e542812f5449ff9867289c2c8dc77fa1..f2e1e776bb697fd7704f05dd3287a9459d7e60ec 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
@@ -113,14 +113,14 @@ static void prvSendBuffer( struct usart_module *pxCDCUsart, const char * pcBuffe
 extern void vRegisterSampleCLICommands( void );\r
 \r
 /*\r
- * Configure the UART used for IO.and register prvUARTRxNotificationHandler() \r
+ * Configure the UART used for IO.and register prvUARTRxNotificationHandler()\r
  * to handle UART Rx events.\r
  */\r
 static void prvConfigureUART( struct usart_module *pxCDCUsart );\r
 \r
 /*\r
- * Callback functions registered with the Atmel UART driver.  Both functions \r
- * just 'give' a semaphore to unblock a task that may be waiting for a \r
+ * Callback functions registered with the Atmel UART driver.  Both functions\r
+ * just 'give' a semaphore to unblock a task that may be waiting for a\r
  * character to be received, or a transmission to complete.\r
  */\r
 static void prvUARTTxNotificationHandler( const struct usart_module *const pxUSART );\r
@@ -146,7 +146,7 @@ static xSemaphoreHandle xRxCompleteSemaphore = NULL;
 void vUARTCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPriority )\r
 {\r
        vRegisterSampleCLICommands();\r
-       \r
+\r
        /* Create that task that handles the console itself. */\r
        xTaskCreate(    prvUARTCommandConsoleTask,                      /* The task that implements the command console. */\r
                                        "CLI",                                                          /* Text name assigned to the task.  This is just to assist debugging.  The kernel does not use this name itself. */\r
@@ -178,13 +178,13 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
        pcOutputString = FreeRTOS_CLIGetOutputBuffer();\r
 \r
        /* Send the welcome message. */\r
-       prvSendBuffer( &xCDCUsart, pcWelcomeMessage, strlen( ( char * ) pcWelcomeMessage ) );\r
+       prvSendBuffer( &xCDCUsart, pcWelcomeMessage, strlen( pcWelcomeMessage ) );\r
 \r
        for( ;; )\r
        {\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, ( uint8_t * ) &cRxedChar, sizeof( cRxedChar ) );             \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
@@ -201,7 +201,7 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
                                if( ucInputIndex == 0 )\r
                                {\r
                                        /* Copy the last command back into the input string. */\r
-                                       strcpy( ( char * ) cInputString, ( char * ) cLastInputString );\r
+                                       strcpy( cInputString, cLastInputString );\r
                                }\r
 \r
                                /* Pass the received command to the command interpreter.  The\r
@@ -222,11 +222,11 @@ static struct usart_module xCDCUsart; /* Static so it doesn't take up too much s
                                Clear the input string ready to receive the next command.  Remember\r
                                the command that was just processed first in case it is to be\r
                                processed again. */\r
-                               strcpy( ( char * ) cLastInputString, ( char * ) cInputString );\r
+                               strcpy( cLastInputString, cInputString );\r
                                ucInputIndex = 0;\r
                                memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
 \r
-                               prvSendBuffer( &xCDCUsart, pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
+                               prvSendBuffer( &xCDCUsart, pcEndOfOutputMessage, strlen( pcEndOfOutputMessage ) );\r
                        }\r
                        else\r
                        {\r
@@ -269,9 +269,9 @@ static void prvSendBuffer( struct usart_module *pxCDCUsart, const char * pcBuffe
 const portTickType xBlockMax100ms = 100UL / portTICK_RATE_MS;\r
 \r
        if( xBufferLength > 0 )\r
-       {               \r
+       {\r
                usart_write_buffer_job( pxCDCUsart, ( uint8_t * ) pcBuffer, xBufferLength );\r
-               \r
+\r
                /* Wait for the Tx to complete so the buffer can be reused without\r
                corrupting the data that is being sent. */\r
                xSemaphoreTake( xTxCompleteSemaphore, xBlockMax100ms );\r
@@ -287,7 +287,7 @@ struct usart_config xUARTConfig;
        without wasting any CPU time. */\r
        vSemaphoreCreateBinary( xTxCompleteSemaphore );\r
        configASSERT( xTxCompleteSemaphore );\r
-       \r
+\r
        /* This semaphore is used to allow the task to block for an Rx to complete\r
        without wasting any CPU time. */\r
        vSemaphoreCreateBinary( xRxCompleteSemaphore );\r
@@ -307,13 +307,13 @@ struct usart_config xUARTConfig;
        xUARTConfig.pinmux_pad1 = EDBG_CDC_SERCOM_PINMUX_PAD1;\r
        xUARTConfig.pinmux_pad2 = EDBG_CDC_SERCOM_PINMUX_PAD2;\r
        xUARTConfig.pinmux_pad3 = EDBG_CDC_SERCOM_PINMUX_PAD3;\r
-       while( usart_init( pxCDCUsart, EDBG_CDC_MODULE, &xUARTConfig ) != STATUS_OK ) \r
+       while( usart_init( pxCDCUsart, EDBG_CDC_MODULE, &xUARTConfig ) != STATUS_OK )\r
        {\r
                /* Nothing to do here.  Should include a timeout really but this is\r
                init code only. */\r
        }\r
        usart_enable( pxCDCUsart );\r
-       \r
+\r
        /* Register the driver callbacks. */\r
        usart_register_callback( pxCDCUsart, prvUARTTxNotificationHandler, USART_CALLBACK_BUFFER_TRANSMITTED );\r
        usart_register_callback( pxCDCUsart, prvUARTRxNotificationHandler, USART_CALLBACK_BUFFER_RECEIVED );\r
diff --git a/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/Read_Me_Instructions.url b/FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/Read_Me_Instructions.url
new file mode 100644 (file)
index 0000000..86d28f1
--- /dev/null
@@ -0,0 +1,5 @@
+[InternetShortcut]\r
+URL=http://www.freertos.org/Atmel_SAM4E_RTOS_Demo.html\r
+IDList=\r
+[{000214A0-0000-0000-C000-000000000046}]\r
+Prop3=19,2\r
index 1638770c657ee7394c96c2aea826914a0c109fa7..5178443fe4852d11704268bcc938522707829192 100644 (file)
@@ -72,7 +72,7 @@
  * executed prior to this project being built.  Once it has been executed\r
  * remove the #error line below.\r
  */\r
-#error Ensure CreateProjectDirectoryStructure.bat has been executed before building.  See comment immediately above.\r
+//#error Ensure CreateProjectDirectoryStructure.bat has been executed before building.  See comment immediately above.\r
 \r
 /*\r
  * Set configCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
index 13d5e1bdbf48f5997e7308f9ee3a5cbf1a634e90..a39dedf7e0478dda356a4cf19009ce2bf75a2b90 100644 (file)
@@ -238,7 +238,7 @@ size_t xColumns = 50U;
                configASSERT( pcParameter );\r
 \r
                /* Attempt to open the requested file. */\r
-               pxFile = f_open( ( const char * ) pcParameter, "r" );\r
+               pxFile = f_open( pcParameter, "r" );\r
        }\r
 \r
        if( pxFile != NULL )\r
@@ -400,7 +400,7 @@ unsigned char ucReturned;
        configASSERT( pcParameter );\r
 \r
        /* Attempt to delete the file. */\r
-       ucReturned = f_delete( ( const char * ) pcParameter );\r
+       ucReturned = f_delete( pcParameter );\r
 \r
        if( ucReturned == F_NO_ERROR )\r
        {\r
@@ -436,12 +436,12 @@ long lSourceLength, lDestinationLength = 0;
        configASSERT( pcDestinationFile );\r
 \r
        /* Obtain the name of the source file. */\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
+       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
@@ -518,7 +518,7 @@ portBASE_TYPE xReturn = pdPASS;
                /* Open the source file, seek past the data that has already been\r
                read from the file, read the next block of data, then close the\r
                file again so the destination file can be opened. */\r
-               pxFile = f_open( ( const char * ) pcSourceFile, "r" );\r
+               pxFile = f_open( pcSourceFile, "r" );\r
                if( pxFile != NULL )\r
                {\r
                        f_seek( pxFile, lBytesRead, F_SEEK_SET );\r
@@ -533,7 +533,7 @@ portBASE_TYPE xReturn = pdPASS;
 \r
                /* Open the destination file and write the block of data to the end of\r
                the file. */\r
-               pxFile = f_open( ( const char * ) pcDestinationFile, "a" );\r
+               pxFile = f_open( pcDestinationFile, "a" );\r
                if( pxFile != NULL )\r
                {\r
                        f_write( pxWriteBuffer, lBytesToRead, 1, pxFile );\r
index 31932c79938a6b5f3a41a397228cad706b33901f..4351438312a27315b38a9ec650c230be3fbe1896 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
@@ -302,7 +302,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "In directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
@@ -331,7 +331,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "Back in root directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcRoot ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcRoot ) == 0 );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -349,7 +349,7 @@ char cFileName[ fsMAX_FILE_NAME_LEN ];
        /* Obtain and print out the working directory. */\r
        f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
        printf( "Back in directory %s\r\n", cRAMBuffer );\r
-       configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+       configASSERT( strcmp( cRAMBuffer, pcFullPath ) == 0 );\r
 \r
        /* Generate the file name. */\r
        sprintf( cFileName, "%s.txt", pcDirectory2 );\r
index 1df4ab16facab65a0a5be40c20321fe9f6c13c17..025b58b3bd9a5cd4f962bcf601bb42e6f3494863 100644 (file)
@@ -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( 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
@@ -230,7 +230,7 @@ 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
+       strcpy( pcWriteBuffer, pcHeader );\r
        vTaskGetRunTimeStats( ( char * ) pcWriteBuffer + strlen( pcHeader ) );\r
 \r
        /* There is no more data to return after this single string, so return\r
@@ -241,7 +241,7 @@ const char * const pcHeader = "Task            Abs Time      % Time\r\n*********
 \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
@@ -308,7 +308,7 @@ static portBASE_TYPE lParameterNumber = 0;
 \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, 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
@@ -377,7 +377,7 @@ static portBASE_TYPE lParameterNumber = 0;
 \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,35 +388,35 @@ 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
 \r
                /* There are only two valid parameter values. */\r
-               if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+               if( strncmp( pcParameter, "start", strlen( "start" ) ) == 0 )\r
                {\r
                        /* Start or restart the trace. */\r
                        vTraceStop();\r
                        vTraceClear();\r
                        vTraceStart();\r
 \r
-                       sprintf( ( char * ) pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
+                       sprintf( pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
                }\r
-               else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+               else if( strncmp( pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
                {\r
                        /* End the trace, if one is running. */\r
                        vTraceStop();\r
-                       sprintf( ( char * ) pcWriteBuffer, "Stopping trace recording.\r\n" );\r
+                       sprintf( pcWriteBuffer, "Stopping trace recording.\r\n" );\r
                }\r
                else\r
                {\r
-                       sprintf( ( char * ) pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
+                       sprintf( pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
                }\r
 \r
                /* There is no more data to return after this single string, so return\r
index c5555eff38eb6a2d7f863ca41cf75eb55d4dc1fe..e1f4cca3b905893ce22d7285c7da96fcff65fda2 100644 (file)
@@ -165,7 +165,7 @@ portBASE_TYPE xReturned;
        pcOutputString = FreeRTOS_CLIGetOutputBuffer();\r
 \r
        /* Send the welcome message. */\r
-       prvSendBuffer( pcWelcomeMessage, strlen( ( char * ) pcWelcomeMessage ) );\r
+       prvSendBuffer( pcWelcomeMessage, strlen( pcWelcomeMessage ) );\r
 \r
        for( ;; )\r
        {\r
@@ -179,14 +179,14 @@ portBASE_TYPE xReturned;
                        if( cRxedChar == '\n' || cRxedChar == '\r' )\r
                        {\r
                                /* Just to space the output from the input. */\r
-                               prvSendBuffer( pcNewLine, strlen( ( char * ) pcNewLine ) );\r
+                               prvSendBuffer( pcNewLine, strlen( pcNewLine ) );\r
 \r
                                /* See if the command is empty, indicating that the last command is\r
                                to be executed again. */\r
                                if( cInputIndex == 0 )\r
                                {\r
                                        /* Copy the last command back into the input string. */\r
-                                       strcpy( ( char * ) cInputString, ( char * ) cLastInputString );\r
+                                       strcpy( cInputString, cLastInputString );\r
                                }\r
 \r
                                /* Pass the received command to the command interpreter.  The\r
@@ -207,11 +207,11 @@ portBASE_TYPE xReturned;
                                Clear the input string ready to receive the next command.  Remember\r
                                the command that was just processed first in case it is to be\r
                                processed again. */\r
-                               strcpy( ( char * ) cLastInputString, ( char * ) cInputString );\r
+                               strcpy( cLastInputString, cInputString );\r
                                cInputIndex = 0;\r
                                memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
 \r
-                               prvSendBuffer( pcEndOfOutputMessage, strlen( ( char * ) pcEndOfOutputMessage ) );\r
+                               prvSendBuffer( pcEndOfOutputMessage, strlen( pcEndOfOutputMessage ) );\r
                        }\r
                        else\r
                        {\r