#define rGPBCON (*(volatile unsigned*)0x56000010)
#define rGPBDAT (*(volatile unsinged*)0x56000014)
#define rGPBUP (*(volatile unsigned*)0x56000018)
void delay(long z);
int main(void)
{
rGPBCON=rGPBCON &=(~((3<<16)|(3<<14)|(3<<12)|(3<<10)|(3<<0)));
rGPBCON |=((1<<16)|(1<<14)|(1<<12)|(1<<10));
rGPBUP =0x7ff;
unsigned char led[]={0x7df,0x7bf,0x77f,0x6ff};
unsigned int i;
while(1)
{
for(i=0;i<4;i++)
{
rGPBDAT=led[i];
delay(200000);
}
}
}
void delay(long z)
{
while(z--);
}
程序如上,编译时3个错误,提示数组初始化那儿没法在下面的语句块中出现!求解!!!
|