Keil5一直显示分号和括号附近有语法错误,不知道到底哪里错了
#include <REGX52.H>
#include "IR.h"
#include "Motor.h"
unsigned int time;
unsigned char command,speed;
void main()
{
IR_Init();
motor_init();
while(1)
{
if(IR_getdataflag())
{
command=IR_getcommend();
if(command==IR_0){speed=0;}
if(command==IR_1){speed=1;}
if(command==IR_2){speed=2;}
if(command==IR_3){speed=3;}
if(speed==0){motor_setspeed(0);}
if(speed==1){motor_setspeed(25);}
if(speed==2){motor_setspeed(50);}
if(speed==3){motor_setspeed(75);}
}
}
}