我在编译单片机程序时出现以下问题,请问,是因为与ANSIC不兼容吗?
我用的是keiluvision3.如何解决?THUNDER_LAMP.C(22):warningC206:'_icol_':missingfunction-prototy...
我用的是keil uvision3.如何解决?THUNDER_LAMP.C(22): warning C206: '_icol_': missing function-prototype
我已经用#include<intrins.h>命令把头文件包函进去了. 程序是这样子的:
#include<reg51.h>
#include<intrins.h>
#define LED P2
sfr WDT = 0xa6;
void delay(unsigned int count) ;
void main(void)
{ unsigned int ver_led;
unsigned int i ;
TMOD = 0x02;
IE = 0x82;
TH0 = 6;
TL0 = 6;
TCON = 0x10;
WDT = 0x1e;
WDT = 0xe1;
ver_led = 0xfe;
while(1)
{ for(i = 0;i < 7; i ++)
{ LED = ver_led;
delay(200);
ver_led = _icol_(ver_led,1);
}
delay(200);
for(i = 0;i < 7; i ++)
{ LED = ver_led;
delay(200);
ver_led = _icor_(ver_led,1);
}
delay(200);
} 展开
我已经用#include<intrins.h>命令把头文件包函进去了. 程序是这样子的:
#include<reg51.h>
#include<intrins.h>
#define LED P2
sfr WDT = 0xa6;
void delay(unsigned int count) ;
void main(void)
{ unsigned int ver_led;
unsigned int i ;
TMOD = 0x02;
IE = 0x82;
TH0 = 6;
TL0 = 6;
TCON = 0x10;
WDT = 0x1e;
WDT = 0xe1;
ver_led = 0xfe;
while(1)
{ for(i = 0;i < 7; i ++)
{ LED = ver_led;
delay(200);
ver_led = _icol_(ver_led,1);
}
delay(200);
for(i = 0;i < 7; i ++)
{ LED = ver_led;
delay(200);
ver_led = _icor_(ver_led,1);
}
delay(200);
} 展开
展开全部
那是因为没定义就引用,你要把相应的函数或变量放在引用前面,一般都是放在文件最前面,如果是在别的文件里定义的就要用#include包含进来
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询