欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
warning C275: expression with possibly no effect單片機程序編譯錯誤
[打印本頁]
作者:
snowy.
時間:
2019-6-26 10:30
標題:
warning C275: expression with possibly no effect單片機程序編譯錯誤
#include <reg52.h>
#define uchar unsigned char
#define uint unsigned int
sbit wei=P2^4;
sbit wei1=P2^5;
sbit beep=P2^0;
sbit sensor=P0^7;
sbit sensor1=P0^6;
uchar flag1;
uchar flag;
void chuankou(uchar temp)
{
uchar table1[]={1,2};
uchar m;
PCON=0x00;
SCON=0x50;
TMOD=0x20;
TH1=0xE6;
TL1=0xE6;
TR1=1;
for(m=0;m<2;m++)
{
SBUF=table1[temp];
while(TI==0);
TI=0;
}
}
void delay(uint t)
{
while(t--);
}
void Test_Voltage(void)
{
if(sensor==0&sensor1==1)
{
delay(10000);
if(sensor == 0)
{
flag1 = 1;
}
else
{
flag1 == 0;
}
}
else
{
flag1 == 0;
}
}
void action(void)
{
if(flag1 == 1)
{
wei=0xfe;
P0 = 0x25;
beep = 0;
chuankou(1);
delay(10000);
beep = 1;
delay(10000);
wei=0xfd;
}
else
{
wei=0;
P0 = 0x03;
}
}
void Test_Voltage1(void)
{
if(sensor1==0&sensor==1)
{
delay(10000);
if(sensor1==0)
{
flag = 1;
}
else
{
flag = 0;
}
}
else
{
flag = 0;
}
}
void action1(void)
{
if(flag == 1)
{
wei=0xfe;
P0 = 0x9f;
beep = 0;
chuankou(0);
delay(10000);
beep = 1;
delay(10000);
wei=0xfd;
}
else
{
wei=0;
P0 = 0x03;
}
}
void main(void)
{
while(1)
{
Test_Voltage();
action();
Test_Voltage1();
action1();
}
}
紅外感應.C(44): warning C275: expression with possibly no effect
作者:
Antiboy
時間:
2021-4-9 21:46
倆flag1后面多打了一個等號
歡迎光臨 (http://m.raoushi.com/bbs/)
Powered by Discuz! X3.1