下面这段程序里的void delay (u16 i)是什么意思?
下面这段程序里的voiddelay(u16i)是什么意思?#include<reg52.h>typedefunsignedcharu8;typedefunsignedin...
下面这段程序里的void delay (u16 i)是什么意思?#include<reg52.h>
typedef unsigned char u8;
typedef unsigned int u16;
sbit q=P2^0;
void delay(u16 i)
{
while(i--);
}
void main()
{
while(1)
{
q=0;
delay(50000);
delay(50000);
q=1;
delay(500);
}
} 展开
typedef unsigned char u8;
typedef unsigned int u16;
sbit q=P2^0;
void delay(u16 i)
{
while(i--);
}
void main()
{
while(1)
{
q=0;
delay(50000);
delay(50000);
q=1;
delay(500);
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询