📄 io_map.h
字号:
#define PTCD_PTCD3_MASK 0x08
#define PTCD_PTCD4_MASK 0x10
#define PTCD_PTCD5_MASK 0x20
#define PTCD_PTCD6_MASK 0x40
#define PTCD_PTCD7_MASK 0x80
/*** PTCDD - Port C Data Direction Register; 0x00000005 ***/
typedef union {
byte Byte;
struct {
byte PTCDD0 :1; /* Data Direction for Port C Bit 0 */
byte PTCDD1 :1; /* Data Direction for Port C Bit 1 */
byte PTCDD2 :1; /* Data Direction for Port C Bit 2 */
byte PTCDD3 :1; /* Data Direction for Port C Bit 3 */
byte PTCDD4 :1; /* Data Direction for Port C Bit 4 */
byte PTCDD5 :1; /* Data Direction for Port C Bit 5 */
byte PTCDD6 :1; /* Data Direction for Port C Bit 6 */
byte PTCDD7 :1; /* Data Direction for Port C Bit 7 */
} Bits;
} PTCDDSTR;
extern volatile PTCDDSTR _PTCDD @0x00000005;
#define PTCDD _PTCDD.Byte
#define PTCDD_PTCDD0 _PTCDD.Bits.PTCDD0
#define PTCDD_PTCDD1 _PTCDD.Bits.PTCDD1
#define PTCDD_PTCDD2 _PTCDD.Bits.PTCDD2
#define PTCDD_PTCDD3 _PTCDD.Bits.PTCDD3
#define PTCDD_PTCDD4 _PTCDD.Bits.PTCDD4
#define PTCDD_PTCDD5 _PTCDD.Bits.PTCDD5
#define PTCDD_PTCDD6 _PTCDD.Bits.PTCDD6
#define PTCDD_PTCDD7 _PTCDD.Bits.PTCDD7
#define PTCDD_PTCDD0_MASK 0x01
#define PTCDD_PTCDD1_MASK 0x02
#define PTCDD_PTCDD2_MASK 0x04
#define PTCDD_PTCDD3_MASK 0x08
#define PTCDD_PTCDD4_MASK 0x10
#define PTCDD_PTCDD5_MASK 0x20
#define PTCDD_PTCDD6_MASK 0x40
#define PTCDD_PTCDD7_MASK 0x80
/*** PTDD - Port D Data Register; 0x00000006 ***/
typedef union {
byte Byte;
struct {
byte PTDD0 :1; /* Port D Data Register Bit 0 */
byte PTDD1 :1; /* Port D Data Register Bit 1 */
byte PTDD2 :1; /* Port D Data Register Bit 2 */
byte PTDD3 :1; /* Port D Data Register Bit 3 */
byte :1;
byte :1;
byte :1;
byte :1;
} Bits;
struct {
byte grpPTDD :4;
byte :1;
byte :1;
byte :1;
byte :1;
} MergedBits;
} PTDDSTR;
extern volatile PTDDSTR _PTDD @0x00000006;
#define PTDD _PTDD.Byte
#define PTDD_PTDD0 _PTDD.Bits.PTDD0
#define PTDD_PTDD1 _PTDD.Bits.PTDD1
#define PTDD_PTDD2 _PTDD.Bits.PTDD2
#define PTDD_PTDD3 _PTDD.Bits.PTDD3
#define PTDD_PTDD _PTDD.MergedBits.grpPTDD
#define PTDD_PTDD0_MASK 0x01
#define PTDD_PTDD1_MASK 0x02
#define PTDD_PTDD2_MASK 0x04
#define PTDD_PTDD3_MASK 0x08
#define PTDD_PTDD_MASK 0x0F
#define PTDD_PTDD_BITNUM 0x00
/*** PTDDD - Port D Data Direction Register; 0x00000007 ***/
typedef union {
byte Byte;
struct {
byte PTDDD0 :1; /* Data Direction for Port D Bit 0 */
byte PTDDD1 :1; /* Data Direction for Port D Bit 1 */
byte PTDDD2 :1; /* Data Direction for Port D Bit 2 */
byte PTDDD3 :1; /* Data Direction for Port D Bit 3 */
byte :1;
byte :1;
byte :1;
byte :1;
} Bits;
struct {
byte grpPTDDD :4;
byte :1;
byte :1;
byte :1;
byte :1;
} MergedBits;
} PTDDDSTR;
extern volatile PTDDDSTR _PTDDD @0x00000007;
#define PTDDD _PTDDD.Byte
#define PTDDD_PTDDD0 _PTDDD.Bits.PTDDD0
#define PTDDD_PTDDD1 _PTDDD.Bits.PTDDD1
#define PTDDD_PTDDD2 _PTDDD.Bits.PTDDD2
#define PTDDD_PTDDD3 _PTDDD.Bits.PTDDD3
#define PTDDD_PTDDD _PTDDD.MergedBits.grpPTDDD
#define PTDDD_PTDDD0_MASK 0x01
#define PTDDD_PTDDD1_MASK 0x02
#define PTDDD_PTDDD2_MASK 0x04
#define PTDDD_PTDDD3_MASK 0x08
#define PTDDD_PTDDD_MASK 0x0F
#define PTDDD_PTDDD_BITNUM 0x00
/*** KBISC - KBI Status and Control Register; 0x0000000C ***/
typedef union {
byte Byte;
struct {
byte KBIMOD :1; /* Keyboard Detection Mode */
byte KBIE :1; /* Keyboard Interrupt Enable */
byte KBACK :1; /* Keyboard Interrupt Acknowledge */
byte KBF :1; /* Keyboard Interrupt Flag */
byte :1;
byte :1;
byte :1;
byte :1;
} Bits;
} KBISCSTR;
extern volatile KBISCSTR _KBISC @0x0000000C;
#define KBISC _KBISC.Byte
#define KBISC_KBIMOD _KBISC.Bits.KBIMOD
#define KBISC_KBIE _KBISC.Bits.KBIE
#define KBISC_KBACK _KBISC.Bits.KBACK
#define KBISC_KBF _KBISC.Bits.KBF
#define KBISC_KBIMOD_MASK 0x01
#define KBISC_KBIE_MASK 0x02
#define KBISC_KBACK_MASK 0x04
#define KBISC_KBF_MASK 0x08
/*** KBIPE - KBI Pin Enable Register; 0x0000000D ***/
typedef union {
byte Byte;
struct {
byte KBIPE0 :1; /* Keyboard Pin Enable for KBI Port Bit 0 */
byte KBIPE1 :1; /* Keyboard Pin Enable for KBI Port Bit 1 */
byte KBIPE2 :1; /* Keyboard Pin Enable for KBI Port Bit 2 */
byte KBIPE3 :1; /* Keyboard Pin Enable for KBI Port Bit 3 */
byte KBIPE4 :1; /* Keyboard Pin Enable for KBI Port Bit 4 */
byte KBIPE5 :1; /* Keyboard Pin Enable for KBI Port Bit 5 */
byte KBIPE6 :1; /* Keyboard Pin Enable for KBI Port Bit 6 */
byte KBIPE7 :1; /* Keyboard Pin Enable for KBI Port Bit 7 */
} Bits;
} KBIPESTR;
extern volatile KBIPESTR _KBIPE @0x0000000D;
#define KBIPE _KBIPE.Byte
#define KBIPE_KBIPE0 _KBIPE.Bits.KBIPE0
#define KBIPE_KBIPE1 _KBIPE.Bits.KBIPE1
#define KBIPE_KBIPE2 _KBIPE.Bits.KBIPE2
#define KBIPE_KBIPE3 _KBIPE.Bits.KBIPE3
#define KBIPE_KBIPE4 _KBIPE.Bits.KBIPE4
#define KBIPE_KBIPE5 _KBIPE.Bits.KBIPE5
#define KBIPE_KBIPE6 _KBIPE.Bits.KBIPE6
#define KBIPE_KBIPE7 _KBIPE.Bits.KBIPE7
#define KBIPE_KBIPE0_MASK 0x01
#define KBIPE_KBIPE1_MASK 0x02
#define KBIPE_KBIPE2_MASK 0x04
#define KBIPE_KBIPE3_MASK 0x08
#define KBIPE_KBIPE4_MASK 0x10
#define KBIPE_KBIPE5_MASK 0x20
#define KBIPE_KBIPE6_MASK 0x40
#define KBIPE_KBIPE7_MASK 0x80
/*** KBIES - KBI Edge Select Register; 0x0000000E ***/
typedef union {
byte Byte;
struct {
byte KBEDG0 :1; /* Keyboard Edge Select Bit 0 */
byte KBEDG1 :1; /* Keyboard Edge Select Bit 1 */
byte KBEDG2 :1; /* Keyboard Edge Select Bit 2 */
byte KBEDG3 :1; /* Keyboard Edge Select Bit 3 */
byte KBEDG4 :1; /* Keyboard Edge Select Bit 4 */
byte KBEDG5 :1; /* Keyboard Edge Select Bit 5 */
byte KBEDG6 :1; /* Keyboard Edge Select Bit 6 */
byte KBEDG7 :1; /* Keyboard Edge Select Bit 7 */
} Bits;
} KBIESSTR;
extern volatile KBIESSTR _KBIES @0x0000000E;
#define KBIES _KBIES.Byte
#define KBIES_KBEDG0 _KBIES.Bits.KBEDG0
#define KBIES_KBEDG1 _KBIES.Bits.KBEDG1
#define KBIES_KBEDG2 _KBIES.Bits.KBEDG2
#define KBIES_KBEDG3 _KBIES.Bits.KBEDG3
#define KBIES_KBEDG4 _KBIES.Bits.KBEDG4
#define KBIES_KBEDG5 _KBIES.Bits.KBEDG5
#define KBIES_KBEDG6 _KBIES.Bits.KBEDG6
#define KBIES_KBEDG7 _KBIES.Bits.KBEDG7
#define KBIES_KBEDG0_MASK 0x01
#define KBIES_KBEDG1_MASK 0x02
#define KBIES_KBEDG2_MASK 0x04
#define KBIES_KBEDG3_MASK 0x08
#define KBIES_KBEDG4_MASK 0x10
#define KBIES_KBEDG5_MASK 0x20
#define KBIES_KBEDG6_MASK 0x40
#define KBIES_KBEDG7_MASK 0x80
/*** IRQSC - Interrupt request status and control register; 0x0000000F ***/
typedef union {
byte Byte;
struct {
byte IRQMOD :1; /* IRQ Detection Mode */
byte IRQIE :1; /* IRQ Interrupt Enable */
byte IRQACK :1; /* IRQ Acknowledge */
byte IRQF :1; /* IRQ Flag */
byte IRQPE :1; /* IRQ Pin Enable */
byte IRQEDG :1; /* IRQ Edge Select */
byte IRQPDD :1; /* IRQ Pull Device Disable */
byte :1;
} Bits;
} IRQSCSTR;
extern volatile IRQSCSTR _IRQSC @0x0000000F;
#define IRQSC _IRQSC.Byte
#define IRQSC_IRQMOD _IRQSC.Bits.IRQMOD
#define IRQSC_IRQIE _IRQSC.Bits.IRQIE
#define IRQSC_IRQACK _IRQSC.Bits.IRQACK
#define IRQSC_IRQF _IRQSC.Bits.IRQF
#define IRQSC_IRQPE _IRQSC.Bits.IRQPE
#define IRQSC_IRQEDG _IRQSC.Bits.IRQEDG
#define IRQSC_IRQPDD _IRQSC.Bits.IRQPDD
#define IRQSC_IRQMOD_MASK 0x01
#define IRQSC_IRQIE_MASK 0x02
#define IRQSC_IRQACK_MASK 0x04
#define IRQSC_IRQF_MASK 0x08
#define IRQSC_IRQPE_MASK 0x10
#define IRQSC_IRQEDG_MASK 0x20
#define IRQSC_IRQPDD_MASK 0x40
/*** ADCSC1 - Status and Control Register 1; 0x00000010 ***/
typedef union {
byte Byte;
struct {
byte ADCH0 :1; /* Input Channel Select Bit 0 */
byte ADCH1 :1; /* Input Channel Select Bit 1 */
byte ADCH2 :1; /* Input Channel Select Bit 2 */
byte ADCH3 :1; /* Input Channel Select Bit 3 */
byte ADCH4 :1; /* Input Channel Select Bit 4 */
byte ADCO :1; /* Continuous Conversion Enable - ADCO is used to enable continuous conversions */
byte AIEN :1; /* Interrupt Enable - AIEN is used to enable conversion complete interrupts. When COCO becomes set while AIEN is high, an interrupt is asserted */
byte COCO :1; /* Conversion Complete Flag */
} Bits;
struct {
byte grpADCH :5;
byte :1;
byte :1;
byte :1;
} MergedBits;
} ADCSC1STR;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -