自动循迹小车程序(51)
#define P_IOA_Data (volatile unsigned int *)0x7000
#define P_IOA_Dir (volatile unsigned int *)0x7002
#define P_IOA_Attrib (volatile unsigned int *)0x7003
unsigned int scan();//检测黑线函数定声明
unsigned int num=0;
void delay();
void init_1()//输入初始化
{
[P_IOA_Dir]=0x00f0;
[P_IOA_Attrib]=0x00f0;
[P_IOA_Data]=0x000f;
}
//void init_2()//输出初始化
//{
//[P_IOA_Dir]=1;
//[P_IOA_Attrib]=1;
//[P_IOA_Data]=0;
//}
void main()