#ifndef MC32P7331_H
#define MC32P7331_H

#include <mc32-common.h>

//
// Register addresses.
//
#define INDF0_ADDR      	0x0180
#define INDF1_ADDR      	0x0181
#define INDF2_ADDR      	0x0182
#define HIBYTE_ADDR     	0x0183
#define FSR0_ADDR       	0x0184
#define FSR1_ADDR       	0x0185
#define PCL_ADDR        	0x0186
#define PFLAG_ADDR      	0x0187
#define MCR_ADDR        	0x0188
#define INDF3_ADDR      	0x0189
#define INTE_ADDR       	0x018A
#define INTF_ADDR       	0x018B
#define DRVCR_ADDR      	0x018C
#define P1KBCR_ADDR     	0x018E
#define IOP0_ADDR       	0x0190
#define OEP0_ADDR       	0x0191
#define PUP0_ADDR       	0x0192
#define PDP0_ADDR       	0x0193
#define IOP1_ADDR       	0x0194
#define OEP1_ADDR       	0x0195
#define PUP1_ADDR       	0x0196
#define PDP1_ADDR       	0x0197
#define T0CR_ADDR       	0x0198
#define T0CNT_ADDR      	0x0199
#define T0LOAD_ADDR     	0x019A
#define T0DATA_ADDR     	0x019B
#define T1CR_ADDR       	0x019C
#define T1CNT_ADDR      	0x019D
#define T1LOAD_ADDR     	0x019E
#define T1DATA_ADDR     	0x019F
#define T2CR_ADDR       	0x01A0
#define T2CNT_ADDR      	0x01A1
#define T2LOAD_ADDR     	0x01A2
#define T2DATA_ADDR     	0x01A3
#define T3CR_ADDR       	0x01A4
#define T3CNT_ADDR      	0x01A5
#define T3LOAD_ADDR     	0x01A6
#define PWM0DR_ADDR     	0x01A8
#define PWM1DR_ADDR     	0x01A9
#define PWM2DR_ADDR     	0x01AA
#define PWMCR0_ADDR     	0x01AC
#define PWMCR1_ADDR     	0x01AD
#define OSCMR_ADDR      	0x01AE
#define LVDCR_ADDR      	0x01AF
#define ADCR0_ADDR      	0x01B0
#define ADCR1_ADDR      	0x01B1
#define ADCR2_ADDR      	0x01B2
#define ADRH_ADDR       	0x01B4
#define ADRL_ADDR       	0x01B5
#define ADIOS0_ADDR     	0x01B6
#define ADIOS1_ADDR     	0x01B7
#define PMOD_ADDR       	0x01BC
#define PWMCR3_ADDR     	0x01BD
#define PWMCR2_ADDR     	0x01BE
#define HIRCCR_ADDR     	0x01BF
#define OSCCALH_ADDR    	0x01FB
#define OSCCALL_ADDR    	0x01FC

//----- Register Files -----------------------------------------------------

extern __sfr __at (INDF0_ADDR)    	INDF0;
extern __sfr __at (INDF1_ADDR)    	INDF1;
extern __sfr __at (INDF2_ADDR)    	INDF2;
extern __sfr __at (HIBYTE_ADDR)   	HIBYTE;
extern __sfr __at (FSR0_ADDR)     	FSR0;
extern __sfr __at (FSR1_ADDR)     	FSR1;
extern __sfr __at (PCL_ADDR)      	PCL;
extern __sfr __at (PFLAG_ADDR)    	PFLAG;
extern __sfr __at (MCR_ADDR)      	MCR;
extern __sfr __at (INDF3_ADDR)    	INDF3;
extern __sfr __at (INTE_ADDR)     	INTE;
extern __sfr __at (INTF_ADDR)     	INTF;
extern __sfr __at (DRVCR_ADDR)    	DRVCR;
extern __sfr __at (P1KBCR_ADDR)   	P1KBCR;
extern __sfr __at (IOP0_ADDR)     	IOP0;
extern __sfr __at (OEP0_ADDR)     	OEP0;
extern __sfr __at (PUP0_ADDR)     	PUP0;
extern __sfr __at (PDP0_ADDR)     	PDP0;
extern __sfr __at (IOP1_ADDR)     	IOP1;
extern __sfr __at (OEP1_ADDR)     	OEP1;
extern __sfr __at (PUP1_ADDR)     	PUP1;
extern __sfr __at (PDP1_ADDR)     	PDP1;
extern __sfr __at (T0CR_ADDR)     	T0CR;
extern __sfr __at (T0CNT_ADDR)    	T0CNT;
extern __sfr __at (T0LOAD_ADDR)   	T0LOAD;
extern __sfr __at (T0DATA_ADDR)   	T0DATA;
extern __sfr __at (T1CR_ADDR)     	T1CR;
extern __sfr __at (T1CNT_ADDR)    	T1CNT;
extern __sfr __at (T1LOAD_ADDR)   	T1LOAD;
extern __sfr __at (T1DATA_ADDR)   	T1DATA;
extern __sfr __at (T2CR_ADDR)     	T2CR;
extern __sfr __at (T2CNT_ADDR)    	T2CNT;
extern __sfr __at (T2LOAD_ADDR)   	T2LOAD;
extern __sfr __at (T2DATA_ADDR)   	T2DATA;
extern __sfr __at (T3CR_ADDR)     	T3CR;
extern __sfr __at (T3CNT_ADDR)    	T3CNT;
extern __sfr __at (T3LOAD_ADDR)   	T3LOAD;
extern __sfr __at (PWM0DR_ADDR)   	PWM0DR;
extern __sfr __at (PWM1DR_ADDR)   	PWM1DR;
extern __sfr __at (PWM2DR_ADDR)   	PWM2DR;
extern __sfr __at (PWMCR0_ADDR)   	PWMCR0;
extern __sfr __at (PWMCR1_ADDR)   	PWMCR1;
extern __sfr __at (OSCMR_ADDR)    	OSCMR;
extern __sfr __at (LVDCR_ADDR)    	LVDCR;
extern __sfr __at (ADCR0_ADDR)    	ADCR0;
extern __sfr __at (ADCR1_ADDR)    	ADCR1;
extern __sfr __at (ADCR2_ADDR)    	ADCR2;
extern __sfr __at (ADRH_ADDR)     	ADRH;
extern __sfr __at (ADRL_ADDR)     	ADRL;
extern __sfr __at (ADIOS0_ADDR)   	ADIOS0;
extern __sfr __at (ADIOS1_ADDR)   	ADIOS1;
extern __sfr __at (PMOD_ADDR)     	PMOD;
extern __sfr __at (PWMCR3_ADDR)   	PWMCR3;
extern __sfr __at (PWMCR2_ADDR)   	PWMCR2;
extern __sfr __at (HIRCCR_ADDR)   	HIRCCR;
extern __sfr __at (OSCCALH_ADDR)  	OSCCALH;
extern __sfr __at (OSCCALL_ADDR)  	OSCCALL;

//==========================================================================
//
//	Configuration Bits
//
//==========================================================================

//OPBIT1

//OPBIT0

// ----- INDF0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char INDF00:1;
		unsigned char INDF01:1;
		unsigned char INDF02:1;
		unsigned char INDF03:1;
		unsigned char INDF04:1;
		unsigned char INDF05:1;
		unsigned char INDF06:1;
		unsigned char INDF07:1;
	};
} __INDF0bits_t;
extern volatile __INDF0bits_t __at(INDF0_ADDR) INDF0bits;

#define INDF00    	INDF0bits.INDF00    	/* bit 0 */
#define INDF01    	INDF0bits.INDF01    	/* bit 1 */
#define INDF02    	INDF0bits.INDF02    	/* bit 2 */
#define INDF03    	INDF0bits.INDF03    	/* bit 3 */
#define INDF04    	INDF0bits.INDF04    	/* bit 4 */
#define INDF05    	INDF0bits.INDF05    	/* bit 5 */
#define INDF06    	INDF0bits.INDF06    	/* bit 6 */
#define INDF07    	INDF0bits.INDF07    	/* bit 7 */

// ----- INDF1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char INDF10:1;
		unsigned char INDF11:1;
		unsigned char INDF12:1;
		unsigned char INDF13:1;
		unsigned char INDF14:1;
		unsigned char INDF15:1;
		unsigned char INDF16:1;
		unsigned char INDF17:1;
	};
} __INDF1bits_t;
extern volatile __INDF1bits_t __at(INDF1_ADDR) INDF1bits;

#define INDF10    	INDF1bits.INDF10    	/* bit 0 */
#define INDF11    	INDF1bits.INDF11    	/* bit 1 */
#define INDF12    	INDF1bits.INDF12    	/* bit 2 */
#define INDF13    	INDF1bits.INDF13    	/* bit 3 */
#define INDF14    	INDF1bits.INDF14    	/* bit 4 */
#define INDF15    	INDF1bits.INDF15    	/* bit 5 */
#define INDF16    	INDF1bits.INDF16    	/* bit 6 */
#define INDF17    	INDF1bits.INDF17    	/* bit 7 */

// ----- INDF2 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char INDF20:1;
		unsigned char INDF21:1;
		unsigned char INDF22:1;
		unsigned char INDF23:1;
		unsigned char INDF24:1;
		unsigned char INDF25:1;
		unsigned char INDF26:1;
		unsigned char INDF27:1;
	};
} __INDF2bits_t;
extern volatile __INDF2bits_t __at(INDF2_ADDR) INDF2bits;

#define INDF20    	INDF2bits.INDF20    	/* bit 0 */
#define INDF21    	INDF2bits.INDF21    	/* bit 1 */
#define INDF22    	INDF2bits.INDF22    	/* bit 2 */
#define INDF23    	INDF2bits.INDF23    	/* bit 3 */
#define INDF24    	INDF2bits.INDF24    	/* bit 4 */
#define INDF25    	INDF2bits.INDF25    	/* bit 5 */
#define INDF26    	INDF2bits.INDF26    	/* bit 6 */
#define INDF27    	INDF2bits.INDF27    	/* bit 7 */

// ----- HIBYTE Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char HIBYTE0:1;
		unsigned char HIBYTE1:1;
		unsigned char HIBYTE2:1;
		unsigned char HIBYTE3:1;
		unsigned char HIBYTE4:1;
		unsigned char HIBYTE5:1;
		unsigned char HIBYTE6:1;
		unsigned char HIBYTE7:1;
	};
} __HIBYTEbits_t;
extern volatile __HIBYTEbits_t __at(HIBYTE_ADDR) HIBYTEbits;

#define HIBYTE0   	HIBYTEbits.HIBYTE0  	/* bit 0 */
#define HIBYTE1   	HIBYTEbits.HIBYTE1  	/* bit 1 */
#define HIBYTE2   	HIBYTEbits.HIBYTE2  	/* bit 2 */
#define HIBYTE3   	HIBYTEbits.HIBYTE3  	/* bit 3 */
#define HIBYTE4   	HIBYTEbits.HIBYTE4  	/* bit 4 */
#define HIBYTE5   	HIBYTEbits.HIBYTE5  	/* bit 5 */
#define HIBYTE6   	HIBYTEbits.HIBYTE6  	/* bit 6 */
#define HIBYTE7   	HIBYTEbits.HIBYTE7  	/* bit 7 */

// ----- FSR0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char FSR00:1;
		unsigned char FSR01:1;
		unsigned char FSR02:1;
		unsigned char FSR03:1;
		unsigned char FSR04:1;
		unsigned char FSR05:1;
		unsigned char FSR06:1;
		unsigned char FSR07:1;
	};
} __FSR0bits_t;
extern volatile __FSR0bits_t __at(FSR0_ADDR) FSR0bits;

#define FSR00     	FSR0bits.FSR00      	/* bit 0 */
#define FSR01     	FSR0bits.FSR01      	/* bit 1 */
#define FSR02     	FSR0bits.FSR02      	/* bit 2 */
#define FSR03     	FSR0bits.FSR03      	/* bit 3 */
#define FSR04     	FSR0bits.FSR04      	/* bit 4 */
#define FSR05     	FSR0bits.FSR05      	/* bit 5 */
#define FSR06     	FSR0bits.FSR06      	/* bit 6 */
#define FSR07     	FSR0bits.FSR07      	/* bit 7 */

// ----- FSR1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char FSR10:1;
		unsigned char FSR11:1;
		unsigned char FSR12:1;
		unsigned char FSR13:1;
		unsigned char FSR14:1;
		unsigned char FSR15:1;
		unsigned char FSR16:1;
		unsigned char FSR17:1;
	};
} __FSR1bits_t;
extern volatile __FSR1bits_t __at(FSR1_ADDR) FSR1bits;

#define FSR10     	FSR1bits.FSR10      	/* bit 0 */
#define FSR11     	FSR1bits.FSR11      	/* bit 1 */
#define FSR12     	FSR1bits.FSR12      	/* bit 2 */
#define FSR13     	FSR1bits.FSR13      	/* bit 3 */
#define FSR14     	FSR1bits.FSR14      	/* bit 4 */
#define FSR15     	FSR1bits.FSR15      	/* bit 5 */
#define FSR16     	FSR1bits.FSR16      	/* bit 6 */
#define FSR17     	FSR1bits.FSR17      	/* bit 7 */

// ----- PCL Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PC0:1;
		unsigned char PC1:1;
		unsigned char PC2:1;
		unsigned char PC3:1;
		unsigned char PC4:1;
		unsigned char PC5:1;
		unsigned char PC6:1;
		unsigned char PC7:1;
	};
} __PCLbits_t;
extern volatile __PCLbits_t __at(PCL_ADDR) PCLbits;

#define PC0       	PCLbits.PC0         	/* bit 0 */
#define PC1       	PCLbits.PC1         	/* bit 1 */
#define PC2       	PCLbits.PC2         	/* bit 2 */
#define PC3       	PCLbits.PC3         	/* bit 3 */
#define PC4       	PCLbits.PC4         	/* bit 4 */
#define PC5       	PCLbits.PC5         	/* bit 5 */
#define PC6       	PCLbits.PC6         	/* bit 6 */
#define PC7       	PCLbits.PC7         	/* bit 7 */

// ----- PFLAG Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char C:1;
		unsigned char DC:1;
		unsigned char Z:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __PFLAGbits_t;
extern volatile __PFLAGbits_t __at(PFLAG_ADDR) PFLAGbits;

#define C         	PFLAGbits.C         	/* bit 0 */
#define DC        	PFLAGbits.DC        	/* bit 1 */
#define Z         	PFLAGbits.Z         	/* bit 2 */

// ----- MCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char INT0M0:1;
		unsigned char INT0M1:1;
		unsigned char INT1M0:1;
		unsigned char INT1M1:1;
		unsigned char PD:1;
		unsigned char TO:1;
		unsigned char :1;
		unsigned char GIE:1;
	};
} __MCRbits_t;
extern volatile __MCRbits_t __at(MCR_ADDR) MCRbits;

#define INT0M0    	MCRbits.INT0M0      	/* bit 0 */
#define INT0M1    	MCRbits.INT0M1      	/* bit 1 */
#define INT1M0    	MCRbits.INT1M0      	/* bit 2 */
#define INT1M1    	MCRbits.INT1M1      	/* bit 3 */
#define PD        	MCRbits.PD          	/* bit 4 */
#define TO        	MCRbits.TO          	/* bit 5 */
#define GIE       	MCRbits.GIE         	/* bit 7 */

// ----- INDF3 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char INDF30:1;
		unsigned char INDF31:1;
		unsigned char INDF32:1;
		unsigned char INDF33:1;
		unsigned char INDF34:1;
		unsigned char INDF35:1;
		unsigned char INDF36:1;
		unsigned char INDF37:1;
	};
} __INDF3bits_t;
extern volatile __INDF3bits_t __at(INDF3_ADDR) INDF3bits;

#define INDF30    	INDF3bits.INDF30    	/* bit 0 */
#define INDF31    	INDF3bits.INDF31    	/* bit 1 */
#define INDF32    	INDF3bits.INDF32    	/* bit 2 */
#define INDF33    	INDF3bits.INDF33    	/* bit 3 */
#define INDF34    	INDF3bits.INDF34    	/* bit 4 */
#define INDF35    	INDF3bits.INDF35    	/* bit 5 */
#define INDF36    	INDF3bits.INDF36    	/* bit 6 */
#define INDF37    	INDF3bits.INDF37    	/* bit 7 */

// ----- INTE Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0IE:1;
		unsigned char T1IE:1;
		unsigned char INT0IE:1;
		unsigned char INT1IE:1;
		unsigned char KBIE:1;
		unsigned char T2IE:1;
		unsigned char ADIE:1;
		unsigned char T3IE:1;
	};
} __INTEbits_t;
extern volatile __INTEbits_t __at(INTE_ADDR) INTEbits;

#define T0IE      	INTEbits.T0IE       	/* bit 0 */
#define T1IE      	INTEbits.T1IE       	/* bit 1 */
#define INT0IE    	INTEbits.INT0IE     	/* bit 2 */
#define INT1IE    	INTEbits.INT1IE     	/* bit 3 */
#define KBIE      	INTEbits.KBIE       	/* bit 4 */
#define T2IE      	INTEbits.T2IE       	/* bit 5 */
#define ADIE      	INTEbits.ADIE       	/* bit 6 */
#define T3IE      	INTEbits.T3IE       	/* bit 7 */

// ----- INTF Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0IF:1;
		unsigned char T1IF:1;
		unsigned char INT0IF:1;
		unsigned char INT1IF:1;
		unsigned char KBIF:1;
		unsigned char T2IF:1;
		unsigned char ADIF:1;
		unsigned char T3IF:1;
	};
} __INTFbits_t;
extern volatile __INTFbits_t __at(INTF_ADDR) INTFbits;

#define T0IF      	INTFbits.T0IF       	/* bit 0 */
#define T1IF      	INTFbits.T1IF       	/* bit 1 */
#define INT0IF    	INTFbits.INT0IF     	/* bit 2 */
#define INT1IF    	INTFbits.INT1IF     	/* bit 3 */
#define KBIF      	INTFbits.KBIF       	/* bit 4 */
#define T2IF      	INTFbits.T2IF       	/* bit 5 */
#define ADIF      	INTFbits.ADIF       	/* bit 6 */
#define T3IF      	INTFbits.T3IF       	/* bit 7 */

// ----- DRVCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char PDRVS0:1;
		unsigned char PDRVS1:1;
		unsigned char LDRVS:1;
		unsigned char CDRVS:1;
	};
} __DRVCRbits_t;
extern volatile __DRVCRbits_t __at(DRVCR_ADDR) DRVCRbits;

#define PDRVS0    	DRVCRbits.PDRVS0    	/* bit 4 */
#define PDRVS1    	DRVCRbits.PDRVS1    	/* bit 5 */
#define LDRVS     	DRVCRbits.LDRVS     	/* bit 6 */
#define CDRVS     	DRVCRbits.CDRVS     	/* bit 7 */

// ----- P1KBCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P10KE:1;
		unsigned char P11KE:1;
		unsigned char P12KE:1;
		unsigned char P13KE:1;
		unsigned char P14KE:1;
		unsigned char P15KE:1;
		unsigned char P16KE:1;
		unsigned char P17KE:1;
	};
} __P1KBCRbits_t;
extern volatile __P1KBCRbits_t __at(P1KBCR_ADDR) P1KBCRbits;

#define P10KE     	P1KBCRbits.P10KE    	/* bit 0 */
#define P11KE     	P1KBCRbits.P11KE    	/* bit 1 */
#define P12KE     	P1KBCRbits.P12KE    	/* bit 2 */
#define P13KE     	P1KBCRbits.P13KE    	/* bit 3 */
#define P14KE     	P1KBCRbits.P14KE    	/* bit 4 */
#define P15KE     	P1KBCRbits.P15KE    	/* bit 5 */
#define P16KE     	P1KBCRbits.P16KE    	/* bit 6 */
#define P17KE     	P1KBCRbits.P17KE    	/* bit 7 */

// ----- IOP0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00D:1;
		unsigned char P01D:1;
		unsigned char P02D:1;
		unsigned char P03D:1;
		unsigned char P04D:1;
		unsigned char P05D:1;
		unsigned char :1;
		unsigned char :1;
	};
} __IOP0bits_t;
extern volatile __IOP0bits_t __at(IOP0_ADDR) IOP0bits;

#define P00D      	IOP0bits.P00D       	/* bit 0 */
#define P01D      	IOP0bits.P01D       	/* bit 1 */
#define P02D      	IOP0bits.P02D       	/* bit 2 */
#define P03D      	IOP0bits.P03D       	/* bit 3 */
#define P04D      	IOP0bits.P04D       	/* bit 4 */
#define P05D      	IOP0bits.P05D       	/* bit 5 */

// ----- OEP0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00OE:1;
		unsigned char P01OE:1;
		unsigned char P02OE:1;
		unsigned char P03OE:1;
		unsigned char P04OE:1;
		unsigned char P05OE:1;
		unsigned char :1;
		unsigned char :1;
	};
} __OEP0bits_t;
extern volatile __OEP0bits_t __at(OEP0_ADDR) OEP0bits;

#define P00OE     	OEP0bits.P00OE      	/* bit 0 */
#define P01OE     	OEP0bits.P01OE      	/* bit 1 */
#define P02OE     	OEP0bits.P02OE      	/* bit 2 */
#define P03OE     	OEP0bits.P03OE      	/* bit 3 */
#define P04OE     	OEP0bits.P04OE      	/* bit 4 */
#define P05OE     	OEP0bits.P05OE      	/* bit 5 */

// ----- PUP0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00PU:1;
		unsigned char P01PU:1;
		unsigned char P02PU:1;
		unsigned char P03PU:1;
		unsigned char P04PU:1;
		unsigned char P05PU:1;
		unsigned char :1;
		unsigned char :1;
	};
} __PUP0bits_t;
extern volatile __PUP0bits_t __at(PUP0_ADDR) PUP0bits;

#define P00PU     	PUP0bits.P00PU      	/* bit 0 */
#define P01PU     	PUP0bits.P01PU      	/* bit 1 */
#define P02PU     	PUP0bits.P02PU      	/* bit 2 */
#define P03PU     	PUP0bits.P03PU      	/* bit 3 */
#define P04PU     	PUP0bits.P04PU      	/* bit 4 */
#define P05PU     	PUP0bits.P05PU      	/* bit 5 */

// ----- PDP0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00PD:1;
		unsigned char P01PD:1;
		unsigned char P02PD:1;
		unsigned char P03PD:1;
		unsigned char P04PD:1;
		unsigned char P05PD:1;
		unsigned char :1;
		unsigned char :1;
	};
} __PDP0bits_t;
extern volatile __PDP0bits_t __at(PDP0_ADDR) PDP0bits;

#define P00PD     	PDP0bits.P00PD      	/* bit 0 */
#define P01PD     	PDP0bits.P01PD      	/* bit 1 */
#define P02PD     	PDP0bits.P02PD      	/* bit 2 */
#define P03PD     	PDP0bits.P03PD      	/* bit 3 */
#define P04PD     	PDP0bits.P04PD      	/* bit 4 */
#define P05PD     	PDP0bits.P05PD      	/* bit 5 */

// ----- IOP1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P10D:1;
		unsigned char P11D:1;
		unsigned char P12D:1;
		unsigned char P13D:1;
		unsigned char P14D:1;
		unsigned char P15D:1;
		unsigned char P16D:1;
		unsigned char P17D:1;
	};
} __IOP1bits_t;
extern volatile __IOP1bits_t __at(IOP1_ADDR) IOP1bits;

#define P10D      	IOP1bits.P10D       	/* bit 0 */
#define P11D      	IOP1bits.P11D       	/* bit 1 */
#define P12D      	IOP1bits.P12D       	/* bit 2 */
#define P13D      	IOP1bits.P13D       	/* bit 3 */
#define P14D      	IOP1bits.P14D       	/* bit 4 */
#define P15D      	IOP1bits.P15D       	/* bit 5 */
#define P16D      	IOP1bits.P16D       	/* bit 6 */
#define P17D      	IOP1bits.P17D       	/* bit 7 */

// ----- OEP1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P10OE:1;
		unsigned char P11OE:1;
		unsigned char P12OE:1;
		unsigned char P13OE:1;
		unsigned char P14OE:1;
		unsigned char P15OE:1;
		unsigned char P16OE:1;
		unsigned char P17OE:1;
	};
} __OEP1bits_t;
extern volatile __OEP1bits_t __at(OEP1_ADDR) OEP1bits;

#define P10OE     	OEP1bits.P10OE      	/* bit 0 */
#define P11OE     	OEP1bits.P11OE      	/* bit 1 */
#define P12OE     	OEP1bits.P12OE      	/* bit 2 */
#define P13OE     	OEP1bits.P13OE      	/* bit 3 */
#define P14OE     	OEP1bits.P14OE      	/* bit 4 */
#define P15OE     	OEP1bits.P15OE      	/* bit 5 */
#define P16OE     	OEP1bits.P16OE      	/* bit 6 */
#define P17OE     	OEP1bits.P17OE      	/* bit 7 */

// ----- PUP1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P10PU:1;
		unsigned char P11PU:1;
		unsigned char P12PU:1;
		unsigned char P13PU:1;
		unsigned char P14PU:1;
		unsigned char P15PU:1;
		unsigned char P16PU:1;
		unsigned char P17PU:1;
	};
} __PUP1bits_t;
extern volatile __PUP1bits_t __at(PUP1_ADDR) PUP1bits;

#define P10PU     	PUP1bits.P10PU      	/* bit 0 */
#define P11PU     	PUP1bits.P11PU      	/* bit 1 */
#define P12PU     	PUP1bits.P12PU      	/* bit 2 */
#define P13PU     	PUP1bits.P13PU      	/* bit 3 */
#define P14PU     	PUP1bits.P14PU      	/* bit 4 */
#define P15PU     	PUP1bits.P15PU      	/* bit 5 */
#define P16PU     	PUP1bits.P16PU      	/* bit 6 */
#define P17PU     	PUP1bits.P17PU      	/* bit 7 */

// ----- PDP1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P10PD:1;
		unsigned char P11PD:1;
		unsigned char P12PD:1;
		unsigned char P13PD:1;
		unsigned char P14PD:1;
		unsigned char P15PD:1;
		unsigned char P16PD:1;
		unsigned char P17PD:1;
	};
} __PDP1bits_t;
extern volatile __PDP1bits_t __at(PDP1_ADDR) PDP1bits;

#define P10PD     	PDP1bits.P10PD      	/* bit 0 */
#define P11PD     	PDP1bits.P11PD      	/* bit 1 */
#define P12PD     	PDP1bits.P12PD      	/* bit 2 */
#define P13PD     	PDP1bits.P13PD      	/* bit 3 */
#define P14PD     	PDP1bits.P14PD      	/* bit 4 */
#define P15PD     	PDP1bits.P15PD      	/* bit 5 */
#define P16PD     	PDP1bits.P16PD      	/* bit 6 */
#define P17PD     	PDP1bits.P17PD      	/* bit 7 */

// ----- T0CR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0PRS0:1;
		unsigned char T0PRS1:1;
		unsigned char T0PRS2:1;
		unsigned char T0CKS0:1;
		unsigned char T0CKS1:1;
		unsigned char BUZ0OE:1;
		unsigned char PWM0OE:1;
		unsigned char T0EN:1;
	};
} __T0CRbits_t;
extern volatile __T0CRbits_t __at(T0CR_ADDR) T0CRbits;

#define T0PRS0    	T0CRbits.T0PRS0     	/* bit 0 */
#define T0PRS1    	T0CRbits.T0PRS1     	/* bit 1 */
#define T0PRS2    	T0CRbits.T0PRS2     	/* bit 2 */
#define T0CKS0    	T0CRbits.T0CKS0     	/* bit 3 */
#define T0CKS1    	T0CRbits.T0CKS1     	/* bit 4 */
#define BUZ0OE    	T0CRbits.BUZ0OE     	/* bit 5 */
#define PWM0OE    	T0CRbits.PWM0OE     	/* bit 6 */
#define T0EN      	T0CRbits.T0EN       	/* bit 7 */

// ----- T0CNT Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0CNT0:1;
		unsigned char T0CNT1:1;
		unsigned char T0CNT2:1;
		unsigned char T0CNT3:1;
		unsigned char T0CNT4:1;
		unsigned char T0CNT5:1;
		unsigned char T0CNT6:1;
		unsigned char T0CNT7:1;
	};
} __T0CNTbits_t;
extern volatile __T0CNTbits_t __at(T0CNT_ADDR) T0CNTbits;

#define T0CNT0    	T0CNTbits.T0CNT0    	/* bit 0 */
#define T0CNT1    	T0CNTbits.T0CNT1    	/* bit 1 */
#define T0CNT2    	T0CNTbits.T0CNT2    	/* bit 2 */
#define T0CNT3    	T0CNTbits.T0CNT3    	/* bit 3 */
#define T0CNT4    	T0CNTbits.T0CNT4    	/* bit 4 */
#define T0CNT5    	T0CNTbits.T0CNT5    	/* bit 5 */
#define T0CNT6    	T0CNTbits.T0CNT6    	/* bit 6 */
#define T0CNT7    	T0CNTbits.T0CNT7    	/* bit 7 */

// ----- T0LOAD Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0LOAD0:1;
		unsigned char T0LOAD1:1;
		unsigned char T0LOAD2:1;
		unsigned char T0LOAD3:1;
		unsigned char T0LOAD4:1;
		unsigned char T0LOAD5:1;
		unsigned char T0LOAD6:1;
		unsigned char T0LOAD7:1;
	};
} __T0LOADbits_t;
extern volatile __T0LOADbits_t __at(T0LOAD_ADDR) T0LOADbits;

#define T0LOAD0   	T0LOADbits.T0LOAD0  	/* bit 0 */
#define T0LOAD1   	T0LOADbits.T0LOAD1  	/* bit 1 */
#define T0LOAD2   	T0LOADbits.T0LOAD2  	/* bit 2 */
#define T0LOAD3   	T0LOADbits.T0LOAD3  	/* bit 3 */
#define T0LOAD4   	T0LOADbits.T0LOAD4  	/* bit 4 */
#define T0LOAD5   	T0LOADbits.T0LOAD5  	/* bit 5 */
#define T0LOAD6   	T0LOADbits.T0LOAD6  	/* bit 6 */
#define T0LOAD7   	T0LOADbits.T0LOAD7  	/* bit 7 */

// ----- T0DATA Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0DATA0:1;
		unsigned char T0DATA1:1;
		unsigned char T0DATA2:1;
		unsigned char T0DATA3:1;
		unsigned char T0DATA4:1;
		unsigned char T0DATA5:1;
		unsigned char T0DATA6:1;
		unsigned char T0DATA7:1;
	};
} __T0DATAbits_t;
extern volatile __T0DATAbits_t __at(T0DATA_ADDR) T0DATAbits;

#define T0DATA0   	T0DATAbits.T0DATA0  	/* bit 0 */
#define T0DATA1   	T0DATAbits.T0DATA1  	/* bit 1 */
#define T0DATA2   	T0DATAbits.T0DATA2  	/* bit 2 */
#define T0DATA3   	T0DATAbits.T0DATA3  	/* bit 3 */
#define T0DATA4   	T0DATAbits.T0DATA4  	/* bit 4 */
#define T0DATA5   	T0DATAbits.T0DATA5  	/* bit 5 */
#define T0DATA6   	T0DATAbits.T0DATA6  	/* bit 6 */
#define T0DATA7   	T0DATAbits.T0DATA7  	/* bit 7 */

// ----- T1CR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T1PRS0:1;
		unsigned char T1PRS1:1;
		unsigned char T1PRS2:1;
		unsigned char T1CKS0:1;
		unsigned char T1CKS1:1;
		unsigned char BUZ1OE:1;
		unsigned char PWM1OE:1;
		unsigned char T1EN:1;
	};
} __T1CRbits_t;
extern volatile __T1CRbits_t __at(T1CR_ADDR) T1CRbits;

#define T1PRS0    	T1CRbits.T1PRS0     	/* bit 0 */
#define T1PRS1    	T1CRbits.T1PRS1     	/* bit 1 */
#define T1PRS2    	T1CRbits.T1PRS2     	/* bit 2 */
#define T1CKS0    	T1CRbits.T1CKS0     	/* bit 3 */
#define T1CKS1    	T1CRbits.T1CKS1     	/* bit 4 */
#define BUZ1OE    	T1CRbits.BUZ1OE     	/* bit 5 */
#define PWM1OE    	T1CRbits.PWM1OE     	/* bit 6 */
#define T1EN      	T1CRbits.T1EN       	/* bit 7 */

// ----- T1CNT Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T1CNT0:1;
		unsigned char T1CNT1:1;
		unsigned char T1CNT2:1;
		unsigned char T1CNT3:1;
		unsigned char T1CNT4:1;
		unsigned char T1CNT5:1;
		unsigned char T1CNT6:1;
		unsigned char T1CNT7:1;
	};
} __T1CNTbits_t;
extern volatile __T1CNTbits_t __at(T1CNT_ADDR) T1CNTbits;

#define T1CNT0    	T1CNTbits.T1CNT0    	/* bit 0 */
#define T1CNT1    	T1CNTbits.T1CNT1    	/* bit 1 */
#define T1CNT2    	T1CNTbits.T1CNT2    	/* bit 2 */
#define T1CNT3    	T1CNTbits.T1CNT3    	/* bit 3 */
#define T1CNT4    	T1CNTbits.T1CNT4    	/* bit 4 */
#define T1CNT5    	T1CNTbits.T1CNT5    	/* bit 5 */
#define T1CNT6    	T1CNTbits.T1CNT6    	/* bit 6 */
#define T1CNT7    	T1CNTbits.T1CNT7    	/* bit 7 */

// ----- T1LOAD Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T1LOAD0:1;
		unsigned char T1LOAD1:1;
		unsigned char T1LOAD2:1;
		unsigned char T1LOAD3:1;
		unsigned char T1LOAD4:1;
		unsigned char T1LOAD5:1;
		unsigned char T1LOAD6:1;
		unsigned char T1LOAD7:1;
	};
} __T1LOADbits_t;
extern volatile __T1LOADbits_t __at(T1LOAD_ADDR) T1LOADbits;

#define T1LOAD0   	T1LOADbits.T1LOAD0  	/* bit 0 */
#define T1LOAD1   	T1LOADbits.T1LOAD1  	/* bit 1 */
#define T1LOAD2   	T1LOADbits.T1LOAD2  	/* bit 2 */
#define T1LOAD3   	T1LOADbits.T1LOAD3  	/* bit 3 */
#define T1LOAD4   	T1LOADbits.T1LOAD4  	/* bit 4 */
#define T1LOAD5   	T1LOADbits.T1LOAD5  	/* bit 5 */
#define T1LOAD6   	T1LOADbits.T1LOAD6  	/* bit 6 */
#define T1LOAD7   	T1LOADbits.T1LOAD7  	/* bit 7 */

// ----- T1DATA Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T1DATA0:1;
		unsigned char T1DATA1:1;
		unsigned char T1DATA2:1;
		unsigned char T1DATA3:1;
		unsigned char T1DATA4:1;
		unsigned char T1DATA5:1;
		unsigned char T1DATA6:1;
		unsigned char T1DATA7:1;
	};
} __T1DATAbits_t;
extern volatile __T1DATAbits_t __at(T1DATA_ADDR) T1DATAbits;

#define T1DATA0   	T1DATAbits.T1DATA0  	/* bit 0 */
#define T1DATA1   	T1DATAbits.T1DATA1  	/* bit 1 */
#define T1DATA2   	T1DATAbits.T1DATA2  	/* bit 2 */
#define T1DATA3   	T1DATAbits.T1DATA3  	/* bit 3 */
#define T1DATA4   	T1DATAbits.T1DATA4  	/* bit 4 */
#define T1DATA5   	T1DATAbits.T1DATA5  	/* bit 5 */
#define T1DATA6   	T1DATAbits.T1DATA6  	/* bit 6 */
#define T1DATA7   	T1DATAbits.T1DATA7  	/* bit 7 */

// ----- T2CR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T2PRS0:1;
		unsigned char T2PRS1:1;
		unsigned char T2PRS2:1;
		unsigned char T2CKS0:1;
		unsigned char T2CKS1:1;
		unsigned char BUZ2OE:1;
		unsigned char PWM2OE:1;
		unsigned char T2EN:1;
	};
} __T2CRbits_t;
extern volatile __T2CRbits_t __at(T2CR_ADDR) T2CRbits;

#define T2PRS0    	T2CRbits.T2PRS0     	/* bit 0 */
#define T2PRS1    	T2CRbits.T2PRS1     	/* bit 1 */
#define T2PRS2    	T2CRbits.T2PRS2     	/* bit 2 */
#define T2CKS0    	T2CRbits.T2CKS0     	/* bit 3 */
#define T2CKS1    	T2CRbits.T2CKS1     	/* bit 4 */
#define BUZ2OE    	T2CRbits.BUZ2OE     	/* bit 5 */
#define PWM2OE    	T2CRbits.PWM2OE     	/* bit 6 */
#define T2EN      	T2CRbits.T2EN       	/* bit 7 */

// ----- T2CNT Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T2CNT0:1;
		unsigned char T2CNT1:1;
		unsigned char T2CNT2:1;
		unsigned char T2CNT3:1;
		unsigned char T2CNT4:1;
		unsigned char T2CNT5:1;
		unsigned char T2CNT6:1;
		unsigned char T2CNT7:1;
	};
} __T2CNTbits_t;
extern volatile __T2CNTbits_t __at(T2CNT_ADDR) T2CNTbits;

#define T2CNT0    	T2CNTbits.T2CNT0    	/* bit 0 */
#define T2CNT1    	T2CNTbits.T2CNT1    	/* bit 1 */
#define T2CNT2    	T2CNTbits.T2CNT2    	/* bit 2 */
#define T2CNT3    	T2CNTbits.T2CNT3    	/* bit 3 */
#define T2CNT4    	T2CNTbits.T2CNT4    	/* bit 4 */
#define T2CNT5    	T2CNTbits.T2CNT5    	/* bit 5 */
#define T2CNT6    	T2CNTbits.T2CNT6    	/* bit 6 */
#define T2CNT7    	T2CNTbits.T2CNT7    	/* bit 7 */

// ----- T2LOAD Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T2LOAD0:1;
		unsigned char T2LOAD1:1;
		unsigned char T2LOAD2:1;
		unsigned char T2LOAD3:1;
		unsigned char T2LOAD4:1;
		unsigned char T2LOAD5:1;
		unsigned char T2LOAD6:1;
		unsigned char T2LOAD7:1;
	};
} __T2LOADbits_t;
extern volatile __T2LOADbits_t __at(T2LOAD_ADDR) T2LOADbits;

#define T2LOAD0   	T2LOADbits.T2LOAD0  	/* bit 0 */
#define T2LOAD1   	T2LOADbits.T2LOAD1  	/* bit 1 */
#define T2LOAD2   	T2LOADbits.T2LOAD2  	/* bit 2 */
#define T2LOAD3   	T2LOADbits.T2LOAD3  	/* bit 3 */
#define T2LOAD4   	T2LOADbits.T2LOAD4  	/* bit 4 */
#define T2LOAD5   	T2LOADbits.T2LOAD5  	/* bit 5 */
#define T2LOAD6   	T2LOADbits.T2LOAD6  	/* bit 6 */
#define T2LOAD7   	T2LOADbits.T2LOAD7  	/* bit 7 */

// ----- T2DATA Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T2DATA0:1;
		unsigned char T2DATA1:1;
		unsigned char T2DATA2:1;
		unsigned char T2DATA3:1;
		unsigned char T2DATA4:1;
		unsigned char T2DATA5:1;
		unsigned char T2DATA6:1;
		unsigned char T2DATA7:1;
	};
} __T2DATAbits_t;
extern volatile __T2DATAbits_t __at(T2DATA_ADDR) T2DATAbits;

#define T2DATA0   	T2DATAbits.T2DATA0  	/* bit 0 */
#define T2DATA1   	T2DATAbits.T2DATA1  	/* bit 1 */
#define T2DATA2   	T2DATAbits.T2DATA2  	/* bit 2 */
#define T2DATA3   	T2DATAbits.T2DATA3  	/* bit 3 */
#define T2DATA4   	T2DATAbits.T2DATA4  	/* bit 4 */
#define T2DATA5   	T2DATAbits.T2DATA5  	/* bit 5 */
#define T2DATA6   	T2DATAbits.T2DATA6  	/* bit 6 */
#define T2DATA7   	T2DATAbits.T2DATA7  	/* bit 7 */

// ----- T3CR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T3PRS0:1;
		unsigned char T3PRS1:1;
		unsigned char T3PRS2:1;
		unsigned char T3CKS0:1;
		unsigned char T3CKS1:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char T3EN:1;
	};
} __T3CRbits_t;
extern volatile __T3CRbits_t __at(T3CR_ADDR) T3CRbits;

#define T3PRS0    	T3CRbits.T3PRS0     	/* bit 0 */
#define T3PRS1    	T3CRbits.T3PRS1     	/* bit 1 */
#define T3PRS2    	T3CRbits.T3PRS2     	/* bit 2 */
#define T3CKS0    	T3CRbits.T3CKS0     	/* bit 3 */
#define T3CKS1    	T3CRbits.T3CKS1     	/* bit 4 */
#define T3EN      	T3CRbits.T3EN       	/* bit 7 */

// ----- T3CNT Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T3CNT0:1;
		unsigned char T3CNT1:1;
		unsigned char T3CNT2:1;
		unsigned char T3CNT3:1;
		unsigned char T3CNT4:1;
		unsigned char T3CNT5:1;
		unsigned char T3CNT6:1;
		unsigned char T3CNT7:1;
	};
} __T3CNTbits_t;
extern volatile __T3CNTbits_t __at(T3CNT_ADDR) T3CNTbits;

#define T3CNT0    	T3CNTbits.T3CNT0    	/* bit 0 */
#define T3CNT1    	T3CNTbits.T3CNT1    	/* bit 1 */
#define T3CNT2    	T3CNTbits.T3CNT2    	/* bit 2 */
#define T3CNT3    	T3CNTbits.T3CNT3    	/* bit 3 */
#define T3CNT4    	T3CNTbits.T3CNT4    	/* bit 4 */
#define T3CNT5    	T3CNTbits.T3CNT5    	/* bit 5 */
#define T3CNT6    	T3CNTbits.T3CNT6    	/* bit 6 */
#define T3CNT7    	T3CNTbits.T3CNT7    	/* bit 7 */

// ----- T3LOAD Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T3LOAD0:1;
		unsigned char T3LOAD1:1;
		unsigned char T3LOAD2:1;
		unsigned char T3LOAD3:1;
		unsigned char T3LOAD4:1;
		unsigned char T3LOAD5:1;
		unsigned char T3LOAD6:1;
		unsigned char T3LOAD7:1;
	};
} __T3LOADbits_t;
extern volatile __T3LOADbits_t __at(T3LOAD_ADDR) T3LOADbits;

#define T3LOAD0   	T3LOADbits.T3LOAD0  	/* bit 0 */
#define T3LOAD1   	T3LOADbits.T3LOAD1  	/* bit 1 */
#define T3LOAD2   	T3LOADbits.T3LOAD2  	/* bit 2 */
#define T3LOAD3   	T3LOADbits.T3LOAD3  	/* bit 3 */
#define T3LOAD4   	T3LOADbits.T3LOAD4  	/* bit 4 */
#define T3LOAD5   	T3LOADbits.T3LOAD5  	/* bit 5 */
#define T3LOAD6   	T3LOADbits.T3LOAD6  	/* bit 6 */
#define T3LOAD7   	T3LOADbits.T3LOAD7  	/* bit 7 */

// ----- PWM0DR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PWM0D0:1;
		unsigned char PWM0D1:1;
		unsigned char PWM0D2:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWM0DRbits_t;
extern volatile __PWM0DRbits_t __at(PWM0DR_ADDR) PWM0DRbits;

#define PWM0D0    	PWM0DRbits.PWM0D0   	/* bit 0 */
#define PWM0D1    	PWM0DRbits.PWM0D1   	/* bit 1 */
#define PWM0D2    	PWM0DRbits.PWM0D2   	/* bit 2 */

// ----- PWM1DR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PWM1D0:1;
		unsigned char PWM1D1:1;
		unsigned char PWM1D2:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWM1DRbits_t;
extern volatile __PWM1DRbits_t __at(PWM1DR_ADDR) PWM1DRbits;

#define PWM1D0    	PWM1DRbits.PWM1D0   	/* bit 0 */
#define PWM1D1    	PWM1DRbits.PWM1D1   	/* bit 1 */
#define PWM1D2    	PWM1DRbits.PWM1D2   	/* bit 2 */

// ----- PWM2DR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PWM2D0:1;
		unsigned char PWM2D1:1;
		unsigned char PWM2D2:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWM2DRbits_t;
extern volatile __PWM2DRbits_t __at(PWM2DR_ADDR) PWM2DRbits;

#define PWM2D0    	PWM2DRbits.PWM2D0   	/* bit 0 */
#define PWM2D1    	PWM2DRbits.PWM2D1   	/* bit 1 */
#define PWM2D2    	PWM2DRbits.PWM2D2   	/* bit 2 */

// ----- PWMCR0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char FPWM1F0:1;
		unsigned char FPWM1F1:1;
		unsigned char FPWM1R0:1;
		unsigned char FPWM1R1:1;
		unsigned char PWM0NV:1;
		unsigned char FPWM1NV:1;
		unsigned char PWM2NV:1;
		unsigned char FPWM1OE:1;
	};
} __PWMCR0bits_t;
extern volatile __PWMCR0bits_t __at(PWMCR0_ADDR) PWMCR0bits;

#define FPWM1F0   	PWMCR0bits.FPWM1F0  	/* bit 0 */
#define FPWM1F1   	PWMCR0bits.FPWM1F1  	/* bit 1 */
#define FPWM1R0   	PWMCR0bits.FPWM1R0  	/* bit 2 */
#define FPWM1R1   	PWMCR0bits.FPWM1R1  	/* bit 3 */
#define PWM0NV    	PWMCR0bits.PWM0NV   	/* bit 4 */
#define FPWM1NV   	PWMCR0bits.FPWM1NV  	/* bit 5 */
#define PWM2NV    	PWMCR0bits.PWM2NV   	/* bit 6 */
#define FPWM1OE   	PWMCR0bits.FPWM1OE  	/* bit 7 */

// ----- PWMCR1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PWM0MD:1;
		unsigned char PWM1MD:1;
		unsigned char PWM2MD:1;
		unsigned char TMRCKS0:1;
		unsigned char TMRCKS1:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWMCR1bits_t;
extern volatile __PWMCR1bits_t __at(PWMCR1_ADDR) PWMCR1bits;

#define PWM0MD    	PWMCR1bits.PWM0MD   	/* bit 0 */
#define PWM1MD    	PWMCR1bits.PWM1MD   	/* bit 1 */
#define PWM2MD    	PWMCR1bits.PWM2MD   	/* bit 2 */
#define TMRCKS0   	PWMCR1bits.TMRCKS0  	/* bit 3 */
#define TMRCKS1   	PWMCR1bits.TMRCKS1  	/* bit 4 */

// ----- OSCMR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char HFEN:1;
		unsigned char LFEN:1;
		unsigned char CLKS:1;
		unsigned char :1;
		unsigned char STBH:1;
		unsigned char STBL:1;
		unsigned char :1;
		unsigned char :1;
	};
} __OSCMRbits_t;
extern volatile __OSCMRbits_t __at(OSCMR_ADDR) OSCMRbits;

#define HFEN      	OSCMRbits.HFEN      	/* bit 0 */
#define LFEN      	OSCMRbits.LFEN      	/* bit 1 */
#define CLKS      	OSCMRbits.CLKS      	/* bit 2 */
#define STBH      	OSCMRbits.STBH      	/* bit 4 */
#define STBL      	OSCMRbits.STBL      	/* bit 5 */

// ----- LVDCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char LVDF:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char VLVDS0:1;
		unsigned char VLVDS1:1;
		unsigned char VLVDS2:1;
		unsigned char VLVDS3:1;
		unsigned char LVDEN:1;
	};
} __LVDCRbits_t;
extern volatile __LVDCRbits_t __at(LVDCR_ADDR) LVDCRbits;

#define LVDF      	LVDCRbits.LVDF      	/* bit 0 */
#define VLVDS0    	LVDCRbits.VLVDS0    	/* bit 3 */
#define VLVDS1    	LVDCRbits.VLVDS1    	/* bit 4 */
#define VLVDS2    	LVDCRbits.VLVDS2    	/* bit 5 */
#define VLVDS3    	LVDCRbits.VLVDS3    	/* bit 6 */
#define LVDEN     	LVDCRbits.LVDEN     	/* bit 7 */

// ----- ADCR0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char ADEN:1;
		unsigned char ADEOC:1;
		unsigned char :1;
		unsigned char ADRSEL:1;
		unsigned char ADCHS0:1;
		unsigned char ADCHS1:1;
		unsigned char ADCHS2:1;
		unsigned char ADCHS3:1;
	};
} __ADCR0bits_t;
extern volatile __ADCR0bits_t __at(ADCR0_ADDR) ADCR0bits;

#define ADEN      	ADCR0bits.ADEN      	/* bit 0 */
#define ADEOC     	ADCR0bits.ADEOC     	/* bit 1 */
#define ADRSEL    	ADCR0bits.ADRSEL    	/* bit 3 */
#define ADCHS0    	ADCR0bits.ADCHS0    	/* bit 4 */
#define ADCHS1    	ADCR0bits.ADCHS1    	/* bit 5 */
#define ADCHS2    	ADCR0bits.ADCHS2    	/* bit 6 */
#define ADCHS3    	ADCR0bits.ADCHS3    	/* bit 7 */

// ----- ADCR1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char ADVRS0:1;
		unsigned char ADVRS1:1;
		unsigned char ADVRS2:1;
		unsigned char RESS0:1;
		unsigned char :1;
		unsigned char ADCKS0:1;
		unsigned char ADCKS1:1;
		unsigned char ADCKS2:1;
	};
} __ADCR1bits_t;
extern volatile __ADCR1bits_t __at(ADCR1_ADDR) ADCR1bits;

#define ADVRS0    	ADCR1bits.ADVRS0    	/* bit 0 */
#define ADVRS1    	ADCR1bits.ADVRS1    	/* bit 1 */
#define ADVRS2    	ADCR1bits.ADVRS2    	/* bit 2 */
#define RESS0     	ADCR1bits.RESS0     	/* bit 3 */
#define ADCKS0    	ADCR1bits.ADCKS0    	/* bit 5 */
#define ADCKS1    	ADCR1bits.ADCKS1    	/* bit 6 */
#define ADCKS2    	ADCR1bits.ADCKS2    	/* bit 7 */

// ----- ADCR2 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char ADSPS0:1;
		unsigned char ADSPS1:1;
		unsigned char ADSPS2:1;
		unsigned char ADSPS3:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __ADCR2bits_t;
extern volatile __ADCR2bits_t __at(ADCR2_ADDR) ADCR2bits;

#define ADSPS0    	ADCR2bits.ADSPS0    	/* bit 0 */
#define ADSPS1    	ADCR2bits.ADSPS1    	/* bit 1 */
#define ADSPS2    	ADCR2bits.ADSPS2    	/* bit 2 */
#define ADSPS3    	ADCR2bits.ADSPS3    	/* bit 3 */

// ----- ADRH Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char ADR4:1;
		unsigned char ADR5:1;
		unsigned char ADR6:1;
		unsigned char ADR7:1;
		unsigned char ADR8:1;
		unsigned char ADR9:1;
		unsigned char ADR10:1;
		unsigned char ADR11:1;
	};
} __ADRHbits_t;
extern volatile __ADRHbits_t __at(ADRH_ADDR) ADRHbits;

#define ADR4      	ADRHbits.ADR4       	/* bit 0 */
#define ADR5      	ADRHbits.ADR5       	/* bit 1 */
#define ADR6      	ADRHbits.ADR6       	/* bit 2 */
#define ADR7      	ADRHbits.ADR7       	/* bit 3 */
#define ADR8      	ADRHbits.ADR8       	/* bit 4 */
#define ADR9      	ADRHbits.ADR9       	/* bit 5 */
#define ADR10     	ADRHbits.ADR10      	/* bit 6 */
#define ADR11     	ADRHbits.ADR11      	/* bit 7 */

// ----- ADRL Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char ADR0:1;
		unsigned char ADR1:1;
		unsigned char ADR2:1;
		unsigned char ADR3:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __ADRLbits_t;
extern volatile __ADRLbits_t __at(ADRL_ADDR) ADRLbits;

#define ADR0      	ADRLbits.ADR0       	/* bit 0 */
#define ADR1      	ADRLbits.ADR1       	/* bit 1 */
#define ADR2      	ADRLbits.ADR2       	/* bit 2 */
#define ADR3      	ADRLbits.ADR3       	/* bit 3 */

// ----- ADIOS0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00ADS:1;
		unsigned char P02ADS:1;
		unsigned char P03ADS:1;
		unsigned char P04ADS:1;
		unsigned char P05ADS:1;
		unsigned char P10ADS:1;
		unsigned char P11ADS:1;
		unsigned char P12ADS:1;
	};
} __ADIOS0bits_t;
extern volatile __ADIOS0bits_t __at(ADIOS0_ADDR) ADIOS0bits;

#define P00ADS    	ADIOS0bits.P00ADS   	/* bit 0 */
#define P02ADS    	ADIOS0bits.P02ADS   	/* bit 1 */
#define P03ADS    	ADIOS0bits.P03ADS   	/* bit 2 */
#define P04ADS    	ADIOS0bits.P04ADS   	/* bit 3 */
#define P05ADS    	ADIOS0bits.P05ADS   	/* bit 4 */
#define P10ADS    	ADIOS0bits.P10ADS   	/* bit 5 */
#define P11ADS    	ADIOS0bits.P11ADS   	/* bit 6 */
#define P12ADS    	ADIOS0bits.P12ADS   	/* bit 7 */

// ----- ADIOS1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P14ADS:1;
		unsigned char P15ADS:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __ADIOS1bits_t;
extern volatile __ADIOS1bits_t __at(ADIOS1_ADDR) ADIOS1bits;

#define P14ADS    	ADIOS1bits.P14ADS   	/* bit 0 */
#define P15ADS    	ADIOS1bits.P15ADS   	/* bit 1 */

// ----- PMOD Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00OM:1;
		unsigned char P01OM:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char P01ADS:1;
		unsigned char P13ADS:1;
		unsigned char P17ADS:1;
	};
} __PMODbits_t;
extern volatile __PMODbits_t __at(PMOD_ADDR) PMODbits;

#define P00OM     	PMODbits.P00OM      	/* bit 0 */
#define P01OM     	PMODbits.P01OM      	/* bit 1 */
#define P01ADS    	PMODbits.P01ADS     	/* bit 5 */
#define P13ADS    	PMODbits.P13ADS     	/* bit 6 */
#define P17ADS    	PMODbits.P17ADS     	/* bit 7 */

// ----- PWMCR3 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char :1;
		unsigned char :1;
		unsigned char PWM0OS:1;
		unsigned char :1;
		unsigned char NFPWM2OE:1;
		unsigned char NPWM2OE:1;
		unsigned char FPWM2OE:1;
		unsigned char FPWM2NV:1;
	};
} __PWMCR3bits_t;
extern volatile __PWMCR3bits_t __at(PWMCR3_ADDR) PWMCR3bits;

#define PWM0OS    	PWMCR3bits.PWM0OS   	/* bit 2 */
#define NFPWM2OE  	PWMCR3bits.NFPWM2OE 	/* bit 4 */
#define NPWM2OE   	PWMCR3bits.NPWM2OE  	/* bit 5 */
#define FPWM2OE   	PWMCR3bits.FPWM2OE  	/* bit 6 */
#define FPWM2NV   	PWMCR3bits.FPWM2NV  	/* bit 7 */

// ----- PWMCR2 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char FPWM2D0:1;
		unsigned char FPWM2D1:1;
		unsigned char FPWM2D2:1;
		unsigned char FPWM2D3:1;
		unsigned char FPWM2D4:1;
		unsigned char FPWM2D5:1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWMCR2bits_t;
extern volatile __PWMCR2bits_t __at(PWMCR2_ADDR) PWMCR2bits;

#define FPWM2D0   	PWMCR2bits.FPWM2D0  	/* bit 0 */
#define FPWM2D1   	PWMCR2bits.FPWM2D1  	/* bit 1 */
#define FPWM2D2   	PWMCR2bits.FPWM2D2  	/* bit 2 */
#define FPWM2D3   	PWMCR2bits.FPWM2D3  	/* bit 3 */
#define FPWM2D4   	PWMCR2bits.FPWM2D4  	/* bit 4 */
#define FPWM2D5   	PWMCR2bits.FPWM2D5  	/* bit 5 */

// ----- HIRCCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char HIRCAM:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __HIRCCRbits_t;
extern volatile __HIRCCRbits_t __at(HIRCCR_ADDR) HIRCCRbits;

#define HIRCAM    	HIRCCRbits.HIRCAM   	/* bit 0 */

// ----- OSCCALH Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char OSCCAL8:1;
		unsigned char OSCCAL9:1;
		unsigned char OSCCAL10:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __OSCCALHbits_t;
extern volatile __OSCCALHbits_t __at(OSCCALH_ADDR) OSCCALHbits;

#define OSCCAL8   	OSCCALHbits.OSCCAL8 	/* bit 0 */
#define OSCCAL9   	OSCCALHbits.OSCCAL9 	/* bit 1 */
#define OSCCAL10  	OSCCALHbits.OSCCAL10	/* bit 2 */

// ----- OSCCALL Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char OSCCAL0:1;
		unsigned char OSCCAL1:1;
		unsigned char OSCCAL2:1;
		unsigned char OSCCAL3:1;
		unsigned char OSCCAL4:1;
		unsigned char OSCCAL5:1;
		unsigned char OSCCAL6:1;
		unsigned char OSCCAL7:1;
	};
} __OSCCALLbits_t;
extern volatile __OSCCALLbits_t __at(OSCCALL_ADDR) OSCCALLbits;

#define OSCCAL0   	OSCCALLbits.OSCCAL0 	/* bit 0 */
#define OSCCAL1   	OSCCALLbits.OSCCAL1 	/* bit 1 */
#define OSCCAL2   	OSCCALLbits.OSCCAL2 	/* bit 2 */
#define OSCCAL3   	OSCCALLbits.OSCCAL3 	/* bit 3 */
#define OSCCAL4   	OSCCALLbits.OSCCAL4 	/* bit 4 */
#define OSCCAL5   	OSCCALLbits.OSCCAL5 	/* bit 5 */
#define OSCCAL6   	OSCCALLbits.OSCCAL6 	/* bit 6 */
#define OSCCAL7   	OSCCALLbits.OSCCAL7 	/* bit 7 */

#endif
