#ifndef MC32P8141_H
#define MC32P8141_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 OSCMR_ADDR      	0x018C
#define LVDCR_ADDR      	0x018D
#define DRVCR_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 T0CNTH_ADDR     	0x0199
#define T0CNTL_ADDR     	0x019A
#define T0LOADH_ADDR    	0x019B
#define T0LOADL_ADDR    	0x019C
#define PFRCCR_ADDR     	0x019E
#define PFRCCAL_ADDR    	0x019F
#define T1CR_ADDR       	0x01A0
#define T1CNT_ADDR      	0x01A1
#define T1LOAD_ADDR     	0x01A2
#define T1DATA_ADDR     	0x01A3
#define PWM1CR0_ADDR    	0x01A4
#define PWM1CR1_ADDR    	0x01A5
#define PWM1CR2_ADDR    	0x01A6
#define T2CR_ADDR       	0x01A8
#define T2CNT_ADDR      	0x01A9
#define T2LOAD_ADDR     	0x01AA
#define T2DATA_ADDR     	0x01AB
#define T2DATB_ADDR     	0x01AC
#define PWM2CR_ADDR     	0x01AD
#define ADCR0_ADDR      	0x01B0
#define ADCR1_ADDR      	0x01B1
#define ADRH_ADDR       	0x01B2
#define ADRL_ADDR       	0x01B3
#define OSADJCR_ADDR    	0x01B4
#define P0ADCR_ADDR     	0x01B5
#define P1ADCR_ADDR     	0x01B6
#define P0KBCR_ADDR     	0x01B7
#define TKCR0_ADDR      	0x01B8
#define TKCR1_ADDR      	0x01B9
#define TKCNTH_ADDR     	0x01BA
#define TKCNTL_ADDR     	0x01BB

//----- 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 (OSCMR_ADDR)    	OSCMR;
extern __sfr __at (LVDCR_ADDR)    	LVDCR;
extern __sfr __at (DRVCR_ADDR)    	DRVCR;
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 (T0CNTH_ADDR)   	T0CNTH;
extern __sfr __at (T0CNTL_ADDR)   	T0CNTL;
extern __sfr __at (T0LOADH_ADDR)  	T0LOADH;
extern __sfr __at (T0LOADL_ADDR)  	T0LOADL;
extern __sfr __at (PFRCCR_ADDR)   	PFRCCR;
extern __sfr __at (PFRCCAL_ADDR)  	PFRCCAL;
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 (PWM1CR0_ADDR)  	PWM1CR0;
extern __sfr __at (PWM1CR1_ADDR)  	PWM1CR1;
extern __sfr __at (PWM1CR2_ADDR)  	PWM1CR2;
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 (T2DATB_ADDR)   	T2DATB;
extern __sfr __at (PWM2CR_ADDR)   	PWM2CR;
extern __sfr __at (ADCR0_ADDR)    	ADCR0;
extern __sfr __at (ADCR1_ADDR)    	ADCR1;
extern __sfr __at (ADRH_ADDR)     	ADRH;
extern __sfr __at (ADRL_ADDR)     	ADRL;
extern __sfr __at (OSADJCR_ADDR)  	OSADJCR;
extern __sfr __at (P0ADCR_ADDR)   	P0ADCR;
extern __sfr __at (P1ADCR_ADDR)   	P1ADCR;
extern __sfr __at (P0KBCR_ADDR)   	P0KBCR;
extern __sfr __at (TKCR0_ADDR)    	TKCR0;
extern __sfr __at (TKCR1_ADDR)    	TKCR1;
extern __sfr __at (TKCNTH_ADDR)   	TKCNTH;
extern __sfr __at (TKCNTL_ADDR)   	TKCNTL;

//==========================================================================
//
//	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 ADIE:1;
		unsigned char LVDIE:1;
		unsigned char T2IE: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 ADIE      	INTEbits.ADIE       	/* bit 5 */
#define LVDIE     	INTEbits.LVDIE      	/* bit 6 */
#define T2IE      	INTEbits.T2IE       	/* 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 ADIF:1;
		unsigned char LVDIF:1;
		unsigned char T2IF: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 ADIF      	INTFbits.ADIF       	/* bit 5 */
#define LVDIF     	INTFbits.LVDIF      	/* bit 6 */
#define T2IF      	INTFbits.T2IF       	/* bit 7 */

// ----- 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 LVDVS0:1;
		unsigned char LVDVS1:1;
		unsigned char LVDVS2:1;
		unsigned char :1;
		unsigned char LVDEN:1;
	};
} __LVDCRbits_t;
extern volatile __LVDCRbits_t __at(LVDCR_ADDR) LVDCRbits;

#define LVDF      	LVDCRbits.LVDF      	/* bit 0 */
#define LVDVS0    	LVDCRbits.LVDVS0    	/* bit 3 */
#define LVDVS1    	LVDCRbits.LVDVS1    	/* bit 4 */
#define LVDVS2    	LVDCRbits.LVDVS2    	/* bit 5 */
#define LVDEN     	LVDCRbits.LVDEN     	/* bit 7 */

// ----- DRVCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char NMOS0ON:1;
		unsigned char NMOS1ON:1;
		unsigned char P00PDR:1;
		unsigned char P03PDR:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __DRVCRbits_t;
extern volatile __DRVCRbits_t __at(DRVCR_ADDR) DRVCRbits;

#define NMOS0ON   	DRVCRbits.NMOS0ON   	/* bit 0 */
#define NMOS1ON   	DRVCRbits.NMOS1ON   	/* bit 1 */
#define P00PDR    	DRVCRbits.P00PDR    	/* bit 2 */
#define P03PDR    	DRVCRbits.P03PDR    	/* bit 3 */

// ----- 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 P06D:1;
		unsigned char P07D: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 */
#define P06D      	IOP0bits.P06D       	/* bit 6 */
#define P07D      	IOP0bits.P07D       	/* bit 7 */

// ----- 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 P06OE:1;
		unsigned char P07OE: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 */
#define P06OE     	OEP0bits.P06OE      	/* bit 6 */
#define P07OE     	OEP0bits.P07OE      	/* bit 7 */

// ----- 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 P06PU:1;
		unsigned char P07PU: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 */
#define P06PU     	PUP0bits.P06PU      	/* bit 6 */
#define P07PU     	PUP0bits.P07PU      	/* bit 7 */

// ----- 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 P06PD:1;
		unsigned char P07PD: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 */
#define P06PD     	PDP0bits.P06PD      	/* bit 6 */
#define P07PD     	PDP0bits.P07PD      	/* bit 7 */

// ----- 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 :1;
		unsigned char T0MOD: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 T0MOD     	T0CRbits.T0MOD      	/* bit 6 */
#define T0EN      	T0CRbits.T0EN       	/* bit 7 */

// ----- T0CNTH Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0CNT8:1;
		unsigned char T0CNT9:1;
		unsigned char T0CNT10:1;
		unsigned char T0CNT11:1;
		unsigned char T0CNT12:1;
		unsigned char T0CNT13:1;
		unsigned char T0CNT14:1;
		unsigned char T0CNT15:1;
	};
} __T0CNTHbits_t;
extern volatile __T0CNTHbits_t __at(T0CNTH_ADDR) T0CNTHbits;

#define T0CNT8    	T0CNTHbits.T0CNT8   	/* bit 0 */
#define T0CNT9    	T0CNTHbits.T0CNT9   	/* bit 1 */
#define T0CNT10   	T0CNTHbits.T0CNT10  	/* bit 2 */
#define T0CNT11   	T0CNTHbits.T0CNT11  	/* bit 3 */
#define T0CNT12   	T0CNTHbits.T0CNT12  	/* bit 4 */
#define T0CNT13   	T0CNTHbits.T0CNT13  	/* bit 5 */
#define T0CNT14   	T0CNTHbits.T0CNT14  	/* bit 6 */
#define T0CNT15   	T0CNTHbits.T0CNT15  	/* bit 7 */

// ----- T0CNTL 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;
	};
} __T0CNTLbits_t;
extern volatile __T0CNTLbits_t __at(T0CNTL_ADDR) T0CNTLbits;

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

// ----- T0LOADH Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T0LOAD8:1;
		unsigned char T0LOAD9:1;
		unsigned char T0LOAD10:1;
		unsigned char T0LOAD11:1;
		unsigned char T0LOAD12:1;
		unsigned char T0LOAD13:1;
		unsigned char T0LOAD14:1;
		unsigned char T0LOAD15:1;
	};
} __T0LOADHbits_t;
extern volatile __T0LOADHbits_t __at(T0LOADH_ADDR) T0LOADHbits;

#define T0LOAD8   	T0LOADHbits.T0LOAD8 	/* bit 0 */
#define T0LOAD9   	T0LOADHbits.T0LOAD9 	/* bit 1 */
#define T0LOAD10  	T0LOADHbits.T0LOAD10	/* bit 2 */
#define T0LOAD11  	T0LOADHbits.T0LOAD11	/* bit 3 */
#define T0LOAD12  	T0LOADHbits.T0LOAD12	/* bit 4 */
#define T0LOAD13  	T0LOADHbits.T0LOAD13	/* bit 5 */
#define T0LOAD14  	T0LOADHbits.T0LOAD14	/* bit 6 */
#define T0LOAD15  	T0LOADHbits.T0LOAD15	/* bit 7 */

// ----- T0LOADL 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;
	};
} __T0LOADLbits_t;
extern volatile __T0LOADLbits_t __at(T0LOADL_ADDR) T0LOADLbits;

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

// ----- PFRCCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char PFRCEN:1;
	};
} __PFRCCRbits_t;
extern volatile __PFRCCRbits_t __at(PFRCCR_ADDR) PFRCCRbits;

#define PFRCEN    	PFRCCRbits.PFRCEN   	/* bit 7 */

// ----- PFRCCAL Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PFRCCAL0:1;
		unsigned char PFRCCAL1:1;
		unsigned char PFRCCAL2:1;
		unsigned char PFRCCAL3:1;
		unsigned char PFRCCAL4:1;
		unsigned char PFRCCAL5:1;
		unsigned char PFRCCAL6:1;
		unsigned char PFRCCAL7:1;
	};
} __PFRCCALbits_t;
extern volatile __PFRCCALbits_t __at(PFRCCAL_ADDR) PFRCCALbits;

#define PFRCCAL0  	PFRCCALbits.PFRCCAL0	/* bit 0 */
#define PFRCCAL1  	PFRCCALbits.PFRCCAL1	/* bit 1 */
#define PFRCCAL2  	PFRCCALbits.PFRCCAL2	/* bit 2 */
#define PFRCCAL3  	PFRCCALbits.PFRCCAL3	/* bit 3 */
#define PFRCCAL4  	PFRCCALbits.PFRCCAL4	/* bit 4 */
#define PFRCCAL5  	PFRCCALbits.PFRCCAL5	/* bit 5 */
#define PFRCCAL6  	PFRCCALbits.PFRCCAL6	/* bit 6 */
#define PFRCCAL7  	PFRCCALbits.PFRCCAL7	/* 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 FPWM1EN:1;
		unsigned char PWM1EN: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 FPWM1EN   	T1CRbits.FPWM1EN    	/* bit 5 */
#define PWM1EN    	T1CRbits.PWM1EN     	/* 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 */

// ----- PWM1CR0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PWM1OE:1;
		unsigned char PWM1NV:1;
		unsigned char FPWM1OE:1;
		unsigned char FPWM1NV:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWM1CR0bits_t;
extern volatile __PWM1CR0bits_t __at(PWM1CR0_ADDR) PWM1CR0bits;

#define PWM1OE    	PWM1CR0bits.PWM1OE  	/* bit 0 */
#define PWM1NV    	PWM1CR0bits.PWM1NV  	/* bit 1 */
#define FPWM1OE   	PWM1CR0bits.FPWM1OE 	/* bit 2 */
#define FPWM1NV   	PWM1CR0bits.FPWM1NV 	/* bit 3 */

// ----- PWM1CR1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char FPWM1E0:1;
		unsigned char FPWM1E1:1;
		unsigned char FPWM1E2:1;
		unsigned char FPWM1E3:1;
		unsigned char FPWM1E4:1;
		unsigned char FPWM1E5:1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWM1CR1bits_t;
extern volatile __PWM1CR1bits_t __at(PWM1CR1_ADDR) PWM1CR1bits;

#define FPWM1E0   	PWM1CR1bits.FPWM1E0 	/* bit 0 */
#define FPWM1E1   	PWM1CR1bits.FPWM1E1 	/* bit 1 */
#define FPWM1E2   	PWM1CR1bits.FPWM1E2 	/* bit 2 */
#define FPWM1E3   	PWM1CR1bits.FPWM1E3 	/* bit 3 */
#define FPWM1E4   	PWM1CR1bits.FPWM1E4 	/* bit 4 */
#define FPWM1E5   	PWM1CR1bits.FPWM1E5 	/* bit 5 */

// ----- PWM1CR2 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char PWM1D0:1;
		unsigned char PWM1D1:1;
		unsigned char PWM1D2:1;
		unsigned char PWM1DB:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
	};
} __PWM1CR2bits_t;
extern volatile __PWM1CR2bits_t __at(PWM1CR2_ADDR) PWM1CR2bits;

#define PWM1D0    	PWM1CR2bits.PWM1D0  	/* bit 0 */
#define PWM1D1    	PWM1CR2bits.PWM1D1  	/* bit 1 */
#define PWM1D2    	PWM1CR2bits.PWM1D2  	/* bit 2 */
#define PWM1DB    	PWM1CR2bits.PWM1DB  	/* bit 3 */

// ----- 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 :1;
		unsigned char :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 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 */

// ----- T2DATB Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char T2DATB0:1;
		unsigned char T2DATB1:1;
		unsigned char T2DATB2:1;
		unsigned char T2DATB3:1;
		unsigned char T2DATB4:1;
		unsigned char T2DATB5:1;
		unsigned char T2DATB6:1;
		unsigned char T2DATB7:1;
	};
} __T2DATBbits_t;
extern volatile __T2DATBbits_t __at(T2DATB_ADDR) T2DATBbits;

#define T2DATB0   	T2DATBbits.T2DATB0  	/* bit 0 */
#define T2DATB1   	T2DATBbits.T2DATB1  	/* bit 1 */
#define T2DATB2   	T2DATBbits.T2DATB2  	/* bit 2 */
#define T2DATB3   	T2DATBbits.T2DATB3  	/* bit 3 */
#define T2DATB4   	T2DATBbits.T2DATB4  	/* bit 4 */
#define T2DATB5   	T2DATBbits.T2DATB5  	/* bit 5 */
#define T2DATB6   	T2DATBbits.T2DATB6  	/* bit 6 */
#define T2DATB7   	T2DATBbits.T2DATB7  	/* bit 7 */

// ----- PWM2CR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char PWM2BNV:1;
		unsigned char PWM2ANV:1;
		unsigned char PWM2BEC:1;
		unsigned char PWM2AEC:1;
	};
} __PWM2CRbits_t;
extern volatile __PWM2CRbits_t __at(PWM2CR_ADDR) PWM2CRbits;

#define PWM2BNV   	PWM2CRbits.PWM2BNV  	/* bit 4 */
#define PWM2ANV   	PWM2CRbits.PWM2ANV  	/* bit 5 */
#define PWM2BEC   	PWM2CRbits.PWM2BEC  	/* bit 6 */
#define PWM2AEC   	PWM2CRbits.PWM2AEC  	/* bit 7 */

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

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

// ----- ADCR1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char ADSPS0:1;
		unsigned char ADSPS1:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char ADVRS0:1;
		unsigned char ADVRS1:1;
		unsigned char ADVRS2:1;
		unsigned char ADRSEL:1;
	};
} __ADCR1bits_t;
extern volatile __ADCR1bits_t __at(ADCR1_ADDR) ADCR1bits;

#define ADSPS0    	ADCR1bits.ADSPS0    	/* bit 0 */
#define ADSPS1    	ADCR1bits.ADSPS1    	/* bit 1 */
#define ADVRS0    	ADCR1bits.ADVRS0    	/* bit 4 */
#define ADVRS1    	ADCR1bits.ADVRS1    	/* bit 5 */
#define ADVRS2    	ADCR1bits.ADVRS2    	/* bit 6 */
#define ADRSEL    	ADCR1bits.ADRSEL    	/* bit 7 */

// ----- 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 */

// ----- OSADJCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char OSADJT0:1;
		unsigned char OSADJT1:1;
		unsigned char OSADJT2:1;
		unsigned char OSADJT3:1;
		unsigned char OSADJTD:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char OSADJEN:1;
	};
} __OSADJCRbits_t;
extern volatile __OSADJCRbits_t __at(OSADJCR_ADDR) OSADJCRbits;

#define OSADJT0   	OSADJCRbits.OSADJT0 	/* bit 0 */
#define OSADJT1   	OSADJCRbits.OSADJT1 	/* bit 1 */
#define OSADJT2   	OSADJCRbits.OSADJT2 	/* bit 2 */
#define OSADJT3   	OSADJCRbits.OSADJT3 	/* bit 3 */
#define OSADJTD   	OSADJCRbits.OSADJTD 	/* bit 4 */
#define OSADJEN   	OSADJCRbits.OSADJEN 	/* bit 7 */

// ----- P0ADCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00DC:1;
		unsigned char P01DC:1;
		unsigned char P02DC:1;
		unsigned char P03DC:1;
		unsigned char P04DC:1;
		unsigned char P05DC:1;
		unsigned char :1;
		unsigned char :1;
	};
} __P0ADCRbits_t;
extern volatile __P0ADCRbits_t __at(P0ADCR_ADDR) P0ADCRbits;

#define P00DC     	P0ADCRbits.P00DC    	/* bit 0 */
#define P01DC     	P0ADCRbits.P01DC    	/* bit 1 */
#define P02DC     	P0ADCRbits.P02DC    	/* bit 2 */
#define P03DC     	P0ADCRbits.P03DC    	/* bit 3 */
#define P04DC     	P0ADCRbits.P04DC    	/* bit 4 */
#define P05DC     	P0ADCRbits.P05DC    	/* bit 5 */

// ----- P1ADCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P10DC:1;
		unsigned char P11DC:1;
		unsigned char P12DC:1;
		unsigned char P13DC:1;
		unsigned char P14DC:1;
		unsigned char P15DC:1;
		unsigned char P16DC:1;
		unsigned char P17DC:1;
	};
} __P1ADCRbits_t;
extern volatile __P1ADCRbits_t __at(P1ADCR_ADDR) P1ADCRbits;

#define P10DC     	P1ADCRbits.P10DC    	/* bit 0 */
#define P11DC     	P1ADCRbits.P11DC    	/* bit 1 */
#define P12DC     	P1ADCRbits.P12DC    	/* bit 2 */
#define P13DC     	P1ADCRbits.P13DC    	/* bit 3 */
#define P14DC     	P1ADCRbits.P14DC    	/* bit 4 */
#define P15DC     	P1ADCRbits.P15DC    	/* bit 5 */
#define P16DC     	P1ADCRbits.P16DC    	/* bit 6 */
#define P17DC     	P1ADCRbits.P17DC    	/* bit 7 */

// ----- P0KBCR Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char P00KE:1;
		unsigned char P01KE:1;
		unsigned char P02KE:1;
		unsigned char P03KE:1;
		unsigned char P04KE:1;
		unsigned char P05KE:1;
		unsigned char P06KE:1;
		unsigned char P07KE:1;
	};
} __P0KBCRbits_t;
extern volatile __P0KBCRbits_t __at(P0KBCR_ADDR) P0KBCRbits;

#define P00KE     	P0KBCRbits.P00KE    	/* bit 0 */
#define P01KE     	P0KBCRbits.P01KE    	/* bit 1 */
#define P02KE     	P0KBCRbits.P02KE    	/* bit 2 */
#define P03KE     	P0KBCRbits.P03KE    	/* bit 3 */
#define P04KE     	P0KBCRbits.P04KE    	/* bit 4 */
#define P05KE     	P0KBCRbits.P05KE    	/* bit 5 */
#define P06KE     	P0KBCRbits.P06KE    	/* bit 6 */
#define P07KE     	P0KBCRbits.P07KE    	/* bit 7 */

// ----- TKCR0 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char TKFS0:1;
		unsigned char TKFS1:1;
		unsigned char TKFS2:1;
		unsigned char TKFJE:1;
		unsigned char TKCFL0:1;
		unsigned char TKCFL1:1;
		unsigned char TKCON:1;
		unsigned char TKEN:1;
	};
} __TKCR0bits_t;
extern volatile __TKCR0bits_t __at(TKCR0_ADDR) TKCR0bits;

#define TKFS0     	TKCR0bits.TKFS0     	/* bit 0 */
#define TKFS1     	TKCR0bits.TKFS1     	/* bit 1 */
#define TKFS2     	TKCR0bits.TKFS2     	/* bit 2 */
#define TKFJE     	TKCR0bits.TKFJE     	/* bit 3 */
#define TKCFL0    	TKCR0bits.TKCFL0    	/* bit 4 */
#define TKCFL1    	TKCR0bits.TKCFL1    	/* bit 5 */
#define TKCON     	TKCR0bits.TKCON     	/* bit 6 */
#define TKEN      	TKCR0bits.TKEN      	/* bit 7 */

// ----- TKCR1 Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char TKCHS0:1;
		unsigned char TKCHS1:1;
		unsigned char TKCHS2:1;
		unsigned char :1;
		unsigned char :1;
		unsigned char :1;
		unsigned char TKIF:1;
		unsigned char TKIE:1;
	};
} __TKCR1bits_t;
extern volatile __TKCR1bits_t __at(TKCR1_ADDR) TKCR1bits;

#define TKCHS0    	TKCR1bits.TKCHS0    	/* bit 0 */
#define TKCHS1    	TKCR1bits.TKCHS1    	/* bit 1 */
#define TKCHS2    	TKCR1bits.TKCHS2    	/* bit 2 */
#define TKIF      	TKCR1bits.TKIF      	/* bit 6 */
#define TKIE      	TKCR1bits.TKIE      	/* bit 7 */

// ----- TKCNTH Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char TKCNT8:1;
		unsigned char TKCNT9:1;
		unsigned char TKCNT10:1;
		unsigned char TKCNT11:1;
		unsigned char TKCNT12:1;
		unsigned char TKCNT13:1;
		unsigned char TKCNT14:1;
		unsigned char TKCNT15:1;
	};
} __TKCNTHbits_t;
extern volatile __TKCNTHbits_t __at(TKCNTH_ADDR) TKCNTHbits;

#define TKCNT8    	TKCNTHbits.TKCNT8   	/* bit 0 */
#define TKCNT9    	TKCNTHbits.TKCNT9   	/* bit 1 */
#define TKCNT10   	TKCNTHbits.TKCNT10  	/* bit 2 */
#define TKCNT11   	TKCNTHbits.TKCNT11  	/* bit 3 */
#define TKCNT12   	TKCNTHbits.TKCNT12  	/* bit 4 */
#define TKCNT13   	TKCNTHbits.TKCNT13  	/* bit 5 */
#define TKCNT14   	TKCNTHbits.TKCNT14  	/* bit 6 */
#define TKCNT15   	TKCNTHbits.TKCNT15  	/* bit 7 */

// ----- TKCNTL Bits --------------------------------------------
typedef union {
	 struct {
		unsigned char TKCNT0:1;
		unsigned char TKCNT1:1;
		unsigned char TKCNT2:1;
		unsigned char TKCNT3:1;
		unsigned char TKCNT4:1;
		unsigned char TKCNT5:1;
		unsigned char TKCNT6:1;
		unsigned char TKCNT7:1;
	};
} __TKCNTLbits_t;
extern volatile __TKCNTLbits_t __at(TKCNTL_ADDR) TKCNTLbits;

#define TKCNT0    	TKCNTLbits.TKCNT0   	/* bit 0 */
#define TKCNT1    	TKCNTLbits.TKCNT1   	/* bit 1 */
#define TKCNT2    	TKCNTLbits.TKCNT2   	/* bit 2 */
#define TKCNT3    	TKCNTLbits.TKCNT3   	/* bit 3 */
#define TKCNT4    	TKCNTLbits.TKCNT4   	/* bit 4 */
#define TKCNT5    	TKCNTLbits.TKCNT5   	/* bit 5 */
#define TKCNT6    	TKCNTLbits.TKCNT6   	/* bit 6 */
#define TKCNT7    	TKCNTLbits.TKCNT7   	/* bit 7 */

#endif
