求C语言高手解答error C267: 'Tdelay': requires ANSI-style prototype问题!
#include<reg52.h>#defineucharunsignedchar#defineuintunsignedint#defineLED_ON0x01sbitd...
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
#define LED_ON 0x01
sbit dsio=P1^7;
sbit temp_add=P1^0;
sbit temp_sub=P1^1;
sbit up1_temp=P1^2;
sbit down_temp=P1^3;
sbit tenbit=P1^5;
sbit sigbit=P1^6;
uchar temp_value,temp1_value;
uchar aa,bb,cc,flag;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,0x66,
0x6d,0x7d,0x07,0x7f,0x6f,
0xbf,0x86,0xdb,0xcf,0xe6,
0xed,0xfd,0x87,0xff,0xef};
uint tempr=25;
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void Tdelay(uint t)
{
uint i;
while(t--)
{for(i=0;i<125;i++);}
}
void delay_18b20(uchar j)
{
while(j--);
}
void input(uchar dat)
{
uint i,j;
bit testb;
for(i=8;i>0;i--)
{
testb=dat&0x01;
dat=dat>>1;
if(testb)
{
dsio=0;
j++;j++;
dsio=1;
delay_18b20(4);
}
else
{
dsio=0;
delay_18b20(4);
dsio=1;
j++;j++;
}
}
}
void tmstart()
{
reset_18b20();
tmpre();
Tdelay(1);
input(0xcc);
input(0x44);
}
在Tdelay(1)处出现如题错误提示,请问怎样解决? 展开
#define uchar unsigned char
#define uint unsigned int
#define LED_ON 0x01
sbit dsio=P1^7;
sbit temp_add=P1^0;
sbit temp_sub=P1^1;
sbit up1_temp=P1^2;
sbit down_temp=P1^3;
sbit tenbit=P1^5;
sbit sigbit=P1^6;
uchar temp_value,temp1_value;
uchar aa,bb,cc,flag;
uchar code table[]={
0x3f,0x06,0x5b,0x4f,0x66,
0x6d,0x7d,0x07,0x7f,0x6f,
0xbf,0x86,0xdb,0xcf,0xe6,
0xed,0xfd,0x87,0xff,0xef};
uint tempr=25;
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void Tdelay(uint t)
{
uint i;
while(t--)
{for(i=0;i<125;i++);}
}
void delay_18b20(uchar j)
{
while(j--);
}
void input(uchar dat)
{
uint i,j;
bit testb;
for(i=8;i>0;i--)
{
testb=dat&0x01;
dat=dat>>1;
if(testb)
{
dsio=0;
j++;j++;
dsio=1;
delay_18b20(4);
}
else
{
dsio=0;
delay_18b20(4);
dsio=1;
j++;j++;
}
}
}
void tmstart()
{
reset_18b20();
tmpre();
Tdelay(1);
input(0xcc);
input(0x44);
}
在Tdelay(1)处出现如题错误提示,请问怎样解决? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询