定义如下:
volatile DDRABSTR _DDRAB; /* Port AB Data Direction Register; 0x00000002 */
typedef union {
word Word;
/* Overlapped registers: */
struct {
/*** DDRA - Port A Data Direction Register; 0x00000002 ***/
union {
byte Byte;
struct {
byte DDRA0 :1; /* Data Direction Port A Bit 0 */
byte DDRA1 :1; /* Data Direction Port A Bit 1 */
byte DDRA2 :1; /* Data Direction Port A Bit 2 */
byte DDRA3 :1; /* Data Direction Port A Bit 3 */
byte DDRA4 :1; /* Data Direction Port A Bit 4 */
byte DDRA5 :1; /* Data Direction Port A Bit 5 */
byte DDRA6 :1; /* Data Direction Port A Bit 6 */
byte DDRA7 :1; /* Data Direction Port A Bit 7 */
} Bits;
} DDRASTR;
#define DDRA _DDRAB.Overlap_STR.DDRASTR.Byte
#define DDRA_DDRA0 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA0
#define DDRA_DDRA1 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA1
#define DDRA_DDRA2 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA2
#define DDRA_DDRA3 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA3
#define DDRA_DDRA4 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA4
#define DDRA_DDRA5 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA5
#define DDRA_DDRA6 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA6
#define DDRA_DDRA7 _DDRAB.Overlap_STR.DDRASTR.Bits.DDRA7
#define DDRA_DDRA0_MASK 1
#define DDRA_DDRA1_MASK 2
#define DDRA_DDRA2_MASK 4
#define DDRA_DDRA3_MASK 8
#define DDRA_DDRA4_MASK 16
#define DDRA_DDRA5_MASK 32
#define DDRA_DDRA6_MASK 64
#define DDRA_DDRA7_MASK 128
/*** DDRB - Port B Data Direction Register; 0x00000003 ***/
union {
byte Byte;
struct {
byte DDRB0 :1; /* Data Direction Port B Bit 0 */
byte DDRB1 :1; /* Data Direction Port B Bit 1 */
byte DDRB2 :1; /* Data Direction Port B Bit 2 */
byte DDRB3 :1; /* Data Direction Port B Bit 3 */
byte DDRB4 :1; /* Data Direction Port B Bit 4 */
byte DDRB5 :1; /* Data Direction Port B Bit 5 */
byte DDRB6 :1; /* Data Direction Port B Bit 6 */
byte DDRB7 :1; /* Data Direction Port B Bit 7 */
} Bits;
} DDRBSTR;
#define DDRB _DDRAB.Overlap_STR.DDRBSTR.Byte
#define DDRB_DDRB0 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB0
#define DDRB_DDRB1 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB1
#define DDRB_DDRB2 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB2
#define DDRB_DDRB3 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB3
#define DDRB_DDRB4 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB4
#define DDRB_DDRB5 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB5
#define DDRB_DDRB6 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB6
#define DDRB_DDRB7 _DDRAB.Overlap_STR.DDRBSTR.Bits.DDRB7
#define DDRB_DDRB0_MASK 1
#define DDRB_DDRB1_MASK 2
#define DDRB_DDRB2_MASK 4
#define DDRB_DDRB3_MASK 8
#define DDRB_DDRB4_MASK 16
#define DDRB_DDRB5_MASK 32
#define DDRB_DDRB6_MASK 64
#define DDRB_DDRB7_MASK 128
} Overlap_STR;
struct {
word DDRB0 :1; /* Data Direction Port B Bit 0 */
word DDRB1 :1; /* Data Direction Port B Bit 1 */
word DDRB2 :1; /* Data Direction Port B Bit 2 */
word DDRB3 :1; /* Data Direction Port B Bit 3 */
word DDRB4 :1; /* Data Direction Port B Bit 4 */
word DDRB5 :1; /* Data Direction Port B Bit 5 */
word DDRB6 :1; /* Data Direction Port B Bit 6 */
word DDRB7 :1; /* Data Direction Port B Bit 7 */
word DDRA0 :1; /* Data Direction Port A Bit 0 */
word DDRA1 :1; /* Data Direction Port A Bit 1 */
word DDRA2 :1; /* Data Direction Port A Bit 2 */
word DDRA3 :1; /* Data Direction Port A Bit 3 */
word DDRA4 :1; /* Data Direction Port A Bit 4 */
word DDRA5 :1; /* Data Direction Port A Bit 5 */
word DDRA6 :1; /* Data Direction Port A Bit 6 */
word DDRA7 :1; /* Data Direction Port A Bit 7 */
} Bits;
struct {
word grpDDRB :8;
word grpDDRA :8;
} MergedBits;
} DDRABSTR
请问如上代码中的_DDRAB到底是什么?
|