keil中的 undefined identifier问题
#include<reg51.h>sbitLED1=p2^0;voidDelay(unsignedinta);voidmain(){while(1){LED1=0;Del...
#include<reg51.h>
sbit LED1=p2^0;
void Delay(unsigned int a);
void main ()
{
while(1)
{
LED1=0;
Delay(5000);
LED1=1;
Delay(5000) ;
}
}
void Delay(unsigned int a)
{
unsigned char b;
for(;a>0;a--)
{
for(b=100;b>0;b--);
}
}
最后出现compiling led.c...
LED.C(3): error C202: 'p2': undefined identifier
LED.C(10): error C202: 'LED1': undefined identifier
LED.C(12): error C202: 'LED1': undefined identifier
led.c - 3 Error(s), 0 Warning(s). 怎么解决,谢谢 展开
sbit LED1=p2^0;
void Delay(unsigned int a);
void main ()
{
while(1)
{
LED1=0;
Delay(5000);
LED1=1;
Delay(5000) ;
}
}
void Delay(unsigned int a)
{
unsigned char b;
for(;a>0;a--)
{
for(b=100;b>0;b--);
}
}
最后出现compiling led.c...
LED.C(3): error C202: 'p2': undefined identifier
LED.C(10): error C202: 'LED1': undefined identifier
LED.C(12): error C202: 'LED1': undefined identifier
led.c - 3 Error(s), 0 Warning(s). 怎么解决,谢谢 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询