我想完成识别接收汉字的程序,大家帮我看看
void USART1_IRQHandler(void)
{
uint8_t ch,ch1[]="亮";
uint8_t ch2[]="灭";
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
//ch = USART1->DR;
ch=USART_ReceiveData(USART1);
if(strcmp(ch,ch1)==0) //编译器提示这里有错误
{
LED1(ON);
LED2(ON);
LED3(ON);
}
else if(strcmp(ch,ch2)==0) //编译器提示这里有错误
{
LED1(OFF);
LED2(OFF);
LED3(OFF);
}
else
printf("\nerror\n");
}
}..\..\User\stm32f10x_it.c(157): error: #167: argument of type "uint8_t" is incompatible with parameter of type "const char *" |
|