试试8位单片机的定义方式
typedef union {
byte Byte;
struct {
byte PTA0 :1; /* Port A Data Bit 0 */
byte PTA1 :1; /* Port A Data Bit 1 */
byte PTA2 :1; /* Port A Data Bit 2 */
byte PTA3 :1; /* Port A Data Bit 3 */
byte PTA4 :1; /* Port A Data Bit 4 */
byte PTA5 :1; /* Port A Data Bit 5 */
byte PTA6 :1; /* Port A Data Bit 6 */
byte PTA7 :1; /* Port A Data Bit 7 */
} Bits;
} PTASTR;
extern volatile PTASTR _PTA @0x00000000; |