majeed1352
Newbie level 3
- Joined
- Oct 18, 2014
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 22
Hi,
I want to get a string from UART1 and analyse it with switch...case as follow:
char Comm[12];
.
.
if(Uart1_data_Readey()){
Uart1_read_text(Comm,".",255);
.
.
switch(Comm){
case "ON": .. .. .. ..; break;
case "OFF":.. .. .. ..; break;
.
.
default: Lcd_out_cp("BAD COMMAND";}
but the cumpiler says: " Operator " is not applicable to these operands"
What should I do to resolve it. Please guide me.
Thanks
I want to get a string from UART1 and analyse it with switch...case as follow:
char Comm[12];
.
.
if(Uart1_data_Readey()){
Uart1_read_text(Comm,".",255);
.
.
switch(Comm){
case "ON": .. .. .. ..; break;
case "OFF":.. .. .. ..; break;
.
.
default: Lcd_out_cp("BAD COMMAND";}
but the cumpiler says: " Operator " is not applicable to these operands"
What should I do to resolve it. Please guide me.
Thanks