标题:
求大神帮我改改有警告
[打印本页]
作者:
璎珞
时间:
2018-4-6 21:16
标题:
求大神帮我改改有警告
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: _DELAY
MODULE: zy.obj (ZY)
ADDRESS: 0A3AH
#include<reg51.h>
#define LED P1
void delay( int x);
main()
{
unsigned char i,j;
unsigned char dis1[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
unsigned char dis2[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};
unsigned char dis3[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};
unsigned char dis4[]={0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe};
unsigned char dis5[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00};
unsigned char dis6[]={0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f};
unsigned char dis7[]={0xe7,0xdb,0xbd,0x7e,0x7e,0xbd,0xdb,0xe7};
unsigned char dis8[]={0xf0,0x0f,0xf0,0x0f,0xf0,0x0f,0xf0,0x0f};
unsigned char dis9[]={0x3f,0xcf,0xf3,0xfc,0xfc,0xf3,0xcf,0x3f};
unsigned char dis10[]={0x33,0xcc,0x33,0xcc,0x33,0xcc,0x33,0xcc};
while(1)
{
for(j=0;j<2;j++)
{
for(i=0;i<8;i++)
{
LED=dis1[i];
delay(100);
}
}
for(j=0;j<3;j++)
{
for(i=0;i<8;i++)
{
LED=dis2[i];
delay(100);
}
}
for(j=0;j<4;j++)
{
for(i=0;i<8;i++)
{
LED=dis3[i];
delay(100);
}
}
for(j=0;j<2;j++)
{
for(i=0;i<8;i++)
{
LED=dis4[i];
delay(100);
}
}
for(j=0;j<3;j++)
{
for(i=0;i<8;i++)
{
LED=dis5[i];
delay(100);
}
}
for(j=0;j<4;j++)
{
for(i=0;i<8;i++)
{
LED=dis6[i];
delay(100);
}
}
for(j=0;j<2;j++)
{
for(i=0;i<8;i++)
{
LED=dis7[i];
delay(100);
}
}
for(j=0;j<3;j++)
{
for(i=0;i<8;i++)
{
LED=dis8[i];
delay(100);
}
}
for(j=0;j<4;j++)
{
for(i=0;i<8;i++)
{
LED=dis9[i];
delay(100);
}
}
for(j=0;j<2;j++)
{
for(i=0;i<8;i++)
{
LED=dis10[i];
delay(100);
}
}
}
}
复制代码
作者:
爱睡觉的小男孩
时间:
2018-4-6 22:50
这个是单片机?表示不是很懂编程
作者:
zhangxiaozi
时间:
2018-4-6 23:02
把delay(int x) 的实体写上,
比如在后边加上
void delay(int x)
{
while(--x);
}
就可以了,没警告了
作者:
flykick
时间:
2018-4-7 12:17
警告信息可以贴出来
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1