帮忙看下51keil编译出现syntax error near sbit,什么原因 20
include<reg52.h>#defineucharunsignedchar#defineintunsignedintsbitstart=P0^1;sbitup=P0...
include<reg52.h>
#define uchar unsigned char
#define int unsigned int
sbit start=P0^1;
sbit up=P0^2;
sbit down=P0^3;
sbit left=P0^4;
sbit right=P0^5;
sbit in11=P1^0;
sbit in12=P1^1;
sbit in13=P1^2;
sbit in14=P1^3;
sbit in21=P1^4;
sbit in22=P1^5;
void main()
{
P0=0;
P1=0;
if(up==1)
{
in11=1;
in12=0;
}
if(down==1)
{
in11=0;
in12=1;
}
if(left==1)
{
in13=1;
in14=0;
}
if(right==1)
{
in13=0;
in14=1;
}
if(start==1)
{
in21=1;
in22=0;
}
} 展开
#define uchar unsigned char
#define int unsigned int
sbit start=P0^1;
sbit up=P0^2;
sbit down=P0^3;
sbit left=P0^4;
sbit right=P0^5;
sbit in11=P1^0;
sbit in12=P1^1;
sbit in13=P1^2;
sbit in14=P1^3;
sbit in21=P1^4;
sbit in22=P1^5;
void main()
{
P0=0;
P1=0;
if(up==1)
{
in11=1;
in12=0;
}
if(down==1)
{
in11=0;
in12=1;
}
if(left==1)
{
in13=1;
in14=0;
}
if(right==1)
{
in13=0;
in14=1;
}
if(start==1)
{
in21=1;
in22=0;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询