void UART2PrintString( char *str )
{
unsigned char c;
while( (c = *str++) )
UART2PutChar(c);
}
SWITCH (YADA)
{
case 1: UART3PrintString("01");
break;
case 2: UART3PrintString("03");
break;
// read a string, terminate on \n, return length of string
int UART3readString(char *data)
{
int index=0;
data[0]=0;
while(1)
{
char ch=UART3getChar();
data[index++]=ch; data[index]=0;
if(ch=='\n') return index;
}
}
char data[100];
SWITCH (YADA)
{
case 1: UART3PrintString("01");
UART3readString(data);
break;
case 2: UART3PrintString("03");
UART3readString(data);
break;
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?