Skip to content
Snippets Groups Projects
Commit 96082d0d authored by Joachim Bach's avatar Joachim Bach
Browse files

corrected weird indentation

parent 1baeda0c
No related branches found
No related tags found
No related merge requests found
...@@ -113,13 +113,16 @@ void exec_user_read_write_uart() ...@@ -113,13 +113,16 @@ void exec_user_read_write_uart()
} }
str[i]=0; str[i]=0;
value_idx=i+1; value_idx=i+1;
} else if (!isxdigit(str[i])) }
else if (!isxdigit(str[i]))
{ {
strcpy(str, "\r\nSyntax error! Expected syntax is either <8 characters hexadecimal address> for reading\r\n or <8 characters hexadecimal address>,<8 characters hexadecimal value> for writing\r\n"); strcpy(str, "\r\nSyntax error! Expected syntax is either <8 characters hexadecimal address> for reading\r\n or <8 characters hexadecimal address>,<8 characters hexadecimal value> for writing\r\n");
uart0_send_ref((uint8_t *)str, strlen(str)); uart0_send_ref((uint8_t *)str, strlen(str));
return; return;
} }
} }
if ((coma_nb&(i<2)) || i>17) if ((coma_nb&(i<2)) || i>17)
{ {
strcpy(str, "\r\nSyntax error! Expected syntax is either <8 characters hexadecimal address> for reading\r\n or <8 characters hexadecimal address>,<8 characters hexadecimal value> for writing\r\n (Bad length!) \r\n"); strcpy(str, "\r\nSyntax error! Expected syntax is either <8 characters hexadecimal address> for reading\r\n or <8 characters hexadecimal address>,<8 characters hexadecimal value> for writing\r\n (Bad length!) \r\n");
...@@ -127,6 +130,7 @@ void exec_user_read_write_uart() ...@@ -127,6 +130,7 @@ void exec_user_read_write_uart()
return; return;
} }
sscanf(str, "%x", &addr); sscanf(str, "%x", &addr);
if (!coma_nb) // if read if (!coma_nb) // if read
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment