+// ----- PORTA bits --------------------
+typedef union {
+ struct {
+ unsigned char RA0:1;
+ unsigned char RA1:1;
+ unsigned char RA2:1;
+ unsigned char RA3:1;
+ unsigned char RA4:1;
+ unsigned char RA5:1;
+ unsigned char :1;
+ unsigned char :1;
+ };
+} __PORTA_bits_t;
+extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;
+
+#define RA0 PORTA_bits.RA0
+#define RA1 PORTA_bits.RA1
+#define RA2 PORTA_bits.RA2
+#define RA3 PORTA_bits.RA3
+#define RA4 PORTA_bits.RA4
+#define RA5 PORTA_bits.RA5
+
+// ----- PORTB bits --------------------
+typedef union {
+ struct {
+ unsigned char RB0:1;
+ unsigned char RB1:1;
+ unsigned char RB2:1;
+ unsigned char RB3:1;
+ unsigned char RB4:1;
+ unsigned char RB5:1;
+ unsigned char RB6:1;
+ unsigned char RB7:1;
+ };
+} __PORTB_bits_t;
+extern volatile __PORTB_bits_t __at(PORTB_ADDR) PORTB_bits;
+
+#define RB0 PORTB_bits.RB0
+#define RB1 PORTB_bits.RB1
+#define RB2 PORTB_bits.RB2
+#define RB3 PORTB_bits.RB3
+#define RB4 PORTB_bits.RB4
+#define RB5 PORTB_bits.RB5
+#define RB6 PORTB_bits.RB6
+#define RB7 PORTB_bits.RB7
+
+// ----- PORTC bits --------------------
+typedef union {
+ struct {
+ unsigned char RC0:1;
+ unsigned char RC1:1;
+ unsigned char RC2:1;
+ unsigned char RC3:1;
+ unsigned char RC4:1;
+ unsigned char RC5:1;
+ unsigned char RC6:1;
+ unsigned char RC7:1;
+ };
+} __PORTC_bits_t;
+extern volatile __PORTC_bits_t __at(PORTC_ADDR) PORTC_bits;
+
+#define RC0 PORTC_bits.RC0
+#define RC1 PORTC_bits.RC1
+#define RC2 PORTC_bits.RC2
+#define RC3 PORTC_bits.RC3
+#define RC4 PORTC_bits.RC4
+#define RC5 PORTC_bits.RC5
+#define RC6 PORTC_bits.RC6
+#define RC7 PORTC_bits.RC7
+
+// ----- PWMCLK bits --------------------
+typedef union {
+ struct {
+ unsigned char PER0:1;
+ unsigned char PER1:1;
+ unsigned char PER2:1;
+ unsigned char PER3:1;
+ unsigned char PER4:1;
+ unsigned char PWMP0:1;
+ unsigned char PWMP1:1;
+ unsigned char PWMASE:1;
+ };
+ struct {
+ unsigned char PH0:1;
+ unsigned char PH1:1;
+ unsigned char PH2:1;
+ unsigned char PH3:1;
+ unsigned char PH4:1;
+ unsigned char C1EN:1;
+ unsigned char C2EN:1;
+ unsigned char POL:1;
+ };
+} __PWMCLK_bits_t;
+extern volatile __PWMCLK_bits_t __at(PWMCLK_ADDR) PWMCLK_bits;
+
+#define PER0 PWMCLK_bits.PER0
+#define PH0 PWMCLK_bits.PH0
+#define PER1 PWMCLK_bits.PER1
+#define PH1 PWMCLK_bits.PH1
+#define PER2 PWMCLK_bits.PER2
+#define PH2 PWMCLK_bits.PH2
+#define PER3 PWMCLK_bits.PER3
+#define PH3 PWMCLK_bits.PH3
+#define PER4 PWMCLK_bits.PER4
+#define PH4 PWMCLK_bits.PH4
+#define PWMP0 PWMCLK_bits.PWMP0
+#define C1EN PWMCLK_bits.C1EN
+#define PWMP1 PWMCLK_bits.PWMP1
+#define C2EN PWMCLK_bits.C2EN
+#define PWMASE PWMCLK_bits.PWMASE
+#define POL PWMCLK_bits.POL
+
+// ----- PWMCON0 bits --------------------
+typedef union {
+ struct {
+ unsigned char PH1EN:1;
+ unsigned char PH2EN:1;
+ unsigned char SYNC0:1;
+ unsigned char SYNC1:1;
+ unsigned char BLANK1:1;
+ unsigned char BLANK2:1;
+ unsigned char PASEN:1;
+ unsigned char PRSEN:1;
+ };
+} __PWMCON0_bits_t;
+extern volatile __PWMCON0_bits_t __at(PWMCON0_ADDR) PWMCON0_bits;
+
+#define PH1EN PWMCON0_bits.PH1EN
+#define PH2EN PWMCON0_bits.PH2EN
+#define SYNC0 PWMCON0_bits.SYNC0
+#define SYNC1 PWMCON0_bits.SYNC1
+#define BLANK1 PWMCON0_bits.BLANK1
+#define BLANK2 PWMCON0_bits.BLANK2
+#define PASEN PWMCON0_bits.PASEN
+#define PRSEN PWMCON0_bits.PRSEN
+
+// ----- PWMCON1 bits --------------------
+typedef union {
+ struct {
+ unsigned char CMDLY0:1;
+ unsigned char CMDLY1:1;
+ unsigned char CMDLY2:1;
+ unsigned char CMDLY3:1;
+ unsigned char CMDLY4:1;
+ unsigned char COMOD0:1;
+ unsigned char COMOD1:1;
+ unsigned char :1;
+ };
+} __PWMCON1_bits_t;
+extern volatile __PWMCON1_bits_t __at(PWMCON1_ADDR) PWMCON1_bits;
+
+#define CMDLY0 PWMCON1_bits.CMDLY0
+#define CMDLY1 PWMCON1_bits.CMDLY1
+#define CMDLY2 PWMCON1_bits.CMDLY2
+#define CMDLY3 PWMCON1_bits.CMDLY3
+#define CMDLY4 PWMCON1_bits.CMDLY4
+#define COMOD0 PWMCON1_bits.COMOD0
+#define COMOD1 PWMCON1_bits.COMOD1
+
+// ----- REFCON bits --------------------
+typedef union {
+ struct {
+ unsigned char :1;
+ unsigned char CVROE:1;
+ unsigned char VROE:1;
+ unsigned char VREN:1;
+ unsigned char VRBB:1;
+ unsigned char BGST:1;
+ unsigned char :1;
+ unsigned char :1;
+ };
+} __REFCON_bits_t;
+extern volatile __REFCON_bits_t __at(REFCON_ADDR) REFCON_bits;
+
+#define CVROE REFCON_bits.CVROE
+#define VROE REFCON_bits.VROE
+#define VREN REFCON_bits.VREN
+#define VRBB REFCON_bits.VRBB
+#define BGST REFCON_bits.BGST
+