//
// Register Declarations for Microchip 16F1459 Processor
//
//
// This header file was automatically generated by:
//
//      inc2h.pl
//
//      Copyright (c) 2002, Kevin L. Pauba, All Rights Reserved
//
//      SDCC is licensed under the GNU Public license (GPL) v2.  Note that
//      this license covers the code to the compiler and other executables,
//      but explicitly does not cover any code or objects generated by sdcc.
//
//      For pic device libraries and header files which are derived from
//      Microchip header (.inc) and linker script (.lkr) files Microchip
//      requires that "The header files should state that they are only to be
//      used with authentic Microchip devices" which makes them incompatible
//      with the GPL. Pic device libraries and header files are located at
//      non-free/lib and non-free/include directories respectively.
//      Sdcc should be run with the --use-non-free command line option in
//      order to include non-free header files and libraries.
//
//      See http://sdcc.sourceforge.net/ for the latest information on sdcc.
//
//
#ifndef P16F1459_H
#define P16F1459_H

//
// Register addresses.
//
#define INDF0_ADDR      0x0000
#define INDF1_ADDR      0x0001
#define PCL_ADDR        0x0002
#define STATUS_ADDR     0x0003
#define FSR0_ADDR       0x0004
#define FSR0L_ADDR      0x0004
#define FSR0H_ADDR      0x0005
#define FSR1_ADDR       0x0006
#define FSR1L_ADDR      0x0006
#define FSR1H_ADDR      0x0007
#define BSR_ADDR        0x0008
#define WREG_ADDR       0x0009
#define PCLATH_ADDR     0x000A
#define INTCON_ADDR     0x000B
#define PORTA_ADDR      0x000C
#define PORTB_ADDR      0x000D
#define PORTC_ADDR      0x000E
#define PIR1_ADDR       0x0011
#define PIR2_ADDR       0x0012
#define TMR0_ADDR       0x0015
#define TMR1_ADDR       0x0016
#define TMR1L_ADDR      0x0016
#define TMR1H_ADDR      0x0017
#define T1CON_ADDR      0x0018
#define T1GCON_ADDR     0x0019
#define TMR2_ADDR       0x001A
#define PR2_ADDR        0x001B
#define T2CON_ADDR      0x001C
#define TRISA_ADDR      0x008C
#define TRISB_ADDR      0x008D
#define TRISC_ADDR      0x008E
#define PIE1_ADDR       0x0091
#define PIE2_ADDR       0x0092
#define OPTION_REG_ADDR 0x0095
#define PCON_ADDR       0x0096
#define WDTCON_ADDR     0x0097
#define OSCTUNE_ADDR    0x0098
#define OSCCON_ADDR     0x0099
#define OSCSTAT_ADDR    0x009A
#define ADRES_ADDR      0x009B
#define ADRESL_ADDR     0x009B
#define ADRESH_ADDR     0x009C
#define ADCON0_ADDR     0x009D
#define ADCON1_ADDR     0x009E
#define ADCON2_ADDR     0x009F
#define LATA_ADDR       0x010C
#define LATB_ADDR       0x010D
#define LATC_ADDR       0x010E
#define CM1CON0_ADDR    0x0111
#define CM1CON1_ADDR    0x0112
#define CM2CON0_ADDR    0x0113
#define CM2CON1_ADDR    0x0114
#define CMOUT_ADDR      0x0115
#define BORCON_ADDR     0x0116
#define FVRCON_ADDR     0x0117
#define DACCON0_ADDR    0x0118
#define DACCON1_ADDR    0x0119
#define APFCON_ADDR     0x011D
#define ANSELA_ADDR     0x018C
#define ANSELB_ADDR     0x018D
#define ANSELC_ADDR     0x018E
#define PMADR_ADDR      0x0191
#define PMADRL_ADDR     0x0191
#define PMADRH_ADDR     0x0192
#define PMDAT_ADDR      0x0193
#define PMDATL_ADDR     0x0193
#define PMDATH_ADDR     0x0194
#define PMCON1_ADDR     0x0195
#define PMCON2_ADDR     0x0196
#define VREGCON_ADDR    0x0197
#define RCREG_ADDR      0x0199
#define TXREG_ADDR      0x019A
#define SPBRGL_ADDR     0x019B
#define SPBRGH_ADDR     0x019C
#define RCSTA_ADDR      0x019D
#define TXSTA_ADDR      0x019E
#define BAUDCON_ADDR    0x019F
#define WPUA_ADDR       0x020C
#define WPUB_ADDR       0x020D
#define SSP1BUF_ADDR    0x0211
#define SSPBUF_ADDR     0x0211
#define SSP1ADD_ADDR    0x0212
#define SSPADD_ADDR     0x0212
#define SSP1MSK_ADDR    0x0213
#define SSPMSK_ADDR     0x0213
#define SSP1STAT_ADDR   0x0214
#define SSPSTAT_ADDR    0x0214
#define SSP1CON1_ADDR   0x0215
#define SSPCON_ADDR     0x0215
#define SSPCON1_ADDR    0x0215
#define SSP1CON2_ADDR   0x0216
#define SSPCON2_ADDR    0x0216
#define SSP1CON3_ADDR   0x0217
#define SSPCON3_ADDR    0x0217
#define IOCAP_ADDR      0x0391
#define IOCAN_ADDR      0x0392
#define IOCAF_ADDR      0x0393
#define IOCBP_ADDR      0x0394
#define IOCBN_ADDR      0x0395
#define IOCBF_ADDR      0x0396
#define CLKRCON_ADDR    0x039A
#define CRCON_ADDR      0x039B
#define PWM1DCL_ADDR    0x0611
#define PWM1DCH_ADDR    0x0612
#define PWM1CON_ADDR    0x0613
#define PWM1CON0_ADDR   0x0613
#define PWM2DCL_ADDR    0x0614
#define PWM2DCH_ADDR    0x0615
#define PWM2CON_ADDR    0x0616
#define PWM2CON0_ADDR   0x0616
#define CWG1DBR_ADDR    0x0691
#define CWG1DBF_ADDR    0x0692
#define CWG1CON0_ADDR   0x0693
#define CWG1CON1_ADDR   0x0694
#define CWG1CON2_ADDR   0x0695
#define CRRC_ADDR       0x0E10
#define TST_CRRCL_ADDR  0x0E10
#define TST_CRRCH_ADDR  0x0E11
#define TST_CRLT_ADDR   0x0E12
#define UCON_ADDR       0x0E8E
#define UIR_ADDR        0x0E8F
#define USTAT_ADDR      0x0E90
#define UCFG_ADDR       0x0E91
#define UIE_ADDR        0x0E92
#define UEIR_ADDR       0x0E93
#define UFRM_ADDR       0x0E94
#define UFRMH_ADDR      0x0E94
#define UFRML_ADDR      0x0E95
#define UADDR_ADDR      0x0E96
#define UEIE_ADDR       0x0E97
#define UEP7_ADDR       0x0E98
#define UEP6_ADDR       0x0E99
#define UEP5_ADDR       0x0E9A
#define UEP4_ADDR       0x0E9B
#define UEP3_ADDR       0x0E9C
#define UEP2_ADDR       0x0E9D
#define UEP1_ADDR       0x0E9E
#define UEP0_ADDR       0x0E9F
#define ICDIO_ADDR      0x0F8C
#define ICDCON0_ADDR    0x0F8D
#define ICDSTAT_ADDR    0x0F91
#define DEVSEL_ADDR     0x0F95
#define ICDINSTL_ADDR   0x0F96
#define ICDINSTH_ADDR   0x0F97
#define ICDBK0CON_ADDR  0x0F9C
#define ICDBK0L_ADDR    0x0F9D
#define ICDBK0H_ADDR    0x0F9E
#define BSRICDSHAD_ADDR 0x0FE3
#define STATUS_SHAD_ADDR        0x0FE4
#define WREG_SHAD_ADDR  0x0FE5
#define BSR_SHAD_ADDR   0x0FE6
#define PCLATH_SHAD_ADDR        0x0FE7
#define FSR0L_SHAD_ADDR 0x0FE8
#define FSR0H_SHAD_ADDR 0x0FE9
#define FSR1L_SHAD_ADDR 0x0FEA
#define FSR1H_SHAD_ADDR 0x0FEB
#define STKPTR_ADDR     0x0FED
#define TOSL_ADDR       0x0FEE
#define TOSH_ADDR       0x0FEF

//
// Memory organization.
//



//         LIST

//==========================================================================
//  MPASM PIC16F1459 processor include
//
//  (c) Copyright 1999-2011 Microchip Technology, All rights reserved
//==========================================================================

//         NOLIST

//==========================================================================
//  This header file defines configurations, registers, and other useful
//  bits of information for the PIC16F1459 microcontroller.  These names
//  are taken to match the data sheets as closely as possible.
//
//  Note that the processor must be selected before this file is included.
//  The processor may be selected the following ways:
//
//       1. Command line switch:
//               C:\MPASM MYFILE.ASM /PIC16F1459
//       2. LIST directive in the source file
//               LIST   P=PIC16F1459
//       3. Processor Type entry in the MPASM full-screen interface
//       4. Setting the processor in the MPLAB Project Dialog
//==========================================================================

//==========================================================================
//
//       Verify Processor
//
//==========================================================================
//        IFNDEF __16F1459
//            MESSG "Processor-header file mismatch.  Verify selected processor."
//         ENDIF



//==========================================================================
//
//       Register Definitions
//
//==========================================================================

#define W                    0x0000
#define F                    0x0001

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

//-----Bank0------------------
extern __sfr  __at (INDF0_ADDR)                   INDF0;
extern __sfr  __at (INDF1_ADDR)                   INDF1;
extern __sfr  __at (PCL_ADDR)                     PCL;
extern __sfr  __at (STATUS_ADDR)                  STATUS;
extern __sfr  __at (FSR0_ADDR)                    FSR0;
extern __sfr  __at (FSR0L_ADDR)                   FSR0L;
extern __sfr  __at (FSR0H_ADDR)                   FSR0H;
extern __sfr  __at (FSR1_ADDR)                    FSR1;
extern __sfr  __at (FSR1L_ADDR)                   FSR1L;
extern __sfr  __at (FSR1H_ADDR)                   FSR1H;
extern __sfr  __at (BSR_ADDR)                     BSR;
extern __sfr  __at (WREG_ADDR)                    WREG;
extern __sfr  __at (PCLATH_ADDR)                  PCLATH;
extern __sfr  __at (INTCON_ADDR)                  INTCON;
extern __sfr  __at (PORTA_ADDR)                   PORTA;
extern __sfr  __at (PORTB_ADDR)                   PORTB;
extern __sfr  __at (PORTC_ADDR)                   PORTC;
extern __sfr  __at (PIR1_ADDR)                    PIR1;
extern __sfr  __at (PIR2_ADDR)                    PIR2;
extern __sfr  __at (TMR0_ADDR)                    TMR0;
extern __sfr  __at (TMR1_ADDR)                    TMR1;
extern __sfr  __at (TMR1L_ADDR)                   TMR1L;
extern __sfr  __at (TMR1H_ADDR)                   TMR1H;
extern __sfr  __at (T1CON_ADDR)                   T1CON;
extern __sfr  __at (T1GCON_ADDR)                  T1GCON;
extern __sfr  __at (TMR2_ADDR)                    TMR2;
extern __sfr  __at (PR2_ADDR)                     PR2;
extern __sfr  __at (T2CON_ADDR)                   T2CON;

//-----Bank1------------------
extern __sfr  __at (TRISA_ADDR)                   TRISA;
extern __sfr  __at (TRISB_ADDR)                   TRISB;
extern __sfr  __at (TRISC_ADDR)                   TRISC;
extern __sfr  __at (PIE1_ADDR)                    PIE1;
extern __sfr  __at (PIE2_ADDR)                    PIE2;
extern __sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
extern __sfr  __at (PCON_ADDR)                    PCON;
extern __sfr  __at (WDTCON_ADDR)                  WDTCON;
extern __sfr  __at (OSCTUNE_ADDR)                 OSCTUNE;
extern __sfr  __at (OSCCON_ADDR)                  OSCCON;
extern __sfr  __at (OSCSTAT_ADDR)                 OSCSTAT;
extern __sfr  __at (ADRES_ADDR)                   ADRES;
extern __sfr  __at (ADRESL_ADDR)                  ADRESL;
extern __sfr  __at (ADRESH_ADDR)                  ADRESH;
extern __sfr  __at (ADCON0_ADDR)                  ADCON0;
extern __sfr  __at (ADCON1_ADDR)                  ADCON1;
extern __sfr  __at (ADCON2_ADDR)                  ADCON2;

//-----Bank2------------------
extern __sfr  __at (LATA_ADDR)                    LATA;
extern __sfr  __at (LATB_ADDR)                    LATB;
extern __sfr  __at (LATC_ADDR)                    LATC;
extern __sfr  __at (CM1CON0_ADDR)                 CM1CON0;
extern __sfr  __at (CM1CON1_ADDR)                 CM1CON1;
extern __sfr  __at (CM2CON0_ADDR)                 CM2CON0;
extern __sfr  __at (CM2CON1_ADDR)                 CM2CON1;
extern __sfr  __at (CMOUT_ADDR)                   CMOUT;
extern __sfr  __at (BORCON_ADDR)                  BORCON;
extern __sfr  __at (FVRCON_ADDR)                  FVRCON;
extern __sfr  __at (DACCON0_ADDR)                 DACCON0;
extern __sfr  __at (DACCON1_ADDR)                 DACCON1;
extern __sfr  __at (APFCON_ADDR)                  APFCON;

//-----Bank3------------------
extern __sfr  __at (ANSELA_ADDR)                  ANSELA;
extern __sfr  __at (ANSELB_ADDR)                  ANSELB;
extern __sfr  __at (ANSELC_ADDR)                  ANSELC;
extern __sfr  __at (PMADR_ADDR)                   PMADR;
extern __sfr  __at (PMADRL_ADDR)                  PMADRL;
extern __sfr  __at (PMADRH_ADDR)                  PMADRH;
extern __sfr  __at (PMDAT_ADDR)                   PMDAT;
extern __sfr  __at (PMDATL_ADDR)                  PMDATL;
extern __sfr  __at (PMDATH_ADDR)                  PMDATH;
extern __sfr  __at (PMCON1_ADDR)                  PMCON1;
extern __sfr  __at (PMCON2_ADDR)                  PMCON2;
extern __sfr  __at (VREGCON_ADDR)                 VREGCON;
extern __sfr  __at (RCREG_ADDR)                   RCREG;
extern __sfr  __at (TXREG_ADDR)                   TXREG;
extern __sfr  __at (SPBRGL_ADDR)                  SPBRGL;
extern __sfr  __at (SPBRGH_ADDR)                  SPBRGH;
extern __sfr  __at (RCSTA_ADDR)                   RCSTA;
extern __sfr  __at (TXSTA_ADDR)                   TXSTA;
extern __sfr  __at (BAUDCON_ADDR)                 BAUDCON;

//-----Bank4------------------
extern __sfr  __at (WPUA_ADDR)                    WPUA;
extern __sfr  __at (WPUB_ADDR)                    WPUB;
extern __sfr  __at (SSP1BUF_ADDR)                 SSP1BUF;
extern __sfr  __at (SSPBUF_ADDR)                  SSPBUF;
extern __sfr  __at (SSP1ADD_ADDR)                 SSP1ADD;
extern __sfr  __at (SSPADD_ADDR)                  SSPADD;
extern __sfr  __at (SSP1MSK_ADDR)                 SSP1MSK;
extern __sfr  __at (SSPMSK_ADDR)                  SSPMSK;
extern __sfr  __at (SSP1STAT_ADDR)                SSP1STAT;
extern __sfr  __at (SSPSTAT_ADDR)                 SSPSTAT;
extern __sfr  __at (SSP1CON1_ADDR)                SSP1CON1;
extern __sfr  __at (SSPCON_ADDR)                  SSPCON;
extern __sfr  __at (SSPCON1_ADDR)                 SSPCON1;
extern __sfr  __at (SSP1CON2_ADDR)                SSP1CON2;
extern __sfr  __at (SSPCON2_ADDR)                 SSPCON2;
extern __sfr  __at (SSP1CON3_ADDR)                SSP1CON3;
extern __sfr  __at (SSPCON3_ADDR)                 SSPCON3;

//-----Bank7------------------
extern __sfr  __at (IOCAP_ADDR)                   IOCAP;
extern __sfr  __at (IOCAN_ADDR)                   IOCAN;
extern __sfr  __at (IOCAF_ADDR)                   IOCAF;
extern __sfr  __at (IOCBP_ADDR)                   IOCBP;
extern __sfr  __at (IOCBN_ADDR)                   IOCBN;
extern __sfr  __at (IOCBF_ADDR)                   IOCBF;
extern __sfr  __at (CLKRCON_ADDR)                 CLKRCON;
extern __sfr  __at (CRCON_ADDR)                   CRCON;

//-----Bank12------------------
extern __sfr  __at (PWM1DCL_ADDR)                 PWM1DCL;
extern __sfr  __at (PWM1DCH_ADDR)                 PWM1DCH;
extern __sfr  __at (PWM1CON_ADDR)                 PWM1CON;
extern __sfr  __at (PWM1CON0_ADDR)                PWM1CON0;
extern __sfr  __at (PWM2DCL_ADDR)                 PWM2DCL;
extern __sfr  __at (PWM2DCH_ADDR)                 PWM2DCH;
extern __sfr  __at (PWM2CON_ADDR)                 PWM2CON;
extern __sfr  __at (PWM2CON0_ADDR)                PWM2CON0;

//-----Bank13------------------
extern __sfr  __at (CWG1DBR_ADDR)                 CWG1DBR;
extern __sfr  __at (CWG1DBF_ADDR)                 CWG1DBF;
extern __sfr  __at (CWG1CON0_ADDR)                CWG1CON0;
extern __sfr  __at (CWG1CON1_ADDR)                CWG1CON1;
extern __sfr  __at (CWG1CON2_ADDR)                CWG1CON2;

//-----Bank28------------------
extern __sfr  __at (CRRC_ADDR)                    CRRC;
extern __sfr  __at (TST_CRRCL_ADDR)               TST_CRRCL;
extern __sfr  __at (TST_CRRCH_ADDR)               TST_CRRCH;
extern __sfr  __at (TST_CRLT_ADDR)                TST_CRLT;

//-----Bank29------------------
extern __sfr  __at (UCON_ADDR)                    UCON;
extern __sfr  __at (UIR_ADDR)                     UIR;
extern __sfr  __at (USTAT_ADDR)                   USTAT;
extern __sfr  __at (UCFG_ADDR)                    UCFG;
extern __sfr  __at (UIE_ADDR)                     UIE;
extern __sfr  __at (UEIR_ADDR)                    UEIR;
extern __sfr  __at (UFRM_ADDR)                    UFRM;
extern __sfr  __at (UFRMH_ADDR)                   UFRMH;
extern __sfr  __at (UFRML_ADDR)                   UFRML;
extern __sfr  __at (UADDR_ADDR)                   UADDR;
extern __sfr  __at (UEIE_ADDR)                    UEIE;
extern __sfr  __at (UEP7_ADDR)                    UEP7;
extern __sfr  __at (UEP6_ADDR)                    UEP6;
extern __sfr  __at (UEP5_ADDR)                    UEP5;
extern __sfr  __at (UEP4_ADDR)                    UEP4;
extern __sfr  __at (UEP3_ADDR)                    UEP3;
extern __sfr  __at (UEP2_ADDR)                    UEP2;
extern __sfr  __at (UEP1_ADDR)                    UEP1;
extern __sfr  __at (UEP0_ADDR)                    UEP0;

//-----Bank31------------------
extern __sfr  __at (ICDIO_ADDR)                   ICDIO;
extern __sfr  __at (ICDCON0_ADDR)                 ICDCON0;
extern __sfr  __at (ICDSTAT_ADDR)                 ICDSTAT;
extern __sfr  __at (DEVSEL_ADDR)                  DEVSEL;
extern __sfr  __at (ICDINSTL_ADDR)                ICDINSTL;
extern __sfr  __at (ICDINSTH_ADDR)                ICDINSTH;
extern __sfr  __at (ICDBK0CON_ADDR)               ICDBK0CON;
extern __sfr  __at (ICDBK0L_ADDR)                 ICDBK0L;
extern __sfr  __at (ICDBK0H_ADDR)                 ICDBK0H;
extern __sfr  __at (BSRICDSHAD_ADDR)              BSRICDSHAD;
extern __sfr  __at (STATUS_SHAD_ADDR)             STATUS_SHAD;
extern __sfr  __at (WREG_SHAD_ADDR)               WREG_SHAD;
extern __sfr  __at (BSR_SHAD_ADDR)                BSR_SHAD;
extern __sfr  __at (PCLATH_SHAD_ADDR)             PCLATH_SHAD;
extern __sfr  __at (FSR0L_SHAD_ADDR)              FSR0L_SHAD;
extern __sfr  __at (FSR0H_SHAD_ADDR)              FSR0H_SHAD;
extern __sfr  __at (FSR1L_SHAD_ADDR)              FSR1L_SHAD;
extern __sfr  __at (FSR1H_SHAD_ADDR)              FSR1H_SHAD;
extern __sfr  __at (STKPTR_ADDR)                  STKPTR;
extern __sfr  __at (TOSL_ADDR)                    TOSL;
extern __sfr  __at (TOSH_ADDR)                    TOSH;

//----- STATUS Bits -----------------------------------------------------


//----- BSR Bits -----------------------------------------------------


//----- INTCON Bits -----------------------------------------------------



//----- PORTA Bits -----------------------------------------------------


//----- PORTB Bits -----------------------------------------------------


//----- PORTC Bits -----------------------------------------------------


//----- PIR1 Bits -----------------------------------------------------


//----- PIR2 Bits -----------------------------------------------------


//----- T1CON Bits -----------------------------------------------------



//----- T1GCON Bits -----------------------------------------------------



//----- T2CON Bits -----------------------------------------------------



//----- TRISA Bits -----------------------------------------------------


//----- TRISB Bits -----------------------------------------------------


//----- TRISC Bits -----------------------------------------------------


//----- PIE1 Bits -----------------------------------------------------


//----- PIE2 Bits -----------------------------------------------------


//----- OPTION_REG Bits -----------------------------------------------------



//----- PCON Bits -----------------------------------------------------


//----- WDTCON Bits -----------------------------------------------------



//----- OSCTUNE Bits -----------------------------------------------------


//----- OSCCON Bits -----------------------------------------------------


//----- OSCSTAT Bits -----------------------------------------------------


//----- ADCON0 Bits -----------------------------------------------------




//----- ADCON1 Bits -----------------------------------------------------



//----- ADCON2 Bits -----------------------------------------------------


//----- LATA Bits -----------------------------------------------------


//----- LATB Bits -----------------------------------------------------


//----- LATC Bits -----------------------------------------------------


//----- CM1CON0 Bits -----------------------------------------------------


//----- CM1CON1 Bits -----------------------------------------------------



//----- CM2CON0 Bits -----------------------------------------------------


//----- CM2CON1 Bits -----------------------------------------------------



//----- CMOUT Bits -----------------------------------------------------


//----- BORCON Bits -----------------------------------------------------


//----- FVRCON Bits -----------------------------------------------------



//----- DACCON0 Bits -----------------------------------------------------



//----- DACCON1 Bits -----------------------------------------------------


//----- APFCON Bits -----------------------------------------------------


//----- ANSELA Bits -----------------------------------------------------



//----- ANSELB Bits -----------------------------------------------------



//----- ANSELC Bits -----------------------------------------------------



//----- PMCON1 Bits -----------------------------------------------------


//----- VREGCON Bits -----------------------------------------------------


//----- RCSTA Bits -----------------------------------------------------


//----- TXSTA Bits -----------------------------------------------------


//----- BAUDCON Bits -----------------------------------------------------


//----- WPUA Bits -----------------------------------------------------



//----- WPUB Bits -----------------------------------------------------



//----- SSP1STAT Bits -----------------------------------------------------


//----- SSPSTAT Bits -----------------------------------------------------


//----- SSP1CON1 Bits -----------------------------------------------------



//----- SSPCON Bits -----------------------------------------------------



//----- SSPCON1 Bits -----------------------------------------------------



//----- SSP1CON2 Bits -----------------------------------------------------


//----- SSPCON2 Bits -----------------------------------------------------


//----- SSP1CON3 Bits -----------------------------------------------------


//----- SSPCON3 Bits -----------------------------------------------------


//----- IOCAP Bits -----------------------------------------------------



//----- IOCAN Bits -----------------------------------------------------



//----- IOCAF Bits -----------------------------------------------------



//----- IOCBP Bits -----------------------------------------------------



//----- IOCBN Bits -----------------------------------------------------



//----- IOCBF Bits -----------------------------------------------------



//----- CLKRCON Bits -----------------------------------------------------



//----- CRCON Bits -----------------------------------------------------


//----- PWM1DCL Bits -----------------------------------------------------


//----- PWM1DCH Bits -----------------------------------------------------


//----- PWM1CON Bits -----------------------------------------------------


//----- PWM1CON0 Bits -----------------------------------------------------


//----- PWM2DCL Bits -----------------------------------------------------


//----- PWM2DCH Bits -----------------------------------------------------


//----- PWM2CON Bits -----------------------------------------------------


//----- PWM2CON0 Bits -----------------------------------------------------


//----- CWG1DBR Bits -----------------------------------------------------


//----- CWG1DBF Bits -----------------------------------------------------


//----- CWG1CON0 Bits -----------------------------------------------------



//----- CWG1CON1 Bits -----------------------------------------------------



//----- CWG1CON2 Bits -----------------------------------------------------


//----- UCON Bits -----------------------------------------------------


//----- UIR Bits -----------------------------------------------------


//----- USTAT Bits -----------------------------------------------------


//----- UCFG Bits -----------------------------------------------------



//----- UIE Bits -----------------------------------------------------


//----- UEIR Bits -----------------------------------------------------


//----- UFRMH Bits -----------------------------------------------------


//----- UFRML Bits -----------------------------------------------------


//----- UADDR Bits -----------------------------------------------------


//----- UEIE Bits -----------------------------------------------------


//----- UEP7 Bits -----------------------------------------------------


//----- UEP6 Bits -----------------------------------------------------


//----- UEP5 Bits -----------------------------------------------------


//----- UEP4 Bits -----------------------------------------------------


//----- UEP3 Bits -----------------------------------------------------


//----- UEP2 Bits -----------------------------------------------------


//----- UEP1 Bits -----------------------------------------------------


//----- UEP0 Bits -----------------------------------------------------


//----- ICDIO Bits -----------------------------------------------------


//----- ICDCON0 Bits -----------------------------------------------------


//----- ICDSTAT Bits -----------------------------------------------------


//----- DEVSEL Bits -----------------------------------------------------


//----- ICDINSTL Bits -----------------------------------------------------


//----- ICDINSTH Bits -----------------------------------------------------


//----- ICDBK0CON Bits -----------------------------------------------------


//----- ICDBK0L Bits -----------------------------------------------------


//----- ICDBK0H Bits -----------------------------------------------------


//----- STATUS_SHAD Bits -----------------------------------------------------



//==========================================================================
//
//       RAM Definitions
//
//==========================================================================
//        __MAXRAM  H'0FFF'
//        __BADRAM  H'000F'
//        __BADRAM  H'0010'
//        __BADRAM  H'0013'-H'0014'
//        __BADRAM  H'001D'-H'001E'
//        __BADRAM  H'001F'
//        __BADRAM  H'008F'
//        __BADRAM  H'0090'
//        __BADRAM  H'0093'-H'0094'
//        __BADRAM  H'010F'-H'0110'
//        __BADRAM  H'011A'-H'011C'
//        __BADRAM  H'011E'-H'011F'
//        __BADRAM  H'018F'-H'0190'
//        __BADRAM  H'0198'
//        __BADRAM  H'020E'-H'0210'
//        __BADRAM  H'0218'-H'021F'
//        __BADRAM  H'028C'-H'029F'
//        __BADRAM  H'030C'-H'031F'
//        __BADRAM  H'038C'-H'0390'
//        __BADRAM  H'0397'-H'0399'
//        __BADRAM  H'039C'-H'039F'
//        __BADRAM  H'040C'-H'041F'
//        __BADRAM  H'048C'-H'0497'
//        __BADRAM  H'0498'-H'049F'
//        __BADRAM  H'050C'-H'051F'
//        __BADRAM  H'058C'-H'059F'
//        __BADRAM  H'060C'-H'0610'
//        __BADRAM  H'0617'-H'061F'
//        __BADRAM  H'0650'-H'066F'
//        __BADRAM  H'068C'-H'0690'
//        __BADRAM  H'0696'-H'069F'
//        __BADRAM  H'06A0'-H'06EF'
//        __BADRAM  H'070C'-H'071F'
//        __BADRAM  H'0720'-H'076F'
//        __BADRAM  H'078C'-H'079F'
//        __BADRAM  H'07A0'-H'07EF'
//        __BADRAM  H'080C'-H'081F'
//        __BADRAM  H'0820'-H'086F'
//        __BADRAM  H'088C'-H'089F'
//        __BADRAM  H'08A0'-H'08EF'
//        __BADRAM  H'090C'-H'091F'
//        __BADRAM  H'0920'-H'096F'
//        __BADRAM  H'098C'-H'099F'
//        __BADRAM  H'09A0'-H'09EF'
//        __BADRAM  H'0A0C'-H'0A1F'
//        __BADRAM  H'0A20'-H'0A6F'
//        __BADRAM  H'0A8C'-H'0A9F'
//        __BADRAM  H'0AA0'-H'0AEF'
//        __BADRAM  H'0B0C'-H'0B1F'
//        __BADRAM  H'0B20'-H'0B6F'
//        __BADRAM  H'0B8C'-H'0B9F'
//        __BADRAM  H'0BA0'-H'0BEF'
//        __BADRAM  H'0C0C'-H'0C1F'
//        __BADRAM  H'0C20'-H'0C6F'
//        __BADRAM  H'0C8C'-H'0C9F'
//        __BADRAM  H'0CA0'-H'0CEF'
//        __BADRAM  H'0D0C'-H'0D1F'
//        __BADRAM  H'0D20'-H'0D6F'
//        __BADRAM  H'0D8C'-H'0D9F'
//        __BADRAM  H'0DA0'-H'0DEF'
//        __BADRAM  H'0E0C'-H'0E0F'
//        __BADRAM  H'0E13'-H'0E1F'
//        __BADRAM  H'0E20'-H'0E6F'
//        __BADRAM  H'0E8C'-H'0E8D'
//        __BADRAM  H'0EA0'-H'0EEF'
//        __BADRAM  H'0F0C'-H'0F0E'
//        __BADRAM  H'0F0F'-H'0F6F'
//        __BADRAM  H'0F8E'-H'0F90'
//        __BADRAM  H'0F92'-H'0F94'
//        __BADRAM  H'0F98'-H'0F9B'
//        __BADRAM  H'0F9F'
//        __BADRAM  H'0FA0'-H'0FBF'
//        __BADRAM  H'0FC0'-H'0FCF'
//        __BADRAM  H'0FD0'-H'0FE2'
//        __BADRAM  H'0FEC'

//==========================================================================
//
//       Configuration Bits
//
//   NAME            Address
//   CONFIG1           8007h
//   CONFIG2           8008h
//
//==========================================================================

// The following is an assignment of address values for all of the
// configuration registers for the purpose of table reads
#define _CONFIG1             0x8007
#define _CONFIG2             0x8008

//----- CONFIG1 Options --------------------------------------------------
#define _FOSC_LP             0xFFF8    // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins
#define _FOSC_XT             0xFFF9    // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins
#define _FOSC_HS             0xFFFA    // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins
#define _FOSC_EXTRC          0xFFFB    // EXTRC oscillator: External RC circuit connected to CLKIN pin
#define _FOSC_INTOSC         0xFFFC    // INTOSC oscillator: I/O function on CLKIN pin
#define _FOSC_ECL            0xFFFD    // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pins
#define _FOSC_ECM            0xFFFE    // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pins
#define _FOSC_ECH            0xFFFF    // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pins

#define _WDTE_OFF            0xFFE7    // WDT disabled
#define _WDTE_SWDTEN         0xFFEF    // WDT controlled by the SWDTEN bit in the WDTCON register
#define _WDTE_NSLEEP         0xFFF7    // WDT enabled while running and disabled in Sleep
#define _WDTE_ON             0xFFFF    // WDT enabled

#define _PWRTE_ON            0xFFDF    // PWRT enabled
#define _PWRTE_OFF           0xFFFF    // PWRT disabled

#define _MCLRE_OFF           0xFFBF    // MCLR/VPP pin function is digital input
#define _MCLRE_ON            0xFFFF    // MCLR/VPP pin function is MCLR

#define _CP_ON               0xFF7F    // Program memory code protection is enabled
#define _CP_OFF              0xFFFF    // Program memory code protection is disabled

#define _BOREN_OFF           0xF9FF    // Brown-out Reset disabled
#define _BOREN_SBODEN        0xFBFF    // Brown-out Reset controlled by the SBOREN bit in the BORCON register
#define _BOREN_NSLEEP        0xFDFF    // Brown-out Reset enabled while running and disabled in Sleep
#define _BOREN_ON            0xFFFF    // Brown-out Reset enabled

#define _CLKOUTEN_ON         0xF7FF    // CLKOUT function is enabled on the CLKOUT pin
#define _CLKOUTEN_OFF        0xFFFF    // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin

#define _IESO_OFF            0xEFFF    // Internal/External Switchover Mode is disabled
#define _IESO_ON             0xFFFF    // Internal/External Switchover Mode is enabled

#define _FCMEN_OFF           0xDFFF    // Fail-Safe Clock Monitor is disabled
#define _FCMEN_ON            0xFFFF    // Fail-Safe Clock Monitor is enabled

//----- CONFIG2 Options --------------------------------------------------
#define _WRT_ALL             0xFFFC    // 000h to 1FFFh write protected, no addresses may be modified by PMCON control
#define _WRT_HALF            0xFFFD    // 000h to 0FFFh write protected, 1000h to 1FFFh may be modified by PMCON control
#define _WRT_BOOT            0xFFFE    // 000h to 1FFh write protected, 200h to 1FFFh may be modified by PMCON control
#define _WRT_OFF             0xFFFF    // Write protection off

#define _CPUDIV_NOCLKDIV     0xFFCF    // NO CPU system divide
#define _CPUDIV_CLKDIV2      0xFFDF    // CPU system clock divided by 2
#define _CPUDIV_CLKDIV3      0xFFEF    // CPU system clock divided by 3
#define _CPUDIV_CLKDIV6      0xFFFF    // CPU system clock divided by 6

#define _USBLSCLK_24MHz      0xFFBF    // System clock expects 24 MHz, FS/LS USB CLKENs divide-by is set to 4.
#define _USBLSCLK_48MHz      0xFFFF    // System clock expects 48 MHz, FS/LS USB CLKENs divide-by is set to 8.

#define _PLLMULT_4x          0xFF7F    // 4x Output Frequency Selected
#define _PLLMULT_3x          0xFFFF    // 3x Output Frequency Selected

#define _PLLEN_DISABLED      0xFEFF    // 3x or 4x PLL Disabled
#define _PLLEN_ENABLED       0xFFFF    // 3x or 4x PLL Enabled

#define _STVREN_OFF          0xFDFF    // Stack Overflow or Underflow will not cause a Reset
#define _STVREN_ON           0xFFFF    // Stack Overflow or Underflow will cause a Reset

#define _BORV_HI             0xFBFF    // Brown-out Reset Voltage (VBOR) set to 2.7V
#define _BORV_LO             0xFFFF    // Brown-out Reset Voltage (VBOR) set to 2.4V

#define _LPBOR_ON            0xF7FF    // Low-Power BOR is enabled
#define _LPBOR_OFF           0xFFFF    // Low-Power BOR is disabled

#define _LVP_OFF             0xDFFF    // High-voltage on MCLR/VPP must be used for programming
#define _LVP_ON              0xFFFF    // Low-voltage programming enabled

//----- DEVID Equates --------------------------------------------------
#define _DEVID1              0x8006

//----- IDLOC Equates --------------------------------------------------
#define _IDLOC0              0x8000
#define _IDLOC1              0x8001
#define _IDLOC2              0x8002
#define _IDLOC3              0x8003

//         LIST

// ----- ADCON0 bits --------------------
typedef union {
  struct {
    unsigned char ADON:1;
    unsigned char GO_NOT_DONE:1;
    unsigned char CHS0:1;
    unsigned char CHS1:1;
    unsigned char CHS2:1;
    unsigned char CHS3:1;
    unsigned char CHS4:1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char ADGO:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char GO:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __ADCON0bits_t;
extern volatile __ADCON0bits_t __at(ADCON0_ADDR) ADCON0bits;

// ----- ADCON1 bits --------------------
typedef union {
  struct {
    unsigned char ADPREF0:1;
    unsigned char ADPREF1:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char ADFM:1;
  };
} __ADCON1bits_t;
extern volatile __ADCON1bits_t __at(ADCON1_ADDR) ADCON1bits;

// ----- ADCON2 bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char TRIGSEL0:1;
    unsigned char TRIGSEL1:1;
    unsigned char TRIGSEL2:1;
    unsigned char :1;
  };
} __ADCON2bits_t;
extern volatile __ADCON2bits_t __at(ADCON2_ADDR) ADCON2bits;

// ----- ANSELA bits --------------------
typedef union {
  struct {
    unsigned char ANSA0:1;
    unsigned char ANSA1:1;
    unsigned char ANSA2:1;
    unsigned char :1;
    unsigned char ANSA4:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __ANSELAbits_t;
extern volatile __ANSELAbits_t __at(ANSELA_ADDR) ANSELAbits;

// ----- ANSELB bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char ANSB4:1;
    unsigned char ANSB5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __ANSELBbits_t;
extern volatile __ANSELBbits_t __at(ANSELB_ADDR) ANSELBbits;

// ----- ANSELC bits --------------------
typedef union {
  struct {
    unsigned char ANSC0:1;
    unsigned char ANSC1:1;
    unsigned char ANSC2:1;
    unsigned char ANSC3:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char ANSC6:1;
    unsigned char ANSC7:1;
  };
} __ANSELCbits_t;
extern volatile __ANSELCbits_t __at(ANSELC_ADDR) ANSELCbits;

// ----- APFCON bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char T1GSEL:1;
    unsigned char :1;
    unsigned char SSSEL:1;
    unsigned char :1;
    unsigned char CLKRSEL:1;
  };
} __APFCONbits_t;
extern volatile __APFCONbits_t __at(APFCON_ADDR) APFCONbits;

// ----- BAUDCON bits --------------------
typedef union {
  struct {
    unsigned char ABDEN:1;
    unsigned char WUE:1;
    unsigned char :1;
    unsigned char BRG16:1;
    unsigned char SCKP:1;
    unsigned char :1;
    unsigned char RCIDL:1;
    unsigned char ABDOVF:1;
  };
} __BAUDCONbits_t;
extern volatile __BAUDCONbits_t __at(BAUDCON_ADDR) BAUDCONbits;

// ----- BORCON bits --------------------
typedef union {
  struct {
    unsigned char BORRDY:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char BORFS:1;
    unsigned char SBOREN:1;
  };
} __BORCONbits_t;
extern volatile __BORCONbits_t __at(BORCON_ADDR) BORCONbits;

// ----- BSR bits --------------------
typedef union {
  struct {
    unsigned char BSR0:1;
    unsigned char BSR1:1;
    unsigned char BSR2:1;
    unsigned char BSR3:1;
    unsigned char BSR4:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __BSRbits_t;
extern volatile __BSRbits_t __at(BSR_ADDR) BSRbits;

// ----- CLKRCON bits --------------------
typedef union {
  struct {
    unsigned char CLKRDIV0:1;
    unsigned char CLKRDIV1:1;
    unsigned char CLKRDIV2:1;
    unsigned char CLKRCD0:1;
    unsigned char CLKRCD1:1;
    unsigned char CLKRSLR:1;
    unsigned char CLKROE:1;
    unsigned char CLKREN:1;
  };
} __CLKRCONbits_t;
extern volatile __CLKRCONbits_t __at(CLKRCON_ADDR) CLKRCONbits;

// ----- CM1CON0 bits --------------------
typedef union {
  struct {
    unsigned char C1SYNC:1;
    unsigned char C1HYS:1;
    unsigned char C1SP:1;
    unsigned char :1;
    unsigned char C1POL:1;
    unsigned char C1OE:1;
    unsigned char C1OUT:1;
    unsigned char C1ON:1;
  };
} __CM1CON0bits_t;
extern volatile __CM1CON0bits_t __at(CM1CON0_ADDR) CM1CON0bits;

// ----- CM1CON1 bits --------------------
typedef union {
  struct {
    unsigned char C1NCH0:1;
    unsigned char C1NCH1:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char C1PCH0:1;
    unsigned char C1PCH1:1;
    unsigned char C1INTN:1;
    unsigned char C1INTP:1;
  };
} __CM1CON1bits_t;
extern volatile __CM1CON1bits_t __at(CM1CON1_ADDR) CM1CON1bits;

// ----- CM2CON0 bits --------------------
typedef union {
  struct {
    unsigned char C2SYNC:1;
    unsigned char C2HYS:1;
    unsigned char C2SP:1;
    unsigned char :1;
    unsigned char C2POL:1;
    unsigned char C2OE:1;
    unsigned char C2OUT:1;
    unsigned char C2ON:1;
  };
} __CM2CON0bits_t;
extern volatile __CM2CON0bits_t __at(CM2CON0_ADDR) CM2CON0bits;

// ----- CM2CON1 bits --------------------
typedef union {
  struct {
    unsigned char C2NCH0:1;
    unsigned char C2NCH1:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char C2PCH0:1;
    unsigned char C2PCH1:1;
    unsigned char C2INTN:1;
    unsigned char C2INTP:1;
  };
} __CM2CON1bits_t;
extern volatile __CM2CON1bits_t __at(CM2CON1_ADDR) CM2CON1bits;

// ----- CMOUT bits --------------------
typedef union {
  struct {
    unsigned char MC1OUT:1;
    unsigned char MC2OUT:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __CMOUTbits_t;
extern volatile __CMOUTbits_t __at(CMOUT_ADDR) CMOUTbits;

// ----- CRCON bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char CPFAIL:1;
    unsigned char :1;
    unsigned char CRLOCK:1;
    unsigned char CRSRC:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char CRON:1;
  };
} __CRCONbits_t;
extern volatile __CRCONbits_t __at(CRCON_ADDR) CRCONbits;

// ----- CWG1CON0 bits --------------------
typedef union {
  struct {
    unsigned char G1CS0:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char G1POLA:1;
    unsigned char G1POLB:1;
    unsigned char G1OEA:1;
    unsigned char G1OEB:1;
    unsigned char G1EN:1;
  };
} __CWG1CON0bits_t;
extern volatile __CWG1CON0bits_t __at(CWG1CON0_ADDR) CWG1CON0bits;

// ----- CWG1CON1 bits --------------------
typedef union {
  struct {
    unsigned char G1IS0:1;
    unsigned char G1IS1:1;
    unsigned char G1IS2:1;
    unsigned char :1;
    unsigned char G1ASDLA0:1;
    unsigned char G1ASDLA1:1;
    unsigned char G1ASDLB0:1;
    unsigned char G1ASDLB1:1;
  };
} __CWG1CON1bits_t;
extern volatile __CWG1CON1bits_t __at(CWG1CON1_ADDR) CWG1CON1bits;

// ----- CWG1CON2 bits --------------------
typedef union {
  struct {
    unsigned char G1ASDSCLC2:1;
    unsigned char G1ASDSFLT:1;
    unsigned char G1ASDSC1:1;
    unsigned char G1ASDSC2:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char G1ARSEN:1;
    unsigned char G1ASE:1;
  };
} __CWG1CON2bits_t;
extern volatile __CWG1CON2bits_t __at(CWG1CON2_ADDR) CWG1CON2bits;

// ----- CWG1DBF bits --------------------
typedef union {
  struct {
    unsigned char CWG1DBF0:1;
    unsigned char CWG1DBF1:1;
    unsigned char CWG1DBF2:1;
    unsigned char CWG1DBF3:1;
    unsigned char CWG1DBF4:1;
    unsigned char CWG1DBF5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __CWG1DBFbits_t;
extern volatile __CWG1DBFbits_t __at(CWG1DBF_ADDR) CWG1DBFbits;

// ----- CWG1DBR bits --------------------
typedef union {
  struct {
    unsigned char CWG1DBR0:1;
    unsigned char CWG1DBR1:1;
    unsigned char CWG1DBR2:1;
    unsigned char CWG1DBR3:1;
    unsigned char CWG1DBR4:1;
    unsigned char CWG1DBR5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __CWG1DBRbits_t;
extern volatile __CWG1DBRbits_t __at(CWG1DBR_ADDR) CWG1DBRbits;

// ----- DACCON0 bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char D1PSS0:1;
    unsigned char D1PSS1:1;
    unsigned char DACOE2:1;
    unsigned char DACOE1:1;
    unsigned char :1;
    unsigned char DACEN:1;
  };
} __DACCON0bits_t;
extern volatile __DACCON0bits_t __at(DACCON0_ADDR) DACCON0bits;

// ----- DACCON1 bits --------------------
typedef union {
  struct {
    unsigned char DACR0:1;
    unsigned char DACR1:1;
    unsigned char DACR2:1;
    unsigned char DACR3:1;
    unsigned char DACR4:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __DACCON1bits_t;
extern volatile __DACCON1bits_t __at(DACCON1_ADDR) DACCON1bits;

// ----- DEVSEL bits --------------------
typedef union {
  struct {
    unsigned char DEVSEL0:1;
    unsigned char DEVSEL1:1;
    unsigned char DEVSEL2:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __DEVSELbits_t;
extern volatile __DEVSELbits_t __at(DEVSEL_ADDR) DEVSELbits;

// ----- FVRCON bits --------------------
typedef union {
  struct {
    unsigned char ADFVR0:1;
    unsigned char ADFVR1:1;
    unsigned char CDAFVR0:1;
    unsigned char CDAFVR1:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char FVRRDY:1;
    unsigned char FVREN:1;
  };
} __FVRCONbits_t;
extern volatile __FVRCONbits_t __at(FVRCON_ADDR) FVRCONbits;

// ----- ICDBK0CON bits --------------------
typedef union {
  struct {
    unsigned char BKHLT:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char BKEN:1;
  };
} __ICDBK0CONbits_t;
extern volatile __ICDBK0CONbits_t __at(ICDBK0CON_ADDR) ICDBK0CONbits;

// ----- ICDBK0H bits --------------------
typedef union {
  struct {
    unsigned char BKA8:1;
    unsigned char BKA9:1;
    unsigned char BKA10:1;
    unsigned char BKA11:1;
    unsigned char BKA12:1;
    unsigned char BKA13:1;
    unsigned char BKA14:1;
    unsigned char :1;
  };
} __ICDBK0Hbits_t;
extern volatile __ICDBK0Hbits_t __at(ICDBK0H_ADDR) ICDBK0Hbits;

// ----- ICDBK0L bits --------------------
typedef union {
  struct {
    unsigned char BKA0:1;
    unsigned char BKA1:1;
    unsigned char BKA2:1;
    unsigned char BKA3:1;
    unsigned char BKA4:1;
    unsigned char BKA5:1;
    unsigned char BKA6:1;
    unsigned char BKA7:1;
  };
} __ICDBK0Lbits_t;
extern volatile __ICDBK0Lbits_t __at(ICDBK0L_ADDR) ICDBK0Lbits;

// ----- ICDCON0 bits --------------------
typedef union {
  struct {
    unsigned char RSTVEC:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char DBGINEX:1;
    unsigned char :1;
    unsigned char SSTEP:1;
    unsigned char FREEZ:1;
    unsigned char INBUG:1;
  };
} __ICDCON0bits_t;
extern volatile __ICDCON0bits_t __at(ICDCON0_ADDR) ICDCON0bits;

// ----- ICDINSTH bits --------------------
typedef union {
  struct {
    unsigned char DBGIN8:1;
    unsigned char DBGIN9:1;
    unsigned char DBGIN10:1;
    unsigned char DBGIN11:1;
    unsigned char DBGIN12:1;
    unsigned char DBGIN13:1;
    unsigned char :1;
    unsigned char :1;
  };
} __ICDINSTHbits_t;
extern volatile __ICDINSTHbits_t __at(ICDINSTH_ADDR) ICDINSTHbits;

// ----- ICDINSTL bits --------------------
typedef union {
  struct {
    unsigned char DBGIN0:1;
    unsigned char DBGIN1:1;
    unsigned char DBGIN2:1;
    unsigned char DBGIN3:1;
    unsigned char DBGIN4:1;
    unsigned char DBGIN5:1;
    unsigned char DBGIN6:1;
    unsigned char DBGIN7:1;
  };
} __ICDINSTLbits_t;
extern volatile __ICDINSTLbits_t __at(ICDINSTL_ADDR) ICDINSTLbits;

// ----- ICDIO bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char TRIS_ICDCLK:1;
    unsigned char TRIS_ICDDAT:1;
    unsigned char LAT_ICDCLK:1;
    unsigned char LAT_ICDDAT:1;
    unsigned char PORT_ICDCLK:1;
    unsigned char PORT_ICDDAT:1;
  };
} __ICDIObits_t;
extern volatile __ICDIObits_t __at(ICDIO_ADDR) ICDIObits;

// ----- ICDSTAT bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char USRHLTF:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char TRP0HLTF:1;
    unsigned char TRP1HLTF:1;
  };
} __ICDSTATbits_t;
extern volatile __ICDSTATbits_t __at(ICDSTAT_ADDR) ICDSTATbits;

// ----- INTCON bits --------------------
typedef union {
  struct {
    unsigned char IOCIF:1;
    unsigned char INTF:1;
    unsigned char TMR0IF:1;
    unsigned char IOCIE:1;
    unsigned char INTE:1;
    unsigned char TMR0IE:1;
    unsigned char PEIE:1;
    unsigned char GIE:1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char T0IF:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char T0IE:1;
    unsigned char :1;
    unsigned char :1;
  };
} __INTCONbits_t;
extern volatile __INTCONbits_t __at(INTCON_ADDR) INTCONbits;

// ----- IOCAF bits --------------------
typedef union {
  struct {
    unsigned char IOCAF0:1;
    unsigned char IOCAF1:1;
    unsigned char IOCAF2:1;
    unsigned char IOCAF3:1;
    unsigned char IOCAF4:1;
    unsigned char IOCAF5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __IOCAFbits_t;
extern volatile __IOCAFbits_t __at(IOCAF_ADDR) IOCAFbits;

// ----- IOCAN bits --------------------
typedef union {
  struct {
    unsigned char IOCAN0:1;
    unsigned char IOCAN1:1;
    unsigned char IOCAN2:1;
    unsigned char IOCAN3:1;
    unsigned char IOCAN4:1;
    unsigned char IOCAN5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __IOCANbits_t;
extern volatile __IOCANbits_t __at(IOCAN_ADDR) IOCANbits;

// ----- IOCAP bits --------------------
typedef union {
  struct {
    unsigned char IOCAP0:1;
    unsigned char IOCAP1:1;
    unsigned char IOCAP2:1;
    unsigned char IOCAP3:1;
    unsigned char IOCAP4:1;
    unsigned char IOCAP5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __IOCAPbits_t;
extern volatile __IOCAPbits_t __at(IOCAP_ADDR) IOCAPbits;

// ----- IOCBF bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char IOCBF4:1;
    unsigned char IOCBF5:1;
    unsigned char IOCBF6:1;
    unsigned char IOCBF7:1;
  };
} __IOCBFbits_t;
extern volatile __IOCBFbits_t __at(IOCBF_ADDR) IOCBFbits;

// ----- IOCBN bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char IOCBN4:1;
    unsigned char IOCBN5:1;
    unsigned char IOCBN6:1;
    unsigned char IOCBN7:1;
  };
} __IOCBNbits_t;
extern volatile __IOCBNbits_t __at(IOCBN_ADDR) IOCBNbits;

// ----- IOCBP bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char IOCBP4:1;
    unsigned char IOCBP5:1;
    unsigned char IOCBP6:1;
    unsigned char IOCBP7:1;
  };
} __IOCBPbits_t;
extern volatile __IOCBPbits_t __at(IOCBP_ADDR) IOCBPbits;

// ----- LATA bits --------------------
typedef union {
  struct {
    unsigned char LATA0:1;
    unsigned char LATA1:1;
    unsigned char LATA2:1;
    unsigned char :1;
    unsigned char LATA4:1;
    unsigned char LATA5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __LATAbits_t;
extern volatile __LATAbits_t __at(LATA_ADDR) LATAbits;

// ----- LATB bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char LATB4:1;
    unsigned char LATB5:1;
    unsigned char LATB6:1;
    unsigned char LATB7:1;
  };
} __LATBbits_t;
extern volatile __LATBbits_t __at(LATB_ADDR) LATBbits;

// ----- LATC bits --------------------
typedef union {
  struct {
    unsigned char LATC0:1;
    unsigned char LATC1:1;
    unsigned char LATC2:1;
    unsigned char LATC3:1;
    unsigned char LATC4:1;
    unsigned char LATC5:1;
    unsigned char LATC6:1;
    unsigned char LATC7:1;
  };
} __LATCbits_t;
extern volatile __LATCbits_t __at(LATC_ADDR) LATCbits;

// ----- OPTION_REG bits --------------------
typedef union {
  struct {
    unsigned char PS0:1;
    unsigned char PS1:1;
    unsigned char PS2:1;
    unsigned char PSA:1;
    unsigned char TMR0SE:1;
    unsigned char TMR0CS:1;
    unsigned char INTEDG:1;
    unsigned char NOT_WPUEN:1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char T0SE:1;
    unsigned char T0CS:1;
    unsigned char :1;
    unsigned char :1;
  };
} __OPTION_REGbits_t;
extern volatile __OPTION_REGbits_t __at(OPTION_REG_ADDR) OPTION_REGbits;

// ----- OSCCON bits --------------------
typedef union {
  struct {
    unsigned char SCS0:1;
    unsigned char SCS1:1;
    unsigned char :1;
    unsigned char IRCF0:1;
    unsigned char IRCF1:1;
    unsigned char IRCF2:1;
    unsigned char IRCF3:1;
    unsigned char :1;
  };
} __OSCCONbits_t;
extern volatile __OSCCONbits_t __at(OSCCON_ADDR) OSCCONbits;

// ----- OSCSTAT bits --------------------
typedef union {
  struct {
    unsigned char HFIOFS:1;
    unsigned char LFIOFR:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char HFIOFR:1;
    unsigned char OSTS:1;
    unsigned char :1;
    unsigned char SOSCR:1;
  };
} __OSCSTATbits_t;
extern volatile __OSCSTATbits_t __at(OSCSTAT_ADDR) OSCSTATbits;

// ----- OSCTUNE bits --------------------
typedef union {
  struct {
    unsigned char TUN0:1;
    unsigned char TUN1:1;
    unsigned char TUN2:1;
    unsigned char TUN3:1;
    unsigned char TUN4:1;
    unsigned char TUN5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __OSCTUNEbits_t;
extern volatile __OSCTUNEbits_t __at(OSCTUNE_ADDR) OSCTUNEbits;

// ----- PCON bits --------------------
typedef union {
  struct {
    unsigned char NOT_BOR:1;
    unsigned char NOT_POR:1;
    unsigned char NOT_RI:1;
    unsigned char NOT_RMCLR:1;
    unsigned char NOT_RWDT:1;
    unsigned char :1;
    unsigned char STKUNF:1;
    unsigned char STKOVF:1;
  };
} __PCONbits_t;
extern volatile __PCONbits_t __at(PCON_ADDR) PCONbits;

// ----- PIE1 bits --------------------
typedef union {
  struct {
    unsigned char TMR1IE:1;
    unsigned char TMR2IE:1;
    unsigned char :1;
    unsigned char SSP1IE:1;
    unsigned char TXIE:1;
    unsigned char RCIE:1;
    unsigned char ADIE:1;
    unsigned char TMR1GIE:1;
  };
} __PIE1bits_t;
extern volatile __PIE1bits_t __at(PIE1_ADDR) PIE1bits;

// ----- PIE2 bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char NCO1IE:1;
    unsigned char BCL1IE:1;
    unsigned char :1;
    unsigned char C1IE:1;
    unsigned char C2IE:1;
    unsigned char OSFIE:1;
  };
} __PIE2bits_t;
extern volatile __PIE2bits_t __at(PIE2_ADDR) PIE2bits;

// ----- PIR1 bits --------------------
typedef union {
  struct {
    unsigned char TMR1IF:1;
    unsigned char TMR2IF:1;
    unsigned char :1;
    unsigned char SSP1IF:1;
    unsigned char TXIF:1;
    unsigned char RCIF:1;
    unsigned char ADIF:1;
    unsigned char TMR1GIF:1;
  };
} __PIR1bits_t;
extern volatile __PIR1bits_t __at(PIR1_ADDR) PIR1bits;

// ----- PIR2 bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char NCO1IF:1;
    unsigned char BCL1IF:1;
    unsigned char :1;
    unsigned char C1IF:1;
    unsigned char C2IF:1;
    unsigned char OSFIF:1;
  };
} __PIR2bits_t;
extern volatile __PIR2bits_t __at(PIR2_ADDR) PIR2bits;

// ----- PMCON1 bits --------------------
typedef union {
  struct {
    unsigned char RD:1;
    unsigned char WR:1;
    unsigned char WREN:1;
    unsigned char WRERR:1;
    unsigned char FREE:1;
    unsigned char LWLO:1;
    unsigned char CFGS:1;
    unsigned char :1;
  };
} __PMCON1bits_t;
extern volatile __PMCON1bits_t __at(PMCON1_ADDR) PMCON1bits;

// ----- 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;
  };
} __PORTAbits_t;
extern volatile __PORTAbits_t __at(PORTA_ADDR) PORTAbits;

// ----- PORTB bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char RB4:1;
    unsigned char RB5:1;
    unsigned char RB6:1;
    unsigned char RB7:1;
  };
} __PORTBbits_t;
extern volatile __PORTBbits_t __at(PORTB_ADDR) PORTBbits;

// ----- 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;
  };
} __PORTCbits_t;
extern volatile __PORTCbits_t __at(PORTC_ADDR) PORTCbits;

// ----- PWM1CON bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char PWM1POL:1;
    unsigned char PWM1OUT:1;
    unsigned char PWM1OE:1;
    unsigned char PWM1EN:1;
  };
} __PWM1CONbits_t;
extern volatile __PWM1CONbits_t __at(PWM1CON_ADDR) PWM1CONbits;

// ----- PWM1CON0 bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char PWM1POL:1;
    unsigned char PWM1OUT:1;
    unsigned char PWM1OE:1;
    unsigned char PWM1EN:1;
  };
} __PWM1CON0bits_t;
extern volatile __PWM1CON0bits_t __at(PWM1CON0_ADDR) PWM1CON0bits;

// ----- PWM1DCH bits --------------------
typedef union {
  struct {
    unsigned char PWM1DCH0:1;
    unsigned char PWM1DCH1:1;
    unsigned char PWM1DCH2:1;
    unsigned char PWM1DCH3:1;
    unsigned char PWM1DCH4:1;
    unsigned char PWM1DCH5:1;
    unsigned char PWM1DCH6:1;
    unsigned char PWM1DCH7:1;
  };
} __PWM1DCHbits_t;
extern volatile __PWM1DCHbits_t __at(PWM1DCH_ADDR) PWM1DCHbits;

// ----- PWM1DCL bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char PWM1DCL0:1;
    unsigned char PWM1DCL1:1;
  };
} __PWM1DCLbits_t;
extern volatile __PWM1DCLbits_t __at(PWM1DCL_ADDR) PWM1DCLbits;

// ----- PWM2CON bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char PWM2POL:1;
    unsigned char PWM2OUT:1;
    unsigned char PWM2OE:1;
    unsigned char PWM2EN:1;
  };
} __PWM2CONbits_t;
extern volatile __PWM2CONbits_t __at(PWM2CON_ADDR) PWM2CONbits;

// ----- PWM2CON0 bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char PWM2POL:1;
    unsigned char PWM2OUT:1;
    unsigned char PWM2OE:1;
    unsigned char PWM2EN:1;
  };
} __PWM2CON0bits_t;
extern volatile __PWM2CON0bits_t __at(PWM2CON0_ADDR) PWM2CON0bits;

// ----- PWM2DCH bits --------------------
typedef union {
  struct {
    unsigned char PWM2DCH0:1;
    unsigned char PWM2DCH1:1;
    unsigned char PWM2DCH2:1;
    unsigned char PWM2DCH3:1;
    unsigned char PWM2DCH4:1;
    unsigned char PWM2DCH5:1;
    unsigned char PWM2DCH6:1;
    unsigned char PWM2DCH7:1;
  };
} __PWM2DCHbits_t;
extern volatile __PWM2DCHbits_t __at(PWM2DCH_ADDR) PWM2DCHbits;

// ----- PWM2DCL bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char PWM2DCL0:1;
    unsigned char PWM2DCL1:1;
  };
} __PWM2DCLbits_t;
extern volatile __PWM2DCLbits_t __at(PWM2DCL_ADDR) PWM2DCLbits;

// ----- RCSTA bits --------------------
typedef union {
  struct {
    unsigned char RX9D:1;
    unsigned char OERR:1;
    unsigned char FERR:1;
    unsigned char ADDEN:1;
    unsigned char CREN:1;
    unsigned char SREN:1;
    unsigned char RX9:1;
    unsigned char SPEN:1;
  };
} __RCSTAbits_t;
extern volatile __RCSTAbits_t __at(RCSTA_ADDR) RCSTAbits;

// ----- SSP1CON1 bits --------------------
typedef union {
  struct {
    unsigned char SSP1M0:1;
    unsigned char SSP1M1:1;
    unsigned char SSP1M2:1;
    unsigned char SSP1M3:1;
    unsigned char CKP:1;
    unsigned char SSP1EN:1;
    unsigned char SSP1OV:1;
    unsigned char WCOL:1;
  };
} __SSP1CON1bits_t;
extern volatile __SSP1CON1bits_t __at(SSP1CON1_ADDR) SSP1CON1bits;

// ----- SSP1CON2 bits --------------------
typedef union {
  struct {
    unsigned char SEN:1;
    unsigned char RSEN:1;
    unsigned char PEN:1;
    unsigned char RCEN:1;
    unsigned char ACKEN:1;
    unsigned char ACKDT:1;
    unsigned char ACKSTAT:1;
    unsigned char GCEN:1;
  };
} __SSP1CON2bits_t;
extern volatile __SSP1CON2bits_t __at(SSP1CON2_ADDR) SSP1CON2bits;

// ----- SSP1CON3 bits --------------------
typedef union {
  struct {
    unsigned char DHEN:1;
    unsigned char AHEN:1;
    unsigned char SBCDE:1;
    unsigned char SDAHT:1;
    unsigned char BOEN:1;
    unsigned char SCIE:1;
    unsigned char PCIE:1;
    unsigned char ACKTIM:1;
  };
} __SSP1CON3bits_t;
extern volatile __SSP1CON3bits_t __at(SSP1CON3_ADDR) SSP1CON3bits;

// ----- SSP1STAT bits --------------------
typedef union {
  struct {
    unsigned char BF:1;
    unsigned char UA:1;
    unsigned char R_NOT_W:1;
    unsigned char S:1;
    unsigned char P:1;
    unsigned char D_NOT_A:1;
    unsigned char CKE:1;
    unsigned char SMP:1;
  };
} __SSP1STATbits_t;
extern volatile __SSP1STATbits_t __at(SSP1STAT_ADDR) SSP1STATbits;

// ----- SSPCON bits --------------------
typedef union {
  struct {
    unsigned char SSP1M0:1;
    unsigned char SSP1M1:1;
    unsigned char SSP1M2:1;
    unsigned char SSP1M3:1;
    unsigned char CKP:1;
    unsigned char SSP1EN:1;
    unsigned char SSP1OV:1;
    unsigned char WCOL:1;
  };
} __SSPCONbits_t;
extern volatile __SSPCONbits_t __at(SSPCON_ADDR) SSPCONbits;

// ----- SSPCON1 bits --------------------
typedef union {
  struct {
    unsigned char SSP1M0:1;
    unsigned char SSP1M1:1;
    unsigned char SSP1M2:1;
    unsigned char SSP1M3:1;
    unsigned char CKP:1;
    unsigned char SSP1EN:1;
    unsigned char SSP1OV:1;
    unsigned char WCOL:1;
  };
} __SSPCON1bits_t;
extern volatile __SSPCON1bits_t __at(SSPCON1_ADDR) SSPCON1bits;

// ----- SSPCON2 bits --------------------
typedef union {
  struct {
    unsigned char SEN:1;
    unsigned char RSEN:1;
    unsigned char PEN:1;
    unsigned char RCEN:1;
    unsigned char ACKEN:1;
    unsigned char ACKDT:1;
    unsigned char ACKSTAT:1;
    unsigned char GCEN:1;
  };
} __SSPCON2bits_t;
extern volatile __SSPCON2bits_t __at(SSPCON2_ADDR) SSPCON2bits;

// ----- SSPCON3 bits --------------------
typedef union {
  struct {
    unsigned char DHEN:1;
    unsigned char AHEN:1;
    unsigned char SBCDE:1;
    unsigned char SDAHT:1;
    unsigned char BOEN:1;
    unsigned char SCIE:1;
    unsigned char PCIE:1;
    unsigned char ACKTIM:1;
  };
} __SSPCON3bits_t;
extern volatile __SSPCON3bits_t __at(SSPCON3_ADDR) SSPCON3bits;

// ----- SSPSTAT bits --------------------
typedef union {
  struct {
    unsigned char BF:1;
    unsigned char UA:1;
    unsigned char R_NOT_W:1;
    unsigned char S:1;
    unsigned char P:1;
    unsigned char D_NOT_A:1;
    unsigned char CKE:1;
    unsigned char SMP:1;
  };
} __SSPSTATbits_t;
extern volatile __SSPSTATbits_t __at(SSPSTAT_ADDR) SSPSTATbits;

// ----- STATUS bits --------------------
typedef union {
  struct {
    unsigned char C:1;
    unsigned char DC:1;
    unsigned char Z:1;
    unsigned char NOT_PD:1;
    unsigned char NOT_TO:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __STATUSbits_t;
extern volatile __STATUSbits_t __at(STATUS_ADDR) STATUSbits;

// ----- STATUS_SHAD 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;
  };
} __STATUS_SHADbits_t;
extern volatile __STATUS_SHADbits_t __at(STATUS_SHAD_ADDR) STATUS_SHADbits;

// ----- T1CON bits --------------------
typedef union {
  struct {
    unsigned char TMR1ON:1;
    unsigned char :1;
    unsigned char NOT_T1SYNC:1;
    unsigned char T1OSCEN:1;
    unsigned char T1CKPS0:1;
    unsigned char T1CKPS1:1;
    unsigned char TMR1CS0:1;
    unsigned char TMR1CS1:1;
  };
} __T1CONbits_t;
extern volatile __T1CONbits_t __at(T1CON_ADDR) T1CONbits;

// ----- T1GCON bits --------------------
typedef union {
  struct {
    unsigned char T1GSS0:1;
    unsigned char T1GSS1:1;
    unsigned char T1GVAL:1;
    unsigned char T1GGO_NOT_DONE:1;
    unsigned char T1GSPM:1;
    unsigned char T1GTM:1;
    unsigned char T1GPOL:1;
    unsigned char TMR1GE:1;
  };
} __T1GCONbits_t;
extern volatile __T1GCONbits_t __at(T1GCON_ADDR) T1GCONbits;

// ----- T2CON bits --------------------
typedef union {
  struct {
    unsigned char T2CKPS0:1;
    unsigned char T2CKPS1:1;
    unsigned char TMR2ON:1;
    unsigned char TOUTPS0:1;
    unsigned char TOUTPS1:1;
    unsigned char TOUTPS2:1;
    unsigned char TOUTPS3:1;
    unsigned char :1;
  };
} __T2CONbits_t;
extern volatile __T2CONbits_t __at(T2CON_ADDR) T2CONbits;

// ----- TRISA bits --------------------
typedef union {
  struct {
    unsigned char TRISA0:1;
    unsigned char TRISA1:1;
    unsigned char TRISA2:1;
    unsigned char TRISA3:1;
    unsigned char TRISA4:1;
    unsigned char TRISA5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __TRISAbits_t;
extern volatile __TRISAbits_t __at(TRISA_ADDR) TRISAbits;

// ----- TRISB bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char TRISB4:1;
    unsigned char TRISB5:1;
    unsigned char TRISB6:1;
    unsigned char TRISB7:1;
  };
} __TRISBbits_t;
extern volatile __TRISBbits_t __at(TRISB_ADDR) TRISBbits;

// ----- TRISC bits --------------------
typedef union {
  struct {
    unsigned char TRISC0:1;
    unsigned char TRISC1:1;
    unsigned char TRISC2:1;
    unsigned char TRISC3:1;
    unsigned char TRISC4:1;
    unsigned char TRISC5:1;
    unsigned char TRISC6:1;
    unsigned char TRISC7:1;
  };
} __TRISCbits_t;
extern volatile __TRISCbits_t __at(TRISC_ADDR) TRISCbits;

// ----- TXSTA bits --------------------
typedef union {
  struct {
    unsigned char TX9D:1;
    unsigned char TRMT:1;
    unsigned char BRGH:1;
    unsigned char SENDB:1;
    unsigned char SYNC:1;
    unsigned char TXEN:1;
    unsigned char TX9:1;
    unsigned char CSRC:1;
  };
} __TXSTAbits_t;
extern volatile __TXSTAbits_t __at(TXSTA_ADDR) TXSTAbits;

// ----- UADDR bits --------------------
typedef union {
  struct {
    unsigned char ADDR0:1;
    unsigned char ADDR1:1;
    unsigned char ADDR2:1;
    unsigned char ADDR3:1;
    unsigned char ADDR4:1;
    unsigned char ADDR5:1;
    unsigned char ADDR6:1;
    unsigned char :1;
  };
} __UADDRbits_t;
extern volatile __UADDRbits_t __at(UADDR_ADDR) UADDRbits;

// ----- UCFG bits --------------------
typedef union {
  struct {
    unsigned char PPB0:1;
    unsigned char PPB1:1;
    unsigned char FSEN:1;
    unsigned char :1;
    unsigned char UPUEN:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char UTEYE:1;
  };
} __UCFGbits_t;
extern volatile __UCFGbits_t __at(UCFG_ADDR) UCFGbits;

// ----- UCON bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char SUSPND:1;
    unsigned char RESUME:1;
    unsigned char USBEN:1;
    unsigned char PKTDIS:1;
    unsigned char SE0:1;
    unsigned char PPBRST:1;
    unsigned char :1;
  };
} __UCONbits_t;
extern volatile __UCONbits_t __at(UCON_ADDR) UCONbits;

// ----- UEIE bits --------------------
typedef union {
  struct {
    unsigned char PIDEE:1;
    unsigned char CRC5EE:1;
    unsigned char CRC16EE:1;
    unsigned char DFN8EE:1;
    unsigned char BTOEE:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char BTSEE:1;
  };
} __UEIEbits_t;
extern volatile __UEIEbits_t __at(UEIE_ADDR) UEIEbits;

// ----- UEIR bits --------------------
typedef union {
  struct {
    unsigned char PIDEF:1;
    unsigned char CRC5EF:1;
    unsigned char CRC16EF:1;
    unsigned char DFN8EF:1;
    unsigned char BTOEF:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char BTSEF:1;
  };
} __UEIRbits_t;
extern volatile __UEIRbits_t __at(UEIR_ADDR) UEIRbits;

// ----- UEP0 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP0bits_t;
extern volatile __UEP0bits_t __at(UEP0_ADDR) UEP0bits;

// ----- UEP1 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP1bits_t;
extern volatile __UEP1bits_t __at(UEP1_ADDR) UEP1bits;

// ----- UEP2 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP2bits_t;
extern volatile __UEP2bits_t __at(UEP2_ADDR) UEP2bits;

// ----- UEP3 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP3bits_t;
extern volatile __UEP3bits_t __at(UEP3_ADDR) UEP3bits;

// ----- UEP4 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP4bits_t;
extern volatile __UEP4bits_t __at(UEP4_ADDR) UEP4bits;

// ----- UEP5 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP5bits_t;
extern volatile __UEP5bits_t __at(UEP5_ADDR) UEP5bits;

// ----- UEP6 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP6bits_t;
extern volatile __UEP6bits_t __at(UEP6_ADDR) UEP6bits;

// ----- UEP7 bits --------------------
typedef union {
  struct {
    unsigned char EPSTALL:1;
    unsigned char EPINEN:1;
    unsigned char EPOUTEN:1;
    unsigned char EPCONDIS:1;
    unsigned char EPHSHK:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UEP7bits_t;
extern volatile __UEP7bits_t __at(UEP7_ADDR) UEP7bits;

// ----- UFRMH bits --------------------
typedef union {
  struct {
    unsigned char FRM8:1;
    unsigned char FRM9:1;
    unsigned char FRM10:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __UFRMHbits_t;
extern volatile __UFRMHbits_t __at(UFRMH_ADDR) UFRMHbits;

// ----- UFRML bits --------------------
typedef union {
  struct {
    unsigned char FRM0:1;
    unsigned char FRM1:1;
    unsigned char FRM2:1;
    unsigned char FRM3:1;
    unsigned char FRM4:1;
    unsigned char FRM5:1;
    unsigned char FRM6:1;
    unsigned char FRM7:1;
  };
} __UFRMLbits_t;
extern volatile __UFRMLbits_t __at(UFRML_ADDR) UFRMLbits;

// ----- UIE bits --------------------
typedef union {
  struct {
    unsigned char URSTIE:1;
    unsigned char UERRIE:1;
    unsigned char ACTVIE:1;
    unsigned char TRNIE:1;
    unsigned char IDLEIE:1;
    unsigned char STALLIE:1;
    unsigned char SOFIE:1;
    unsigned char :1;
  };
} __UIEbits_t;
extern volatile __UIEbits_t __at(UIE_ADDR) UIEbits;

// ----- UIR bits --------------------
typedef union {
  struct {
    unsigned char URSTIF:1;
    unsigned char UERRIF:1;
    unsigned char ACTVIF:1;
    unsigned char TRNIF:1;
    unsigned char IDLEIF:1;
    unsigned char STALLIF:1;
    unsigned char SOFIF:1;
    unsigned char :1;
  };
} __UIRbits_t;
extern volatile __UIRbits_t __at(UIR_ADDR) UIRbits;

// ----- USTAT bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char PPBI:1;
    unsigned char DIR:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __USTATbits_t;
extern volatile __USTATbits_t __at(USTAT_ADDR) USTATbits;

// ----- VREGCON bits --------------------
typedef union {
  struct {
    unsigned char VREGPM0:1;
    unsigned char VREGPM1:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __VREGCONbits_t;
extern volatile __VREGCONbits_t __at(VREGCON_ADDR) VREGCONbits;

// ----- WDTCON bits --------------------
typedef union {
  struct {
    unsigned char SWDTEN:1;
    unsigned char WDTPS0:1;
    unsigned char WDTPS1:1;
    unsigned char WDTPS2:1;
    unsigned char WDTPS3:1;
    unsigned char WDTPS4:1;
    unsigned char :1;
    unsigned char :1;
  };
} __WDTCONbits_t;
extern volatile __WDTCONbits_t __at(WDTCON_ADDR) WDTCONbits;

// ----- WPUA bits --------------------
typedef union {
  struct {
    unsigned char WPUA0:1;
    unsigned char WPUA1:1;
    unsigned char WPUA2:1;
    unsigned char WPUA3:1;
    unsigned char WPUA4:1;
    unsigned char WPUA5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __WPUAbits_t;
extern volatile __WPUAbits_t __at(WPUA_ADDR) WPUAbits;

// ----- WPUB bits --------------------
typedef union {
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char WPUB4:1;
    unsigned char WPUB5:1;
    unsigned char WPUB6:1;
    unsigned char WPUB7:1;
  };
} __WPUBbits_t;
extern volatile __WPUBbits_t __at(WPUB_ADDR) WPUBbits;


#ifndef NO_BIT_DEFINES

#define ADON                 ADCON0bits.ADON                /* bit 0 */
#define ADGO                 ADCON0bits.ADGO                /* bit 1 */
#define GO                   ADCON0bits.GO                  /* bit 1 */
#define GO_NOT_DONE          ADCON0bits.GO_NOT_DONE         /* bit 1 */
#define CHS0                 ADCON0bits.CHS0                /* bit 2 */
#define CHS1                 ADCON0bits.CHS1                /* bit 3 */
#define CHS2                 ADCON0bits.CHS2                /* bit 4 */
#define CHS3                 ADCON0bits.CHS3                /* bit 5 */
#define CHS4                 ADCON0bits.CHS4                /* bit 6 */

#define ADPREF0              ADCON1bits.ADPREF0             /* bit 0 */
#define ADPREF1              ADCON1bits.ADPREF1             /* bit 1 */
#define ADFM                 ADCON1bits.ADFM                /* bit 7 */

#define TRIGSEL0             ADCON2bits.TRIGSEL0            /* bit 4 */
#define TRIGSEL1             ADCON2bits.TRIGSEL1            /* bit 5 */
#define TRIGSEL2             ADCON2bits.TRIGSEL2            /* bit 6 */

#define ANSA0                ANSELAbits.ANSA0               /* bit 0 */
#define ANSA1                ANSELAbits.ANSA1               /* bit 1 */
#define ANSA2                ANSELAbits.ANSA2               /* bit 2 */
#define ANSA4                ANSELAbits.ANSA4               /* bit 4 */

#define ANSB4                ANSELBbits.ANSB4               /* bit 4 */
#define ANSB5                ANSELBbits.ANSB5               /* bit 5 */

#define ANSC0                ANSELCbits.ANSC0               /* bit 0 */
#define ANSC1                ANSELCbits.ANSC1               /* bit 1 */
#define ANSC2                ANSELCbits.ANSC2               /* bit 2 */
#define ANSC3                ANSELCbits.ANSC3               /* bit 3 */
#define ANSC6                ANSELCbits.ANSC6               /* bit 6 */
#define ANSC7                ANSELCbits.ANSC7               /* bit 7 */

#define T1GSEL               APFCONbits.T1GSEL              /* bit 3 */
#define SSSEL                APFCONbits.SSSEL               /* bit 5 */
#define CLKRSEL              APFCONbits.CLKRSEL             /* bit 7 */

#define ABDEN                BAUDCONbits.ABDEN              /* bit 0 */
#define WUE                  BAUDCONbits.WUE                /* bit 1 */
#define BRG16                BAUDCONbits.BRG16              /* bit 3 */
#define SCKP                 BAUDCONbits.SCKP               /* bit 4 */
#define RCIDL                BAUDCONbits.RCIDL              /* bit 6 */
#define ABDOVF               BAUDCONbits.ABDOVF             /* bit 7 */

#define BORRDY               BORCONbits.BORRDY              /* bit 0 */
#define BORFS                BORCONbits.BORFS               /* bit 6 */
#define SBOREN               BORCONbits.SBOREN              /* bit 7 */

#define BSR0                 BSRbits.BSR0                   /* bit 0 */
#define BSR1                 BSRbits.BSR1                   /* bit 1 */
#define BSR2                 BSRbits.BSR2                   /* bit 2 */
#define BSR3                 BSRbits.BSR3                   /* bit 3 */
#define BSR4                 BSRbits.BSR4                   /* bit 4 */

#define CLKRDIV0             CLKRCONbits.CLKRDIV0           /* bit 0 */
#define CLKRDIV1             CLKRCONbits.CLKRDIV1           /* bit 1 */
#define CLKRDIV2             CLKRCONbits.CLKRDIV2           /* bit 2 */
#define CLKRCD0              CLKRCONbits.CLKRCD0            /* bit 3 */
#define CLKRCD1              CLKRCONbits.CLKRCD1            /* bit 4 */
#define CLKRSLR              CLKRCONbits.CLKRSLR            /* bit 5 */
#define CLKROE               CLKRCONbits.CLKROE             /* bit 6 */
#define CLKREN               CLKRCONbits.CLKREN             /* bit 7 */

#define C1SYNC               CM1CON0bits.C1SYNC             /* bit 0 */
#define C1HYS                CM1CON0bits.C1HYS              /* bit 1 */
#define C1SP                 CM1CON0bits.C1SP               /* bit 2 */
#define C1POL                CM1CON0bits.C1POL              /* bit 4 */
#define C1OE                 CM1CON0bits.C1OE               /* bit 5 */
#define C1OUT                CM1CON0bits.C1OUT              /* bit 6 */
#define C1ON                 CM1CON0bits.C1ON               /* bit 7 */

#define C1NCH0               CM1CON1bits.C1NCH0             /* bit 0 */
#define C1NCH1               CM1CON1bits.C1NCH1             /* bit 1 */
#define C1PCH0               CM1CON1bits.C1PCH0             /* bit 4 */
#define C1PCH1               CM1CON1bits.C1PCH1             /* bit 5 */
#define C1INTN               CM1CON1bits.C1INTN             /* bit 6 */
#define C1INTP               CM1CON1bits.C1INTP             /* bit 7 */

#define C2SYNC               CM2CON0bits.C2SYNC             /* bit 0 */
#define C2HYS                CM2CON0bits.C2HYS              /* bit 1 */
#define C2SP                 CM2CON0bits.C2SP               /* bit 2 */
#define C2POL                CM2CON0bits.C2POL              /* bit 4 */
#define C2OE                 CM2CON0bits.C2OE               /* bit 5 */
#define C2OUT                CM2CON0bits.C2OUT              /* bit 6 */
#define C2ON                 CM2CON0bits.C2ON               /* bit 7 */

#define C2NCH0               CM2CON1bits.C2NCH0             /* bit 0 */
#define C2NCH1               CM2CON1bits.C2NCH1             /* bit 1 */
#define C2PCH0               CM2CON1bits.C2PCH0             /* bit 4 */
#define C2PCH1               CM2CON1bits.C2PCH1             /* bit 5 */
#define C2INTN               CM2CON1bits.C2INTN             /* bit 6 */
#define C2INTP               CM2CON1bits.C2INTP             /* bit 7 */

#define MC1OUT               CMOUTbits.MC1OUT               /* bit 0 */
#define MC2OUT               CMOUTbits.MC2OUT               /* bit 1 */

#define CPFAIL               CRCONbits.CPFAIL               /* bit 1 */
#define CRLOCK               CRCONbits.CRLOCK               /* bit 3 */
#define CRSRC                CRCONbits.CRSRC                /* bit 4 */
#define CRON                 CRCONbits.CRON                 /* bit 7 */

#define G1CS0                CWG1CON0bits.G1CS0             /* bit 0 */
#define G1POLA               CWG1CON0bits.G1POLA            /* bit 3 */
#define G1POLB               CWG1CON0bits.G1POLB            /* bit 4 */
#define G1OEA                CWG1CON0bits.G1OEA             /* bit 5 */
#define G1OEB                CWG1CON0bits.G1OEB             /* bit 6 */
#define G1EN                 CWG1CON0bits.G1EN              /* bit 7 */

#define G1IS0                CWG1CON1bits.G1IS0             /* bit 0 */
#define G1IS1                CWG1CON1bits.G1IS1             /* bit 1 */
#define G1IS2                CWG1CON1bits.G1IS2             /* bit 2 */
#define G1ASDLA0             CWG1CON1bits.G1ASDLA0          /* bit 4 */
#define G1ASDLA1             CWG1CON1bits.G1ASDLA1          /* bit 5 */
#define G1ASDLB0             CWG1CON1bits.G1ASDLB0          /* bit 6 */
#define G1ASDLB1             CWG1CON1bits.G1ASDLB1          /* bit 7 */

#define G1ASDSCLC2           CWG1CON2bits.G1ASDSCLC2        /* bit 0 */
#define G1ASDSFLT            CWG1CON2bits.G1ASDSFLT         /* bit 1 */
#define G1ASDSC1             CWG1CON2bits.G1ASDSC1          /* bit 2 */
#define G1ASDSC2             CWG1CON2bits.G1ASDSC2          /* bit 3 */
#define G1ARSEN              CWG1CON2bits.G1ARSEN           /* bit 6 */
#define G1ASE                CWG1CON2bits.G1ASE             /* bit 7 */

#define CWG1DBF0             CWG1DBFbits.CWG1DBF0           /* bit 0 */
#define CWG1DBF1             CWG1DBFbits.CWG1DBF1           /* bit 1 */
#define CWG1DBF2             CWG1DBFbits.CWG1DBF2           /* bit 2 */
#define CWG1DBF3             CWG1DBFbits.CWG1DBF3           /* bit 3 */
#define CWG1DBF4             CWG1DBFbits.CWG1DBF4           /* bit 4 */
#define CWG1DBF5             CWG1DBFbits.CWG1DBF5           /* bit 5 */

#define CWG1DBR0             CWG1DBRbits.CWG1DBR0           /* bit 0 */
#define CWG1DBR1             CWG1DBRbits.CWG1DBR1           /* bit 1 */
#define CWG1DBR2             CWG1DBRbits.CWG1DBR2           /* bit 2 */
#define CWG1DBR3             CWG1DBRbits.CWG1DBR3           /* bit 3 */
#define CWG1DBR4             CWG1DBRbits.CWG1DBR4           /* bit 4 */
#define CWG1DBR5             CWG1DBRbits.CWG1DBR5           /* bit 5 */

#define D1PSS0               DACCON0bits.D1PSS0             /* bit 2 */
#define D1PSS1               DACCON0bits.D1PSS1             /* bit 3 */
#define DACOE2               DACCON0bits.DACOE2             /* bit 4 */
#define DACOE1               DACCON0bits.DACOE1             /* bit 5 */
#define DACEN                DACCON0bits.DACEN              /* bit 7 */

#define DACR0                DACCON1bits.DACR0              /* bit 0 */
#define DACR1                DACCON1bits.DACR1              /* bit 1 */
#define DACR2                DACCON1bits.DACR2              /* bit 2 */
#define DACR3                DACCON1bits.DACR3              /* bit 3 */
#define DACR4                DACCON1bits.DACR4              /* bit 4 */

#define DEVSEL0              DEVSELbits.DEVSEL0             /* bit 0 */
#define DEVSEL1              DEVSELbits.DEVSEL1             /* bit 1 */
#define DEVSEL2              DEVSELbits.DEVSEL2             /* bit 2 */

#define ADFVR0               FVRCONbits.ADFVR0              /* bit 0 */
#define ADFVR1               FVRCONbits.ADFVR1              /* bit 1 */
#define CDAFVR0              FVRCONbits.CDAFVR0             /* bit 2 */
#define CDAFVR1              FVRCONbits.CDAFVR1             /* bit 3 */
#define FVRRDY               FVRCONbits.FVRRDY              /* bit 6 */
#define FVREN                FVRCONbits.FVREN               /* bit 7 */

#define BKHLT                ICDBK0CONbits.BKHLT            /* bit 0 */
#define BKEN                 ICDBK0CONbits.BKEN             /* bit 7 */

#define BKA8                 ICDBK0Hbits.BKA8               /* bit 0 */
#define BKA9                 ICDBK0Hbits.BKA9               /* bit 1 */
#define BKA10                ICDBK0Hbits.BKA10              /* bit 2 */
#define BKA11                ICDBK0Hbits.BKA11              /* bit 3 */
#define BKA12                ICDBK0Hbits.BKA12              /* bit 4 */
#define BKA13                ICDBK0Hbits.BKA13              /* bit 5 */
#define BKA14                ICDBK0Hbits.BKA14              /* bit 6 */

#define BKA0                 ICDBK0Lbits.BKA0               /* bit 0 */
#define BKA1                 ICDBK0Lbits.BKA1               /* bit 1 */
#define BKA2                 ICDBK0Lbits.BKA2               /* bit 2 */
#define BKA3                 ICDBK0Lbits.BKA3               /* bit 3 */
#define BKA4                 ICDBK0Lbits.BKA4               /* bit 4 */
#define BKA5                 ICDBK0Lbits.BKA5               /* bit 5 */
#define BKA6                 ICDBK0Lbits.BKA6               /* bit 6 */
#define BKA7                 ICDBK0Lbits.BKA7               /* bit 7 */

#define RSTVEC               ICDCON0bits.RSTVEC             /* bit 0 */
#define DBGINEX              ICDCON0bits.DBGINEX            /* bit 3 */
#define SSTEP                ICDCON0bits.SSTEP              /* bit 5 */
#define FREEZ                ICDCON0bits.FREEZ              /* bit 6 */
#define INBUG                ICDCON0bits.INBUG              /* bit 7 */

#define DBGIN8               ICDINSTHbits.DBGIN8            /* bit 0 */
#define DBGIN9               ICDINSTHbits.DBGIN9            /* bit 1 */
#define DBGIN10              ICDINSTHbits.DBGIN10           /* bit 2 */
#define DBGIN11              ICDINSTHbits.DBGIN11           /* bit 3 */
#define DBGIN12              ICDINSTHbits.DBGIN12           /* bit 4 */
#define DBGIN13              ICDINSTHbits.DBGIN13           /* bit 5 */

#define DBGIN0               ICDINSTLbits.DBGIN0            /* bit 0 */
#define DBGIN1               ICDINSTLbits.DBGIN1            /* bit 1 */
#define DBGIN2               ICDINSTLbits.DBGIN2            /* bit 2 */
#define DBGIN3               ICDINSTLbits.DBGIN3            /* bit 3 */
#define DBGIN4               ICDINSTLbits.DBGIN4            /* bit 4 */
#define DBGIN5               ICDINSTLbits.DBGIN5            /* bit 5 */
#define DBGIN6               ICDINSTLbits.DBGIN6            /* bit 6 */
#define DBGIN7               ICDINSTLbits.DBGIN7            /* bit 7 */

#define TRIS_ICDCLK          ICDIObits.TRIS_ICDCLK          /* bit 2 */
#define TRIS_ICDDAT          ICDIObits.TRIS_ICDDAT          /* bit 3 */
#define LAT_ICDCLK           ICDIObits.LAT_ICDCLK           /* bit 4 */
#define LAT_ICDDAT           ICDIObits.LAT_ICDDAT           /* bit 5 */
#define PORT_ICDCLK          ICDIObits.PORT_ICDCLK          /* bit 6 */
#define PORT_ICDDAT          ICDIObits.PORT_ICDDAT          /* bit 7 */

#define USRHLTF              ICDSTATbits.USRHLTF            /* bit 1 */
#define TRP0HLTF             ICDSTATbits.TRP0HLTF           /* bit 6 */
#define TRP1HLTF             ICDSTATbits.TRP1HLTF           /* bit 7 */

#define IOCIF                INTCONbits.IOCIF               /* bit 0 */
#define INTF                 INTCONbits.INTF                /* bit 1 */
#define T0IF                 INTCONbits.T0IF                /* bit 2 */
#define TMR0IF               INTCONbits.TMR0IF              /* bit 2 */
#define IOCIE                INTCONbits.IOCIE               /* bit 3 */
#define INTE                 INTCONbits.INTE                /* bit 4 */
#define T0IE                 INTCONbits.T0IE                /* bit 5 */
#define TMR0IE               INTCONbits.TMR0IE              /* bit 5 */
#define PEIE                 INTCONbits.PEIE                /* bit 6 */
#define GIE                  INTCONbits.GIE                 /* bit 7 */

#define IOCAF0               IOCAFbits.IOCAF0               /* bit 0 */
#define IOCAF1               IOCAFbits.IOCAF1               /* bit 1 */
#define IOCAF2               IOCAFbits.IOCAF2               /* bit 2 */
#define IOCAF3               IOCAFbits.IOCAF3               /* bit 3 */
#define IOCAF4               IOCAFbits.IOCAF4               /* bit 4 */
#define IOCAF5               IOCAFbits.IOCAF5               /* bit 5 */

#define IOCAN0               IOCANbits.IOCAN0               /* bit 0 */
#define IOCAN1               IOCANbits.IOCAN1               /* bit 1 */
#define IOCAN2               IOCANbits.IOCAN2               /* bit 2 */
#define IOCAN3               IOCANbits.IOCAN3               /* bit 3 */
#define IOCAN4               IOCANbits.IOCAN4               /* bit 4 */
#define IOCAN5               IOCANbits.IOCAN5               /* bit 5 */

#define IOCAP0               IOCAPbits.IOCAP0               /* bit 0 */
#define IOCAP1               IOCAPbits.IOCAP1               /* bit 1 */
#define IOCAP2               IOCAPbits.IOCAP2               /* bit 2 */
#define IOCAP3               IOCAPbits.IOCAP3               /* bit 3 */
#define IOCAP4               IOCAPbits.IOCAP4               /* bit 4 */
#define IOCAP5               IOCAPbits.IOCAP5               /* bit 5 */

#define IOCBF4               IOCBFbits.IOCBF4               /* bit 4 */
#define IOCBF5               IOCBFbits.IOCBF5               /* bit 5 */
#define IOCBF6               IOCBFbits.IOCBF6               /* bit 6 */
#define IOCBF7               IOCBFbits.IOCBF7               /* bit 7 */

#define IOCBN4               IOCBNbits.IOCBN4               /* bit 4 */
#define IOCBN5               IOCBNbits.IOCBN5               /* bit 5 */
#define IOCBN6               IOCBNbits.IOCBN6               /* bit 6 */
#define IOCBN7               IOCBNbits.IOCBN7               /* bit 7 */

#define IOCBP4               IOCBPbits.IOCBP4               /* bit 4 */
#define IOCBP5               IOCBPbits.IOCBP5               /* bit 5 */
#define IOCBP6               IOCBPbits.IOCBP6               /* bit 6 */
#define IOCBP7               IOCBPbits.IOCBP7               /* bit 7 */

#define LATA0                LATAbits.LATA0                 /* bit 0 */
#define LATA1                LATAbits.LATA1                 /* bit 1 */
#define LATA2                LATAbits.LATA2                 /* bit 2 */
#define LATA4                LATAbits.LATA4                 /* bit 4 */
#define LATA5                LATAbits.LATA5                 /* bit 5 */

#define LATB4                LATBbits.LATB4                 /* bit 4 */
#define LATB5                LATBbits.LATB5                 /* bit 5 */
#define LATB6                LATBbits.LATB6                 /* bit 6 */
#define LATB7                LATBbits.LATB7                 /* bit 7 */

#define LATC0                LATCbits.LATC0                 /* bit 0 */
#define LATC1                LATCbits.LATC1                 /* bit 1 */
#define LATC2                LATCbits.LATC2                 /* bit 2 */
#define LATC3                LATCbits.LATC3                 /* bit 3 */
#define LATC4                LATCbits.LATC4                 /* bit 4 */
#define LATC5                LATCbits.LATC5                 /* bit 5 */
#define LATC6                LATCbits.LATC6                 /* bit 6 */
#define LATC7                LATCbits.LATC7                 /* bit 7 */

#define PS0                  OPTION_REGbits.PS0             /* bit 0 */
#define PS1                  OPTION_REGbits.PS1             /* bit 1 */
#define PS2                  OPTION_REGbits.PS2             /* bit 2 */
#define PSA                  OPTION_REGbits.PSA             /* bit 3 */
#define T0SE                 OPTION_REGbits.T0SE            /* bit 4 */
#define TMR0SE               OPTION_REGbits.TMR0SE          /* bit 4 */
#define T0CS                 OPTION_REGbits.T0CS            /* bit 5 */
#define TMR0CS               OPTION_REGbits.TMR0CS          /* bit 5 */
#define INTEDG               OPTION_REGbits.INTEDG          /* bit 6 */
#define NOT_WPUEN            OPTION_REGbits.NOT_WPUEN       /* bit 7 */

#define SCS0                 OSCCONbits.SCS0                /* bit 0 */
#define SCS1                 OSCCONbits.SCS1                /* bit 1 */
#define IRCF0                OSCCONbits.IRCF0               /* bit 3 */
#define IRCF1                OSCCONbits.IRCF1               /* bit 4 */
#define IRCF2                OSCCONbits.IRCF2               /* bit 5 */
#define IRCF3                OSCCONbits.IRCF3               /* bit 6 */

#define HFIOFS               OSCSTATbits.HFIOFS             /* bit 0 */
#define LFIOFR               OSCSTATbits.LFIOFR             /* bit 1 */
#define HFIOFR               OSCSTATbits.HFIOFR             /* bit 4 */
#define OSTS                 OSCSTATbits.OSTS               /* bit 5 */
#define SOSCR                OSCSTATbits.SOSCR              /* bit 7 */

#define TUN0                 OSCTUNEbits.TUN0               /* bit 0 */
#define TUN1                 OSCTUNEbits.TUN1               /* bit 1 */
#define TUN2                 OSCTUNEbits.TUN2               /* bit 2 */
#define TUN3                 OSCTUNEbits.TUN3               /* bit 3 */
#define TUN4                 OSCTUNEbits.TUN4               /* bit 4 */
#define TUN5                 OSCTUNEbits.TUN5               /* bit 5 */

#define NOT_BOR              PCONbits.NOT_BOR               /* bit 0 */
#define NOT_POR              PCONbits.NOT_POR               /* bit 1 */
#define NOT_RI               PCONbits.NOT_RI                /* bit 2 */
#define NOT_RMCLR            PCONbits.NOT_RMCLR             /* bit 3 */
#define NOT_RWDT             PCONbits.NOT_RWDT              /* bit 4 */
#define STKUNF               PCONbits.STKUNF                /* bit 6 */
#define STKOVF               PCONbits.STKOVF                /* bit 7 */

#define TMR1IE               PIE1bits.TMR1IE                /* bit 0 */
#define TMR2IE               PIE1bits.TMR2IE                /* bit 1 */
#define SSP1IE               PIE1bits.SSP1IE                /* bit 3 */
#define TXIE                 PIE1bits.TXIE                  /* bit 4 */
#define RCIE                 PIE1bits.RCIE                  /* bit 5 */
#define ADIE                 PIE1bits.ADIE                  /* bit 6 */
#define TMR1GIE              PIE1bits.TMR1GIE               /* bit 7 */

#define NCO1IE               PIE2bits.NCO1IE                /* bit 2 */
#define BCL1IE               PIE2bits.BCL1IE                /* bit 3 */
#define C1IE                 PIE2bits.C1IE                  /* bit 5 */
#define C2IE                 PIE2bits.C2IE                  /* bit 6 */
#define OSFIE                PIE2bits.OSFIE                 /* bit 7 */

#define TMR1IF               PIR1bits.TMR1IF                /* bit 0 */
#define TMR2IF               PIR1bits.TMR2IF                /* bit 1 */
#define SSP1IF               PIR1bits.SSP1IF                /* bit 3 */
#define TXIF                 PIR1bits.TXIF                  /* bit 4 */
#define RCIF                 PIR1bits.RCIF                  /* bit 5 */
#define ADIF                 PIR1bits.ADIF                  /* bit 6 */
#define TMR1GIF              PIR1bits.TMR1GIF               /* bit 7 */

#define NCO1IF               PIR2bits.NCO1IF                /* bit 2 */
#define BCL1IF               PIR2bits.BCL1IF                /* bit 3 */
#define C1IF                 PIR2bits.C1IF                  /* bit 5 */
#define C2IF                 PIR2bits.C2IF                  /* bit 6 */
#define OSFIF                PIR2bits.OSFIF                 /* bit 7 */

#define RD                   PMCON1bits.RD                  /* bit 0 */
#define WR                   PMCON1bits.WR                  /* bit 1 */
#define WREN                 PMCON1bits.WREN                /* bit 2 */
#define WRERR                PMCON1bits.WRERR               /* bit 3 */
#define FREE                 PMCON1bits.FREE                /* bit 4 */
#define LWLO                 PMCON1bits.LWLO                /* bit 5 */
#define CFGS                 PMCON1bits.CFGS                /* bit 6 */

#define RA0                  PORTAbits.RA0                  /* bit 0 */
#define RA1                  PORTAbits.RA1                  /* bit 1 */
#define RA2                  PORTAbits.RA2                  /* bit 2 */
#define RA3                  PORTAbits.RA3                  /* bit 3 */
#define RA4                  PORTAbits.RA4                  /* bit 4 */
#define RA5                  PORTAbits.RA5                  /* bit 5 */

#define RB4                  PORTBbits.RB4                  /* bit 4 */
#define RB5                  PORTBbits.RB5                  /* bit 5 */
#define RB6                  PORTBbits.RB6                  /* bit 6 */
#define RB7                  PORTBbits.RB7                  /* bit 7 */

#define RC0                  PORTCbits.RC0                  /* bit 0 */
#define RC1                  PORTCbits.RC1                  /* bit 1 */
#define RC2                  PORTCbits.RC2                  /* bit 2 */
#define RC3                  PORTCbits.RC3                  /* bit 3 */
#define RC4                  PORTCbits.RC4                  /* bit 4 */
#define RC5                  PORTCbits.RC5                  /* bit 5 */
#define RC6                  PORTCbits.RC6                  /* bit 6 */
#define RC7                  PORTCbits.RC7                  /* bit 7 */

#define PWM1POL              PWM1CONbits.PWM1POL            /* bit 4, shadows bit in PWM1CON0bits */
#define PWM1OUT              PWM1CONbits.PWM1OUT            /* bit 5, shadows bit in PWM1CON0bits */
#define PWM1OE               PWM1CONbits.PWM1OE             /* bit 6, shadows bit in PWM1CON0bits */
#define PWM1EN               PWM1CONbits.PWM1EN             /* bit 7, shadows bit in PWM1CON0bits */

#define PWM1DCH0             PWM1DCHbits.PWM1DCH0           /* bit 0 */
#define PWM1DCH1             PWM1DCHbits.PWM1DCH1           /* bit 1 */
#define PWM1DCH2             PWM1DCHbits.PWM1DCH2           /* bit 2 */
#define PWM1DCH3             PWM1DCHbits.PWM1DCH3           /* bit 3 */
#define PWM1DCH4             PWM1DCHbits.PWM1DCH4           /* bit 4 */
#define PWM1DCH5             PWM1DCHbits.PWM1DCH5           /* bit 5 */
#define PWM1DCH6             PWM1DCHbits.PWM1DCH6           /* bit 6 */
#define PWM1DCH7             PWM1DCHbits.PWM1DCH7           /* bit 7 */

#define PWM1DCL0             PWM1DCLbits.PWM1DCL0           /* bit 6 */
#define PWM1DCL1             PWM1DCLbits.PWM1DCL1           /* bit 7 */

#define PWM2POL              PWM2CONbits.PWM2POL            /* bit 4, shadows bit in PWM2CON0bits */
#define PWM2OUT              PWM2CONbits.PWM2OUT            /* bit 5, shadows bit in PWM2CON0bits */
#define PWM2OE               PWM2CONbits.PWM2OE             /* bit 6, shadows bit in PWM2CON0bits */
#define PWM2EN               PWM2CONbits.PWM2EN             /* bit 7, shadows bit in PWM2CON0bits */

#define PWM2DCH0             PWM2DCHbits.PWM2DCH0           /* bit 0 */
#define PWM2DCH1             PWM2DCHbits.PWM2DCH1           /* bit 1 */
#define PWM2DCH2             PWM2DCHbits.PWM2DCH2           /* bit 2 */
#define PWM2DCH3             PWM2DCHbits.PWM2DCH3           /* bit 3 */
#define PWM2DCH4             PWM2DCHbits.PWM2DCH4           /* bit 4 */
#define PWM2DCH5             PWM2DCHbits.PWM2DCH5           /* bit 5 */
#define PWM2DCH6             PWM2DCHbits.PWM2DCH6           /* bit 6 */
#define PWM2DCH7             PWM2DCHbits.PWM2DCH7           /* bit 7 */

#define PWM2DCL0             PWM2DCLbits.PWM2DCL0           /* bit 6 */
#define PWM2DCL1             PWM2DCLbits.PWM2DCL1           /* bit 7 */

#define RX9D                 RCSTAbits.RX9D                 /* bit 0 */
#define OERR                 RCSTAbits.OERR                 /* bit 1 */
#define FERR                 RCSTAbits.FERR                 /* bit 2 */
#define ADDEN                RCSTAbits.ADDEN                /* bit 3 */
#define CREN                 RCSTAbits.CREN                 /* bit 4 */
#define SREN                 RCSTAbits.SREN                 /* bit 5 */
#define RX9                  RCSTAbits.RX9                  /* bit 6 */
#define SPEN                 RCSTAbits.SPEN                 /* bit 7 */

#define SSP1M0               SSP1CON1bits.SSP1M0            /* bit 0, shadows bit in SSPCONbits, SSPCON1bits */
#define SSP1M1               SSP1CON1bits.SSP1M1            /* bit 1, shadows bit in SSPCONbits, SSPCON1bits */
#define SSP1M2               SSP1CON1bits.SSP1M2            /* bit 2, shadows bit in SSPCONbits, SSPCON1bits */
#define SSP1M3               SSP1CON1bits.SSP1M3            /* bit 3, shadows bit in SSPCONbits, SSPCON1bits */
#define CKP                  SSP1CON1bits.CKP               /* bit 4, shadows bit in SSPCONbits, SSPCON1bits */
#define SSP1EN               SSP1CON1bits.SSP1EN            /* bit 5, shadows bit in SSPCONbits, SSPCON1bits */
#define SSP1OV               SSP1CON1bits.SSP1OV            /* bit 6, shadows bit in SSPCONbits, SSPCON1bits */
#define WCOL                 SSP1CON1bits.WCOL              /* bit 7, shadows bit in SSPCONbits, SSPCON1bits */

#define SEN                  SSP1CON2bits.SEN               /* bit 0, shadows bit in SSPCON2bits */
#define RSEN                 SSP1CON2bits.RSEN              /* bit 1, shadows bit in SSPCON2bits */
#define PEN                  SSP1CON2bits.PEN               /* bit 2, shadows bit in SSPCON2bits */
#define RCEN                 SSP1CON2bits.RCEN              /* bit 3, shadows bit in SSPCON2bits */
#define ACKEN                SSP1CON2bits.ACKEN             /* bit 4, shadows bit in SSPCON2bits */
#define ACKDT                SSP1CON2bits.ACKDT             /* bit 5, shadows bit in SSPCON2bits */
#define ACKSTAT              SSP1CON2bits.ACKSTAT           /* bit 6, shadows bit in SSPCON2bits */
#define GCEN                 SSP1CON2bits.GCEN              /* bit 7, shadows bit in SSPCON2bits */

#define DHEN                 SSP1CON3bits.DHEN              /* bit 0, shadows bit in SSPCON3bits */
#define AHEN                 SSP1CON3bits.AHEN              /* bit 1, shadows bit in SSPCON3bits */
#define SBCDE                SSP1CON3bits.SBCDE             /* bit 2, shadows bit in SSPCON3bits */
#define SDAHT                SSP1CON3bits.SDAHT             /* bit 3, shadows bit in SSPCON3bits */
#define BOEN                 SSP1CON3bits.BOEN              /* bit 4, shadows bit in SSPCON3bits */
#define SCIE                 SSP1CON3bits.SCIE              /* bit 5, shadows bit in SSPCON3bits */
#define PCIE                 SSP1CON3bits.PCIE              /* bit 6, shadows bit in SSPCON3bits */
#define ACKTIM               SSP1CON3bits.ACKTIM            /* bit 7, shadows bit in SSPCON3bits */

#define BF                   SSP1STATbits.BF                /* bit 0, shadows bit in SSPSTATbits */
#define UA                   SSP1STATbits.UA                /* bit 1, shadows bit in SSPSTATbits */
#define R_NOT_W              SSP1STATbits.R_NOT_W           /* bit 2, shadows bit in SSPSTATbits */
#define S                    SSP1STATbits.S                 /* bit 3, shadows bit in SSPSTATbits */
#define P                    SSP1STATbits.P                 /* bit 4, shadows bit in SSPSTATbits */
#define D_NOT_A              SSP1STATbits.D_NOT_A           /* bit 5, shadows bit in SSPSTATbits */
#define CKE                  SSP1STATbits.CKE               /* bit 6, shadows bit in SSPSTATbits */
#define SMP                  SSP1STATbits.SMP               /* bit 7, shadows bit in SSPSTATbits */

#define C                    STATUSbits.C                   /* bit 0, shadows bit in STATUS_SHADbits */
#define DC                   STATUSbits.DC                  /* bit 1, shadows bit in STATUS_SHADbits */
#define Z                    STATUSbits.Z                   /* bit 2, shadows bit in STATUS_SHADbits */
#define NOT_PD               STATUSbits.NOT_PD              /* bit 3 */
#define NOT_TO               STATUSbits.NOT_TO              /* bit 4 */

#define TMR1ON               T1CONbits.TMR1ON               /* bit 0 */
#define NOT_T1SYNC           T1CONbits.NOT_T1SYNC           /* bit 2 */
#define T1OSCEN              T1CONbits.T1OSCEN              /* bit 3 */
#define T1CKPS0              T1CONbits.T1CKPS0              /* bit 4 */
#define T1CKPS1              T1CONbits.T1CKPS1              /* bit 5 */
#define TMR1CS0              T1CONbits.TMR1CS0              /* bit 6 */
#define TMR1CS1              T1CONbits.TMR1CS1              /* bit 7 */

#define T1GSS0               T1GCONbits.T1GSS0              /* bit 0 */
#define T1GSS1               T1GCONbits.T1GSS1              /* bit 1 */
#define T1GVAL               T1GCONbits.T1GVAL              /* bit 2 */
#define T1GGO_NOT_DONE       T1GCONbits.T1GGO_NOT_DONE      /* bit 3 */
#define T1GSPM               T1GCONbits.T1GSPM              /* bit 4 */
#define T1GTM                T1GCONbits.T1GTM               /* bit 5 */
#define T1GPOL               T1GCONbits.T1GPOL              /* bit 6 */
#define TMR1GE               T1GCONbits.TMR1GE              /* bit 7 */

#define T2CKPS0              T2CONbits.T2CKPS0              /* bit 0 */
#define T2CKPS1              T2CONbits.T2CKPS1              /* bit 1 */
#define TMR2ON               T2CONbits.TMR2ON               /* bit 2 */
#define TOUTPS0              T2CONbits.TOUTPS0              /* bit 3 */
#define TOUTPS1              T2CONbits.TOUTPS1              /* bit 4 */
#define TOUTPS2              T2CONbits.TOUTPS2              /* bit 5 */
#define TOUTPS3              T2CONbits.TOUTPS3              /* bit 6 */

#define TRISA0               TRISAbits.TRISA0               /* bit 0 */
#define TRISA1               TRISAbits.TRISA1               /* bit 1 */
#define TRISA2               TRISAbits.TRISA2               /* bit 2 */
#define TRISA3               TRISAbits.TRISA3               /* bit 3 */
#define TRISA4               TRISAbits.TRISA4               /* bit 4 */
#define TRISA5               TRISAbits.TRISA5               /* bit 5 */

#define TRISB4               TRISBbits.TRISB4               /* bit 4 */
#define TRISB5               TRISBbits.TRISB5               /* bit 5 */
#define TRISB6               TRISBbits.TRISB6               /* bit 6 */
#define TRISB7               TRISBbits.TRISB7               /* bit 7 */

#define TRISC0               TRISCbits.TRISC0               /* bit 0 */
#define TRISC1               TRISCbits.TRISC1               /* bit 1 */
#define TRISC2               TRISCbits.TRISC2               /* bit 2 */
#define TRISC3               TRISCbits.TRISC3               /* bit 3 */
#define TRISC4               TRISCbits.TRISC4               /* bit 4 */
#define TRISC5               TRISCbits.TRISC5               /* bit 5 */
#define TRISC6               TRISCbits.TRISC6               /* bit 6 */
#define TRISC7               TRISCbits.TRISC7               /* bit 7 */

#define TX9D                 TXSTAbits.TX9D                 /* bit 0 */
#define TRMT                 TXSTAbits.TRMT                 /* bit 1 */
#define BRGH                 TXSTAbits.BRGH                 /* bit 2 */
#define SENDB                TXSTAbits.SENDB                /* bit 3 */
#define SYNC                 TXSTAbits.SYNC                 /* bit 4 */
#define TXEN                 TXSTAbits.TXEN                 /* bit 5 */
#define TX9                  TXSTAbits.TX9                  /* bit 6 */
#define CSRC                 TXSTAbits.CSRC                 /* bit 7 */

#define ADDR0                UADDRbits.ADDR0                /* bit 0 */
#define ADDR1                UADDRbits.ADDR1                /* bit 1 */
#define ADDR2                UADDRbits.ADDR2                /* bit 2 */
#define ADDR3                UADDRbits.ADDR3                /* bit 3 */
#define ADDR4                UADDRbits.ADDR4                /* bit 4 */
#define ADDR5                UADDRbits.ADDR5                /* bit 5 */
#define ADDR6                UADDRbits.ADDR6                /* bit 6 */

#define PPB0                 UCFGbits.PPB0                  /* bit 0 */
#define PPB1                 UCFGbits.PPB1                  /* bit 1 */
#define FSEN                 UCFGbits.FSEN                  /* bit 2 */
#define UPUEN                UCFGbits.UPUEN                 /* bit 4 */
#define UTEYE                UCFGbits.UTEYE                 /* bit 7 */

#define SUSPND               UCONbits.SUSPND                /* bit 1 */
#define RESUME               UCONbits.RESUME                /* bit 2 */
#define USBEN                UCONbits.USBEN                 /* bit 3 */
#define PKTDIS               UCONbits.PKTDIS                /* bit 4 */
#define SE0                  UCONbits.SE0                   /* bit 5 */
#define PPBRST               UCONbits.PPBRST                /* bit 6 */

#define PIDEE                UEIEbits.PIDEE                 /* bit 0 */
#define CRC5EE               UEIEbits.CRC5EE                /* bit 1 */
#define CRC16EE              UEIEbits.CRC16EE               /* bit 2 */
#define DFN8EE               UEIEbits.DFN8EE                /* bit 3 */
#define BTOEE                UEIEbits.BTOEE                 /* bit 4 */
#define BTSEE                UEIEbits.BTSEE                 /* bit 7 */

#define PIDEF                UEIRbits.PIDEF                 /* bit 0 */
#define CRC5EF               UEIRbits.CRC5EF                /* bit 1 */
#define CRC16EF              UEIRbits.CRC16EF               /* bit 2 */
#define DFN8EF               UEIRbits.DFN8EF                /* bit 3 */
#define BTOEF                UEIRbits.BTOEF                 /* bit 4 */
#define BTSEF                UEIRbits.BTSEF                 /* bit 7 */

#define EPSTALL              UEP0bits.EPSTALL               /* bit 0, shadows bit in UEP1bits, UEP2bits, UEP3bits, UEP4bits, UEP5bits, UEP6bits, UEP7bits */
#define EPINEN               UEP0bits.EPINEN                /* bit 1, shadows bit in UEP1bits, UEP2bits, UEP3bits, UEP4bits, UEP5bits, UEP6bits, UEP7bits */
#define EPOUTEN              UEP0bits.EPOUTEN               /* bit 2, shadows bit in UEP1bits, UEP2bits, UEP3bits, UEP4bits, UEP5bits, UEP6bits, UEP7bits */
#define EPCONDIS             UEP0bits.EPCONDIS              /* bit 3, shadows bit in UEP1bits, UEP2bits, UEP3bits, UEP4bits, UEP5bits, UEP6bits, UEP7bits */
#define EPHSHK               UEP0bits.EPHSHK                /* bit 4, shadows bit in UEP1bits, UEP2bits, UEP3bits, UEP4bits, UEP5bits, UEP6bits, UEP7bits */

#define FRM8                 UFRMHbits.FRM8                 /* bit 0 */
#define FRM9                 UFRMHbits.FRM9                 /* bit 1 */
#define FRM10                UFRMHbits.FRM10                /* bit 2 */

#define FRM0                 UFRMLbits.FRM0                 /* bit 0 */
#define FRM1                 UFRMLbits.FRM1                 /* bit 1 */
#define FRM2                 UFRMLbits.FRM2                 /* bit 2 */
#define FRM3                 UFRMLbits.FRM3                 /* bit 3 */
#define FRM4                 UFRMLbits.FRM4                 /* bit 4 */
#define FRM5                 UFRMLbits.FRM5                 /* bit 5 */
#define FRM6                 UFRMLbits.FRM6                 /* bit 6 */
#define FRM7                 UFRMLbits.FRM7                 /* bit 7 */

#define URSTIE               UIEbits.URSTIE                 /* bit 0 */
#define UERRIE               UIEbits.UERRIE                 /* bit 1 */
#define ACTVIE               UIEbits.ACTVIE                 /* bit 2 */
#define TRNIE                UIEbits.TRNIE                  /* bit 3 */
#define IDLEIE               UIEbits.IDLEIE                 /* bit 4 */
#define STALLIE              UIEbits.STALLIE                /* bit 5 */
#define SOFIE                UIEbits.SOFIE                  /* bit 6 */

#define URSTIF               UIRbits.URSTIF                 /* bit 0 */
#define UERRIF               UIRbits.UERRIF                 /* bit 1 */
#define ACTVIF               UIRbits.ACTVIF                 /* bit 2 */
#define TRNIF                UIRbits.TRNIF                  /* bit 3 */
#define IDLEIF               UIRbits.IDLEIF                 /* bit 4 */
#define STALLIF              UIRbits.STALLIF                /* bit 5 */
#define SOFIF                UIRbits.SOFIF                  /* bit 6 */

#define PPBI                 USTATbits.PPBI                 /* bit 1 */
#define DIR                  USTATbits.DIR                  /* bit 2 */

#define VREGPM0              VREGCONbits.VREGPM0            /* bit 0 */
#define VREGPM1              VREGCONbits.VREGPM1            /* bit 1 */

#define SWDTEN               WDTCONbits.SWDTEN              /* bit 0 */
#define WDTPS0               WDTCONbits.WDTPS0              /* bit 1 */
#define WDTPS1               WDTCONbits.WDTPS1              /* bit 2 */
#define WDTPS2               WDTCONbits.WDTPS2              /* bit 3 */
#define WDTPS3               WDTCONbits.WDTPS3              /* bit 4 */
#define WDTPS4               WDTCONbits.WDTPS4              /* bit 5 */

#define WPUA0                WPUAbits.WPUA0                 /* bit 0 */
#define WPUA1                WPUAbits.WPUA1                 /* bit 1 */
#define WPUA2                WPUAbits.WPUA2                 /* bit 2 */
#define WPUA3                WPUAbits.WPUA3                 /* bit 3 */
#define WPUA4                WPUAbits.WPUA4                 /* bit 4 */
#define WPUA5                WPUAbits.WPUA5                 /* bit 5 */

#define WPUB4                WPUBbits.WPUB4                 /* bit 4 */
#define WPUB5                WPUBbits.WPUB5                 /* bit 5 */
#define WPUB6                WPUBbits.WPUB6                 /* bit 6 */
#define WPUB7                WPUBbits.WPUB7                 /* bit 7 */
#endif /* NO_BIT_DEFINES */

#endif
