#include <reg52.h>
#include <intrins.h>
typedef unsigned char u8;
typedef unsigned int u16;
#define led P2
void delay(u16 i)
{
while(i--);
}
void main()
{
led=0xfe;
delay(50000);
u8 i=0;
while(1)
{
for(i=0;i<7;i++)
{
led=_crol_(led,1);
delay(50000);
}
for(i=0;i<7;i++)
{
led=_cror_(led,1);
delay(50000);
}
}
}
提示我未定义变量i,但是变量i我已经定位为unsigned int类型了,请问为何程序还是无法运行?
|