专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
51单片机
求一个 AVR单片机 bit.h 的头文件
2019-07-15 11:44
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
51单片机
13226
2
1771
如题,那位大神有的给一个。谢谢
diablochina@126.com
友情提示:
此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
2条回答
houjue
1楼-- · 2019-07-15 12:48
是那个IDE用的呀?
加载中...
hobbye501
2楼-- · 2019-07-15 18:32
拿走不谢!
/**********************************************************************
头文件功能说明:AVR单片机 引脚 位操作
最后修改: SSTA_XJL
时间: 2009.3.28
**********************************************************************/
#ifndef _BIT_H_
#define _BIT_H_
/******************************位段定义*****************************************/
typedef struct{
unsigned BIT0 : 1 ;
unsigned BIT1 : 1 ;
unsigned BIT2 : 1 ;
unsigned BIT3 : 1 ;
unsigned BIT4 : 1 ;
unsigned BIT5 : 1 ;
unsigned BIT6 : 1 ;
unsigned BIT7 : 1 ;
}PBIT;
/*******************************数据类型申明***************************************/
#ifndef uint
#define uint unsigned int
#endif
#ifndef uchar
#define uchar unsigned char
#endif
#ifndef ulong
#define ulong unsigned long
#endif
/**********************************************************************************/
/***********************************************************************/
#define SET_ADDRESS(Var) (*((volatile PBIT *)&(Var)))
/**************************************************************************/
#ifdef PORTA
#define PORTA_BIT SET_ADDRESS(PORTA)
#endif
#ifdef PORTB
#define PORTB_BIT SET_ADDRESS(PORTB)
#endif
#ifdef PORTC
#define PORTC_BIT SET_ADDRESS(PORTC)
#endif
#ifdef PORTD
#define PORTD_BIT SET_ADDRESS(PORTD)
#endif
#ifdef PORTE
#define PORTE_BIT SET_ADDRESS(PORTE)
#endif
#ifdef PORTF
#define PORTF_BIT SET_ADDRESS(PORTF)
#endif
#ifdef PORTG
#define PORTG_BIT SET_ADDRESS(PORTG)
#endif
/*******************************************************************************/
#ifdef DDRA
#define DDRA_BIT SET_ADDRESS(DDRA)
#endif
#ifdef DDRB
#define DDRB_BIT SET_ADDRESS(DDRB)
#endif
#ifdef DDRC
#define DDRC_BIT SET_ADDRESS(DDRC)
#endif
#ifdef DDRD
#define DDRD_BIT SET_ADDRESS(DDRD)
#endif
#ifdef DDRE
#define DDRE_BIT SET_ADDRESS(DDRE)
#endif
#ifdef DDRF
#define DDRF_BIT SET_ADDRESS(DDRF)
#endif
#ifdef DDRG
#define DDRG_BIT SET_ADDRESS(DDRG)
#endif
/**********************************************************/
#ifdef PINA
#define PINA_BIT SET_ADDRESS(PINA)
#endif
#ifdef PINB
#define PINB_BIT SET_ADDRESS(PINB)
#endif
#ifdef PINC
#define PINC_BIT SET_ADDRESS(PINC)
#endif
#ifdef PIND
#define PIND_BIT SET_ADDRESS(PIND)
#endif
#ifdef PINE
#define PINE_BIT SET_ADDRESS(PINE)
#endif
#ifdef PINF
#define PINF_BIT SET_ADDRESS(PINF)
#endif
#ifdef PING
#define PING_BIT SET_ADDRESS(PING)
#endif
/******************************************************************************/
#ifdef PORTA
#define PA_0 PORTA_BIT.BIT0
#define PA_1 PORTA_BIT.BIT1
#define PA_2 PORTA_BIT.BIT2
#define PA_3 PORTA_BIT.BIT3
#define PA_4 PORTA_BIT.BIT4
#define PA_5 PORTA_BIT.BIT5
#define PA_6 PORTA_BIT.BIT6
#define PA_7 PORTA_BIT.BIT7
#endif
#ifdef PORTB
#define PB_0 PORTB_BIT.BIT0
#define PB_1 PORTB_BIT.BIT1
#define PB_2 PORTB_BIT.BIT2
#define PB_3 PORTB_BIT.BIT3
#define PB_4 PORTB_BIT.BIT4
#define PB_5 PORTB_BIT.BIT5
#define PB_6 PORTB_BIT.BIT6
#define PB_7 PORTB_BIT.BIT7
#endif
#ifdef PORTC
#define PC_0 PORTC_BIT.BIT0
#define PC_1 PORTC_BIT.BIT1
#define PC_2 PORTC_BIT.BIT2
#define PC_3 PORTC_BIT.BIT3
#define PC_4 PORTC_BIT.BIT4
#define PC_5 PORTC_BIT.BIT5
#define PC_6 PORTC_BIT.BIT6
#define PC_7 PORTC_BIT.BIT7
#endif
#ifdef PORTD
#define PD_0 PORTD_BIT.BIT0
#define PD_1 PORTD_BIT.BIT1
#define PD_2 PORTD_BIT.BIT2
#define PD_3 PORTD_BIT.BIT3
#define PD_4 PORTD_BIT.BIT4
#define PD_5 PORTD_BIT.BIT5
#define PD_6 PORTD_BIT.BIT6
#define PD_7 PORTD_BIT.BIT7
#endif
#ifdef PORTE
#define PE_0 PORTE_BIT.BIT0
#define PE_1 PORTE_BIT.BIT1
#define PE_2 PORTE_BIT.BIT2
#define PE_3 PORTE_BIT.BIT3
#define PE_4 PORTE_BIT.BIT4
#define PE_5 PORTE_BIT.BIT5
#define PE_6 PORTE_BIT.BIT6
#define PE_7 PORTE_BIT.BIT7
#endif
#ifdef PORTF
#define PF_0 PORTF_BIT.BIT0
#define PF_1 PORTF_BIT.BIT1
#define PF_2 PORTF_BIT.BIT2
#define PF_3 PORTF_BIT.BIT3
#define PF_4 PORTF_BIT.BIT4
#define PF_5 PORTF_BIT.BIT5
#define PF_6 PORTF_BIT.BIT6
#define PF_7 PORTF_BIT.BIT7
#endif
#ifdef PORTG
#define PG_0 PORTG_BIT.BIT0
#define PG_1 PORTG_BIT.BIT1
#define PG_2 PORTG_BIT.BIT2
#define PG_3 PORTG_BIT.BIT3
#define PG_4 PORTG_BIT.BIT4
#define PG_5 PORTG_BIT.BIT5
#define PG_6 PORTG_BIT.BIT6
#define PG_7 PORTG_BIT.BIT7
#endif
/**********************************************************************/
#ifdef DDRA
#define DDRA_0 DDRA_BIT.BIT0
#define DDRA_1 DDRA_BIT.BIT1
#define DDRA_2 DDRA_BIT.BIT2
#define DDRA_3 DDRA_BIT.BIT3
#define DDRA_4 DDRA_BIT.BIT4
#define DDRA_5 DDRA_BIT.BIT5
#define DDRA_6 DDRA_BIT.BIT6
#define DDRA_7 DDRA_BIT.BIT7
#endif
#ifdef DDRB
#define DDRB_0 DDRB_BIT.BIT0
#define DDRB_1 DDRB_BIT.BIT1
#define DDRB_2 DDRB_BIT.BIT2
#define DDRB_3 DDRB_BIT.BIT3
#define DDRB_4 DDRB_BIT.BIT4
#define DDRB_5 DDRB_BIT.BIT5
#define DDRB_6 DDRB_BIT.BIT6
#define DDRB_7 DDRB_BIT.BIT7
#endif
#ifdef DDRC
#define DDRC_0 DDRC_BIT.BIT0
#define DDRC_1 DDRC_BIT.BIT1
#define DDRC_2 DDRC_BIT.BIT2
#define DDRC_3 DDRC_BIT.BIT3
#define DDRC_4 DDRC_BIT.BIT4
#define DDRC_5 DDRC_BIT.BIT5
#define DDRC_6 DDRC_BIT.BIT6
#define DDRC_7 DDRC_BIT.BIT7
#endif
#ifdef DDRD
#define DDRD_0 DDRD_BIT.BIT0
#define DDRD_1 DDRD_BIT.BIT1
#define DDRD_2 DDRD_BIT.BIT2
#define DDRD_3 DDRD_BIT.BIT3
#define DDRD_4 DDRD_BIT.BIT4
#define DDRD_5 DDRD_BIT.BIT5
#define DDRD_6 DDRD_BIT.BIT6
#define DDRD_7 DDRD_BIT.BIT7
#endif
#ifdef DDRE
#define DDRE_0 DDRE_BIT.BIT0
#define DDRE_1 DDRE_BIT.BIT1
#define DDRE_2 DDRE_BIT.BIT2
#define DDRE_3 DDRE_BIT.BIT3
#define DDRE_4 DDRE_BIT.BIT4
#define DDRE_5 DDRE_BIT.BIT5
#define DDRE_6 DDRE_BIT.BIT6
#define DDRE_7 DDRE_BIT.BIT7
#endif
#ifdef DDRF
#define DDRF_0 DDRF_BIT.BIT0
#define DDRF_1 DDRF_BIT.BIT1
#define DDRF_2 DDRF_BIT.BIT2
#define DDRF_3 DDRF_BIT.BIT3
#define DDRF_4 DDRF_BIT.BIT4
#define DDRF_5 DDRF_BIT.BIT5
#define DDRF_6 DDRF_BIT.BIT6
#define DDRF_7 DDRF_BIT.BIT7
#endif
#ifdef DDRG
#define DDRG_0 DDRG_BIT.BIT0
#define DDRG_1 DDRG_BIT.BIT1
#define DDRG_2 DDRG_BIT.BIT2
#define DDRG_3 DDRG_BIT.BIT3
#define DDRG_4 DDRG_BIT.BIT4
#define DDRG_5 DDRG_BIT.BIT5
#define DDRG_6 DDRG_BIT.BIT6
#define DDRG_7 DDRG_BIT.BIT7
#endif
/*****************************************************************************/
#ifdef PINA
#define PINA_0 PINA_BIT.BIT0
#define PINA_1 PINA_BIT.BIT1
#define PINA_2 PINA_BIT.BIT2
#define PINA_3 PINA_BIT.BIT3
#define PINA_4 PINA_BIT.BIT4
#define PINA_5 PINA_BIT.BIT5
#define PINA_6 PINA_BIT.BIT6
#define PINA_7 PINA_BIT.BIT7
#endif
#ifdef PINB
#define PINB_0 PINB_BIT.BIT0
#define PINB_1 PINB_BIT.BIT1
#define PINB_2 PINB_BIT.BIT2
#define PINB_3 PINB_BIT.BIT3
#define PINB_4 PINB_BIT.BIT4
#define PINB_5 PINB_BIT.BIT5
#define PINB_6 PINB_BIT.BIT6
#define PINB_7 PINB_BIT.BIT7
#endif
#ifdef PINC
#define PINC_0 PINC_BIT.BIT0
#define PINC_1 PINC_BIT.BIT1
#define PINC_2 PINC_BIT.BIT2
#define PINC_3 PINC_BIT.BIT3
#define PINC_4 PINC_BIT.BIT4
#define PINC_5 PINC_BIT.BIT5
#define PINC_6 PINC_BIT.BIT6
#define PINC_7 PINC_BIT.BIT7
#endif
#ifdef PIND
#define PIND_0 PIND_BIT.BIT0
#define PIND_1 PIND_BIT.BIT1
#define PIND_2 PIND_BIT.BIT2
#define PIND_3 PIND_BIT.BIT3
#define PIND_4 PIND_BIT.BIT4
#define PIND_5 PIND_BIT.BIT5
#define PIND_6 PIND_BIT.BIT6
#define PIND_7 PIND_BIT.BIT7
#endif
#ifdef PINE
#define PINE_0 PINE_BIT.BIT0
#define PINE_1 PINE_BIT.BIT1
#define PINE_2 PINE_BIT.BIT2
#define PINE_3 PINE_BIT.BIT3
#define PINE_4 PINE_BIT.BIT4
#define PINE_5 PINE_BIT.BIT5
#define PINE_6 PINE_BIT.BIT6
#define PINE_7 PINE_BIT.BIT7
#endif
#ifdef PINF
#define PINF_0 PINF_BIT.BIT0
#define PINF_1 PINF_BIT.BIT1
#define PINF_2 PINF_BIT.BIT2
#define PINF_3 PINF_BIT.BIT3
#define PINF_4 PINF_BIT.BIT4
#define PINF_5 PINF_BIT.BIT5
#define PINF_6 PINF_BIT.BIT6
#define PINF_7 PINF_BIT.BIT7
#endif
#ifdef PING
#define PING_0 PING_BIT.BIT0
#define PING_1 PING_BIT.BIT1
#define PING_2 PING_BIT.BIT2
#define PING_3 PING_BIT.BIT3
#define PING_4 PING_BIT.BIT4
#define PING_5 PING_BIT.BIT5
#define PING_6 PING_BIT.BIT6
#define PING_7 PING_BIT.BIT7
#endif
#endif
/*******************************************************************************/
bit.h
下载积分: 积分 -1 分
8.34 KB, 下载次数: 4, 下载积分: 积分 -1 分
加载中...
一周热门
更多
>
相关问题
【东软载波ESF0654 PDS开发板活动】开箱
1 个回答
东软载波ESF0654 PDS开发板外部中断
1 个回答
东软载波ESF0654 PDS开发板高级控制定时器AD16C4T
1 个回答
用串口调试助手为什么只能在hex模式接收发送而在文本模式不行
9 个回答
触摸芯片SC02B/SC04B在地砖灯的设计方案
1 个回答
东软载波ESF0654 PDS开发板串口USART0代码分享
1 个回答
普通32位单片机使用linux的应用代码
5 个回答
东软载波ESF0654 PDS开发板AT24C04的调试
9 个回答
相关文章
51单片机与蓝牙模块连接
0个评论
51单片机的硬件结构
0个评论
基于51单片机的无线遥控器制作
0个评论
51单片机 AD转换
0个评论
51单片机数码管递增显示
0个评论
如何实现对单片机寄存器的访问
0个评论
基于51单片机的指纹密码锁
0个评论
×
关闭
采纳回答
向帮助了您的网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
51单片机
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
关闭
您已邀请
15
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
/**********************************************************************
头文件功能说明:AVR单片机 引脚 位操作
最后修改: SSTA_XJL
时间: 2009.3.28
**********************************************************************/
#ifndef _BIT_H_
#define _BIT_H_
/******************************位段定义*****************************************/
typedef struct{
unsigned BIT0 : 1 ;
unsigned BIT1 : 1 ;
unsigned BIT2 : 1 ;
unsigned BIT3 : 1 ;
unsigned BIT4 : 1 ;
unsigned BIT5 : 1 ;
unsigned BIT6 : 1 ;
unsigned BIT7 : 1 ;
}PBIT;
/*******************************数据类型申明***************************************/
#ifndef uint
#define uint unsigned int
#endif
#ifndef uchar
#define uchar unsigned char
#endif
#ifndef ulong
#define ulong unsigned long
#endif
/**********************************************************************************/
/***********************************************************************/
#define SET_ADDRESS(Var) (*((volatile PBIT *)&(Var)))
/**************************************************************************/
#ifdef PORTA
#define PORTA_BIT SET_ADDRESS(PORTA)
#endif
#ifdef PORTB
#define PORTB_BIT SET_ADDRESS(PORTB)
#endif
#ifdef PORTC
#define PORTC_BIT SET_ADDRESS(PORTC)
#endif
#ifdef PORTD
#define PORTD_BIT SET_ADDRESS(PORTD)
#endif
#ifdef PORTE
#define PORTE_BIT SET_ADDRESS(PORTE)
#endif
#ifdef PORTF
#define PORTF_BIT SET_ADDRESS(PORTF)
#endif
#ifdef PORTG
#define PORTG_BIT SET_ADDRESS(PORTG)
#endif
/*******************************************************************************/
#ifdef DDRA
#define DDRA_BIT SET_ADDRESS(DDRA)
#endif
#ifdef DDRB
#define DDRB_BIT SET_ADDRESS(DDRB)
#endif
#ifdef DDRC
#define DDRC_BIT SET_ADDRESS(DDRC)
#endif
#ifdef DDRD
#define DDRD_BIT SET_ADDRESS(DDRD)
#endif
#ifdef DDRE
#define DDRE_BIT SET_ADDRESS(DDRE)
#endif
#ifdef DDRF
#define DDRF_BIT SET_ADDRESS(DDRF)
#endif
#ifdef DDRG
#define DDRG_BIT SET_ADDRESS(DDRG)
#endif
/**********************************************************/
#ifdef PINA
#define PINA_BIT SET_ADDRESS(PINA)
#endif
#ifdef PINB
#define PINB_BIT SET_ADDRESS(PINB)
#endif
#ifdef PINC
#define PINC_BIT SET_ADDRESS(PINC)
#endif
#ifdef PIND
#define PIND_BIT SET_ADDRESS(PIND)
#endif
#ifdef PINE
#define PINE_BIT SET_ADDRESS(PINE)
#endif
#ifdef PINF
#define PINF_BIT SET_ADDRESS(PINF)
#endif
#ifdef PING
#define PING_BIT SET_ADDRESS(PING)
#endif
/******************************************************************************/
#ifdef PORTA
#define PA_0 PORTA_BIT.BIT0
#define PA_1 PORTA_BIT.BIT1
#define PA_2 PORTA_BIT.BIT2
#define PA_3 PORTA_BIT.BIT3
#define PA_4 PORTA_BIT.BIT4
#define PA_5 PORTA_BIT.BIT5
#define PA_6 PORTA_BIT.BIT6
#define PA_7 PORTA_BIT.BIT7
#endif
#ifdef PORTB
#define PB_0 PORTB_BIT.BIT0
#define PB_1 PORTB_BIT.BIT1
#define PB_2 PORTB_BIT.BIT2
#define PB_3 PORTB_BIT.BIT3
#define PB_4 PORTB_BIT.BIT4
#define PB_5 PORTB_BIT.BIT5
#define PB_6 PORTB_BIT.BIT6
#define PB_7 PORTB_BIT.BIT7
#endif
#ifdef PORTC
#define PC_0 PORTC_BIT.BIT0
#define PC_1 PORTC_BIT.BIT1
#define PC_2 PORTC_BIT.BIT2
#define PC_3 PORTC_BIT.BIT3
#define PC_4 PORTC_BIT.BIT4
#define PC_5 PORTC_BIT.BIT5
#define PC_6 PORTC_BIT.BIT6
#define PC_7 PORTC_BIT.BIT7
#endif
#ifdef PORTD
#define PD_0 PORTD_BIT.BIT0
#define PD_1 PORTD_BIT.BIT1
#define PD_2 PORTD_BIT.BIT2
#define PD_3 PORTD_BIT.BIT3
#define PD_4 PORTD_BIT.BIT4
#define PD_5 PORTD_BIT.BIT5
#define PD_6 PORTD_BIT.BIT6
#define PD_7 PORTD_BIT.BIT7
#endif
#ifdef PORTE
#define PE_0 PORTE_BIT.BIT0
#define PE_1 PORTE_BIT.BIT1
#define PE_2 PORTE_BIT.BIT2
#define PE_3 PORTE_BIT.BIT3
#define PE_4 PORTE_BIT.BIT4
#define PE_5 PORTE_BIT.BIT5
#define PE_6 PORTE_BIT.BIT6
#define PE_7 PORTE_BIT.BIT7
#endif
#ifdef PORTF
#define PF_0 PORTF_BIT.BIT0
#define PF_1 PORTF_BIT.BIT1
#define PF_2 PORTF_BIT.BIT2
#define PF_3 PORTF_BIT.BIT3
#define PF_4 PORTF_BIT.BIT4
#define PF_5 PORTF_BIT.BIT5
#define PF_6 PORTF_BIT.BIT6
#define PF_7 PORTF_BIT.BIT7
#endif
#ifdef PORTG
#define PG_0 PORTG_BIT.BIT0
#define PG_1 PORTG_BIT.BIT1
#define PG_2 PORTG_BIT.BIT2
#define PG_3 PORTG_BIT.BIT3
#define PG_4 PORTG_BIT.BIT4
#define PG_5 PORTG_BIT.BIT5
#define PG_6 PORTG_BIT.BIT6
#define PG_7 PORTG_BIT.BIT7
#endif
/**********************************************************************/
#ifdef DDRA
#define DDRA_0 DDRA_BIT.BIT0
#define DDRA_1 DDRA_BIT.BIT1
#define DDRA_2 DDRA_BIT.BIT2
#define DDRA_3 DDRA_BIT.BIT3
#define DDRA_4 DDRA_BIT.BIT4
#define DDRA_5 DDRA_BIT.BIT5
#define DDRA_6 DDRA_BIT.BIT6
#define DDRA_7 DDRA_BIT.BIT7
#endif
#ifdef DDRB
#define DDRB_0 DDRB_BIT.BIT0
#define DDRB_1 DDRB_BIT.BIT1
#define DDRB_2 DDRB_BIT.BIT2
#define DDRB_3 DDRB_BIT.BIT3
#define DDRB_4 DDRB_BIT.BIT4
#define DDRB_5 DDRB_BIT.BIT5
#define DDRB_6 DDRB_BIT.BIT6
#define DDRB_7 DDRB_BIT.BIT7
#endif
#ifdef DDRC
#define DDRC_0 DDRC_BIT.BIT0
#define DDRC_1 DDRC_BIT.BIT1
#define DDRC_2 DDRC_BIT.BIT2
#define DDRC_3 DDRC_BIT.BIT3
#define DDRC_4 DDRC_BIT.BIT4
#define DDRC_5 DDRC_BIT.BIT5
#define DDRC_6 DDRC_BIT.BIT6
#define DDRC_7 DDRC_BIT.BIT7
#endif
#ifdef DDRD
#define DDRD_0 DDRD_BIT.BIT0
#define DDRD_1 DDRD_BIT.BIT1
#define DDRD_2 DDRD_BIT.BIT2
#define DDRD_3 DDRD_BIT.BIT3
#define DDRD_4 DDRD_BIT.BIT4
#define DDRD_5 DDRD_BIT.BIT5
#define DDRD_6 DDRD_BIT.BIT6
#define DDRD_7 DDRD_BIT.BIT7
#endif
#ifdef DDRE
#define DDRE_0 DDRE_BIT.BIT0
#define DDRE_1 DDRE_BIT.BIT1
#define DDRE_2 DDRE_BIT.BIT2
#define DDRE_3 DDRE_BIT.BIT3
#define DDRE_4 DDRE_BIT.BIT4
#define DDRE_5 DDRE_BIT.BIT5
#define DDRE_6 DDRE_BIT.BIT6
#define DDRE_7 DDRE_BIT.BIT7
#endif
#ifdef DDRF
#define DDRF_0 DDRF_BIT.BIT0
#define DDRF_1 DDRF_BIT.BIT1
#define DDRF_2 DDRF_BIT.BIT2
#define DDRF_3 DDRF_BIT.BIT3
#define DDRF_4 DDRF_BIT.BIT4
#define DDRF_5 DDRF_BIT.BIT5
#define DDRF_6 DDRF_BIT.BIT6
#define DDRF_7 DDRF_BIT.BIT7
#endif
#ifdef DDRG
#define DDRG_0 DDRG_BIT.BIT0
#define DDRG_1 DDRG_BIT.BIT1
#define DDRG_2 DDRG_BIT.BIT2
#define DDRG_3 DDRG_BIT.BIT3
#define DDRG_4 DDRG_BIT.BIT4
#define DDRG_5 DDRG_BIT.BIT5
#define DDRG_6 DDRG_BIT.BIT6
#define DDRG_7 DDRG_BIT.BIT7
#endif
/*****************************************************************************/
#ifdef PINA
#define PINA_0 PINA_BIT.BIT0
#define PINA_1 PINA_BIT.BIT1
#define PINA_2 PINA_BIT.BIT2
#define PINA_3 PINA_BIT.BIT3
#define PINA_4 PINA_BIT.BIT4
#define PINA_5 PINA_BIT.BIT5
#define PINA_6 PINA_BIT.BIT6
#define PINA_7 PINA_BIT.BIT7
#endif
#ifdef PINB
#define PINB_0 PINB_BIT.BIT0
#define PINB_1 PINB_BIT.BIT1
#define PINB_2 PINB_BIT.BIT2
#define PINB_3 PINB_BIT.BIT3
#define PINB_4 PINB_BIT.BIT4
#define PINB_5 PINB_BIT.BIT5
#define PINB_6 PINB_BIT.BIT6
#define PINB_7 PINB_BIT.BIT7
#endif
#ifdef PINC
#define PINC_0 PINC_BIT.BIT0
#define PINC_1 PINC_BIT.BIT1
#define PINC_2 PINC_BIT.BIT2
#define PINC_3 PINC_BIT.BIT3
#define PINC_4 PINC_BIT.BIT4
#define PINC_5 PINC_BIT.BIT5
#define PINC_6 PINC_BIT.BIT6
#define PINC_7 PINC_BIT.BIT7
#endif
#ifdef PIND
#define PIND_0 PIND_BIT.BIT0
#define PIND_1 PIND_BIT.BIT1
#define PIND_2 PIND_BIT.BIT2
#define PIND_3 PIND_BIT.BIT3
#define PIND_4 PIND_BIT.BIT4
#define PIND_5 PIND_BIT.BIT5
#define PIND_6 PIND_BIT.BIT6
#define PIND_7 PIND_BIT.BIT7
#endif
#ifdef PINE
#define PINE_0 PINE_BIT.BIT0
#define PINE_1 PINE_BIT.BIT1
#define PINE_2 PINE_BIT.BIT2
#define PINE_3 PINE_BIT.BIT3
#define PINE_4 PINE_BIT.BIT4
#define PINE_5 PINE_BIT.BIT5
#define PINE_6 PINE_BIT.BIT6
#define PINE_7 PINE_BIT.BIT7
#endif
#ifdef PINF
#define PINF_0 PINF_BIT.BIT0
#define PINF_1 PINF_BIT.BIT1
#define PINF_2 PINF_BIT.BIT2
#define PINF_3 PINF_BIT.BIT3
#define PINF_4 PINF_BIT.BIT4
#define PINF_5 PINF_BIT.BIT5
#define PINF_6 PINF_BIT.BIT6
#define PINF_7 PINF_BIT.BIT7
#endif
#ifdef PING
#define PING_0 PING_BIT.BIT0
#define PING_1 PING_BIT.BIT1
#define PING_2 PING_BIT.BIT2
#define PING_3 PING_BIT.BIT3
#define PING_4 PING_BIT.BIT4
#define PING_5 PING_BIT.BIT5
#define PING_6 PING_BIT.BIT6
#define PING_7 PING_BIT.BIT7
#endif
#endif
/*******************************************************************************/
bit.h 下载积分: 积分 -1 分
8.34 KB, 下载次数: 4, 下载积分: 积分 -1 分
一周热门 更多>