X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS-Plus%2FDemo%2FCommon%2FFreeRTOS_Plus_CLI_Demos%2FUARTCommandConsole.c;fp=FreeRTOS-Plus%2FDemo%2FCommon%2FFreeRTOS_Plus_CLI_Demos%2FUARTCommandConsole.c;h=ce5f02d7ab506c0a23e977cfba536e2b51195c0b;hb=7a0d4022a11aa7adcc64d3705dc99fbb73065ed7;hp=3f6179944a8e1e63a0562110fc26775d00f776d8;hpb=c6f0bc2af416b9c9db82534d9d47e8bc2568d114;p=freertos diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c index 3f6179944..ce5f02d7a 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c @@ -164,7 +164,7 @@ xComPortHandle xPort; xPort = xSerialPortInitMinimal( configCLI_BAUD_RATE, cmdQUEUE_LENGTH ); /* Send the welcome message. */ - vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage, strlen( pcWelcomeMessage ) ); + vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage, ( unsigned short ) strlen( pcWelcomeMessage ) ); for( ;; ) { @@ -183,7 +183,7 @@ xComPortHandle xPort; if( cRxedChar == '\n' || cRxedChar == '\r' ) { /* Just to space the output from the input. */ - vSerialPutString( xPort, ( signed char * ) pcNewLine, strlen( pcNewLine ) ); + vSerialPutString( xPort, ( signed char * ) pcNewLine, ( unsigned short ) strlen( pcNewLine ) ); /* See if the command is empty, indicating that the last command is to be executed again. */ @@ -203,7 +203,7 @@ xComPortHandle xPort; xReturned = FreeRTOS_CLIProcessCommand( cInputString, pcOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE ); /* Write the generated string to the UART. */ - vSerialPutString( xPort, ( signed char * ) pcOutputString, strlen( pcOutputString ) ); + vSerialPutString( xPort, ( signed char * ) pcOutputString, ( unsigned short ) strlen( pcOutputString ) ); } while( xReturned != pdFALSE ); @@ -215,7 +215,7 @@ xComPortHandle xPort; ucInputIndex = 0; memset( cInputString, 0x00, cmdMAX_INPUT_SIZE ); - vSerialPutString( xPort, ( signed char * ) pcEndOfOutputMessage, strlen( pcEndOfOutputMessage ) ); + vSerialPutString( xPort, ( signed char * ) pcEndOfOutputMessage, ( unsigned short ) strlen( pcEndOfOutputMessage ) ); } else { @@ -260,7 +260,7 @@ void vOutputString( const char * const pcMessage ) { if( xSemaphoreTake( xTxMutex, cmdMAX_MUTEX_WAIT ) == pdPASS ) { - vSerialPutString( xPort, ( signed char * ) pcMessage, strlen( pcMessage ) ); + vSerialPutString( xPort, ( signed char * ) pcMessage, ( unsigned short ) strlen( pcMessage ) ); xSemaphoreGive( xTxMutex ); } }