In the following code snippet; I am checking if characters are available and printing the same. But I want to store these characters as string until someone presses 'Enter' key. For ex: if the input to speed is 50. I should be able to receive 50 in string, print it on console and then process it into decimal value for further evaluation.
-
while( 1 ) {
-
if( UARTCharsAvail(UART0_BASE) )
-
UARTCharPut( UART0_BASE, UARTCharGet(UART0_BASE) );
But when I try to echo the same character on console, my UART receive buffer gets over written with the printed value. It takes both input from keyboard and the printed value.
Any suggestions?