/* Based on CPU DB MC68HC908QC16_28_SOIC, version 2.87.103 (RegistersPrg V2.30) */ /* ** ################################################################### ** Filename : mc68hc908qc4.h ** Processor : MC68HC908QC4CDZE ** FileFormat: V2.30 ** DataSheet : MC68HC908QC16 Rev. 3 04/200706 ** Compiler : CodeWarrior compiler ** Date/Time : 11.9.2009, 14:09 ** Abstract : ** This header implements the mapping of I/O devices. ** ** Copyright : 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved. ** ** http : www.freescale.com ** mail : support@freescale.com ** ** CPU Registers Revisions: ** - none ** ** File-Format-Revisions: ** - 14.11.2005, V2.00 : ** - Deprecated symbols added for backward compatibility (section at the end of this file) ** - 15.11.2005, V2.01 : ** - Changes have not affected this file (because they are related to another family) ** - 17.12.2005, V2.02 : ** - Arrays (symbols xx_ARR) are defined as pointer to volatile, see issue #2778 ** - 16.01.2006, V2.03 : ** - Fixed declaration of non volatile registers. Now it does not require (but allows) their initialization, see issue #2920. ** - "volatile" modifier removed from declaration of non volatile registers (that contain modifier "const") ** - 08.03.2006, V2.04 : ** - Support for bit(s) names duplicated with any register name in .h header files ** - 24.03.2006, V2.05 : ** - Changes have not affected this file (because they are related to another family) ** - 26.04.2006, V2.06 : ** - Absolute assembly supported (depreciated symbols are not defined) ** - 27.04.2006, V2.07 : ** - Fixed macro __RESET_WATCHDOG for HCS12, HCS12X ,HCS08 DZ and HCS08 EN derivatives (write 0x55,0xAA). ** - 07.06.2006, V2.08 : ** - For .inc files added constants "RAMStart" and "RAMEnd" even there is only Z_RAM. ** - 03.07.2006, V2.09 : ** - Flash commands constants supported ** - 27.10.2006, V2.10 : ** - __RESET_WATCHDOG improved formating and re-definition ** - 23.11.2006, V2.11 : ** - Changes have not affected this file (because they are related to another family) ** - 22.01.2007, V2.12 : ** - Changes have not affected this file (because they are related to another family) ** - 01.03.2007, V2.13 : ** - Flash commands constants values converted to HEX format ** - 02.03.2007, V2.14 : ** - Interrupt vector numbers added into .H, see VectorNumber_* ** - 26.03.2007, V2.15 : ** - Changes have not affected this file (because they are related to another family) ** - 10.05.2007, V2.16 : ** - Fixed flash commands definition for ColdFireV1 assembler (equ -> .equ) ** - 05.06.2007, V2.17 : ** - Changes have not affected this file (because they are related to another family) ** - 19.07.2007, V2.18 : ** - Improved number of blanked lines inside register structures ** - 06.08.2007, V2.19 : ** - CPUDB revisions generated ahead of the file-format revisions. ** - 11.09.2007, V2.20 : ** - Added comment about initialization of unbonded pins. ** - 02.01.2008, V2.21 : ** - Changes have not affected this file (because they are related to another family) ** - 13.02.2008, V2.22 : ** - Changes have not affected this file (because they are related to another family) ** - 20.02.2008, V2.23 : ** - Changes have not affected this file (because they are related to another family) ** - 03.07.2008, V2.24 : ** - Added support for bits with name starting with number (like "1HZ") ** - 28.11.2008, V2.25 : ** - StandBy RAM array declaration for ANSI-C added ** - 1.12.2008, V2.26 : ** - Duplication of bit (or bit-group) name with register name is not marked as a problem, is register is internal only and it is not displayed in I/O map. ** - 17.3.2009, V2.27 : ** - Merged bit-group is not generated, if the name matches with another bit name in the register ** - 6.4.2009, V2.28 : ** - Fixed generation of merged bits for bit-groups with a digit at the end, if group-name is defined in CPUDB ** - 3.8.2009, V2.29 : ** - If there is just one bits group matching register name, single bits are not generated ** - 10.9.2009, V2.30 : ** - Fixed generation of registers arrays. ** ** Not all general-purpose I/O pins are available on all packages or on all mask sets of a specific ** derivative device. To avoid extra current drain from floating input pins, the user’s reset ** initialization routine in the application program must either enable on-chip pull-up devices ** or change the direction of unconnected pins to outputs so the pins do not float. ** ################################################################### */ #ifndef _MC68HC908QC4_H #define _MC68HC908QC4_H /* Types definition */ typedef unsigned char byte; typedef unsigned int word; typedef unsigned long dword; typedef unsigned long dlong[2]; /* Watchdog reset macro */ #ifndef __RESET_WATCHDOG #ifdef _lint #define __RESET_WATCHDOG() /* empty */ #else #define __RESET_WATCHDOG() {asm sta COPCTL;} #endif #endif /* __RESET_WATCHDOG */ #define REG_BASE 0x0000 /* Base address for the I/O register block */ #pragma MESSAGE DISABLE C1106 /* WARNING C1106: Non-standard bitfield type */ /**************** interrupt vector numbers ****************/ #define VectorNumber_PWU 20 #define VectorNumber_TIM2Ovr 19 #define VectorNumber_TIM2CH1 18 #define VectorNumber_TIM2CH0 17 #define VectorNumber_ADC 16 #define VectorNumber_KBI 15 #define VectorNumber_SPITransmit 14 #define VectorNumber_SPIReceive 13 #define VectorNumber_SCITransmit 12 #define VectorNumber_SCIReceive 11 #define VectorNumber_SCIError 10 #define VectorNumber_Reserved11 9 #define VectorNumber_TIM1CH3 8 #define VectorNumber_TIM1CH2 7 #define VectorNumber_TIM1Ovr 6 #define VectorNumber_TIM1CH1 5 #define VectorNumber_TIM1CH0 4 #define VectorNumber_Reserved17 3 #define VectorNumber_IRQ 2 #define VectorNumber_SWI 1 #define VectorNumber_RESET 0 /**************** interrupt vector table ****************/ #define INT_PWU 0x0000FFD6 #define INT_TIM2Ovr 0x0000FFD8 #define INT_TIM2CH1 0x0000FFDA #define INT_TIM2CH0 0x0000FFDC #define INT_ADC 0x0000FFDE #define INT_KBI 0x0000FFE0 #define INT_SPITransmit 0x0000FFE2 #define INT_SPIReceive 0x0000FFE4 #define INT_SCITransmit 0x0000FFE6 #define INT_SCIReceive 0x0000FFE8 #define INT_SCIError 0x0000FFEA #define Reserved11 0x0000FFEC #define INT_TIM1CH3 0x0000FFEE #define INT_TIM1CH2 0x0000FFF0 #define INT_TIM1Ovr 0x0000FFF2 #define INT_TIM1CH1 0x0000FFF4 #define INT_TIM1CH0 0x0000FFF6 #define Reserved17 0x0000FFF8 #define INT_IRQ 0x0000FFFA #define INT_SWI 0x0000FFFC #define INT_RESET 0x0000FFFE /**************** registers I/O map ****************/ /*** PTA - Port A Data Register; 0x00000000 ***/ typedef union { byte Byte; struct { byte PTA0 :1; /* Port A Data Bit 0 */ byte PTA1 :1; /* Port A Data Bit 1 */ byte PTA2 :1; /* Port A Data Bit 2 */ byte PTA3 :1; /* Port A Data Bit 3 */ byte PTA4 :1; /* Port A Data Bit 4 */ byte PTA5 :1; /* Port A Data Bit 5 */ byte :1; byte :1; } Bits; struct { byte grpPTA :6; byte :1; byte :1; } MergedBits; } PTASTR; extern volatile PTASTR _PTA @0x00000000; #define PTA _PTA.Byte #define PTA_PTA0 _PTA.Bits.PTA0 #define PTA_PTA1 _PTA.Bits.PTA1 #define PTA_PTA2 _PTA.Bits.PTA2 #define PTA_PTA3 _PTA.Bits.PTA3 #define PTA_PTA4 _PTA.Bits.PTA4 #define PTA_PTA5 _PTA.Bits.PTA5 #define PTA_PTA _PTA.MergedBits.grpPTA #define PTA_PTA0_MASK 1 #define PTA_PTA1_MASK 2 #define PTA_PTA2_MASK 4 #define PTA_PTA3_MASK 8 #define PTA_PTA4_MASK 16 #define PTA_PTA5_MASK 32 #define PTA_PTA_MASK 63 #define PTA_PTA_BITNUM 0 /*** PTB - Port B Data Register; 0x00000001 ***/ typedef union { byte Byte; struct { byte PTB0 :1; /* Port B Data Bit 0 */ byte PTB1 :1; /* Port B Data Bit 1 */ byte PTB2 :1; /* Port B Data Bit 2 */ byte PTB3 :1; /* Port B Data Bit 3 */ byte PTB4 :1; /* Port B Data Bit 4 */ byte PTB5 :1; /* Port B Data Bit 5 */ byte PTB6 :1; /* Port B Data Bit 6 */ byte PTB7 :1; /* Port B Data Bit 7 */ } Bits; } PTBSTR; extern volatile PTBSTR _PTB @0x00000001; #define PTB _PTB.Byte #define PTB_PTB0 _PTB.Bits.PTB0 #define PTB_PTB1 _PTB.Bits.PTB1 #define PTB_PTB2 _PTB.Bits.PTB2 #define PTB_PTB3 _PTB.Bits.PTB3 #define PTB_PTB4 _PTB.Bits.PTB4 #define PTB_PTB5 _PTB.Bits.PTB5 #define PTB_PTB6 _PTB.Bits.PTB6 #define PTB_PTB7 _PTB.Bits.PTB7 #define PTB_PTB0_MASK 1 #define PTB_PTB1_MASK 2 #define PTB_PTB2_MASK 4 #define PTB_PTB3_MASK 8 #define PTB_PTB4_MASK 16 #define PTB_PTB5_MASK 32 #define PTB_PTB6_MASK 64 #define PTB_PTB7_MASK 128 /*** PTC - Port C Data Register; 0x00000002 ***/ typedef union { byte Byte; struct { byte PTC0 :1; /* Port C Data Bit 0 */ byte PTC1 :1; /* Port C Data Bit 1 */ byte PTC2 :1; /* Port C Data Bit 2 */ byte PTC3 :1; /* Port C Data Bit 3 */ byte :1; byte :1; byte :1; byte :1; } Bits; struct { byte grpPTC :4; byte :1; byte :1; byte :1; byte :1; } MergedBits; } PTCSTR; extern volatile PTCSTR _PTC @0x00000002; #define PTC _PTC.Byte #define PTC_PTC0 _PTC.Bits.PTC0 #define PTC_PTC1 _PTC.Bits.PTC1 #define PTC_PTC2 _PTC.Bits.PTC2 #define PTC_PTC3 _PTC.Bits.PTC3 #define PTC_PTC _PTC.MergedBits.grpPTC #define PTC_PTC0_MASK 1 #define PTC_PTC1_MASK 2 #define PTC_PTC2_MASK 4 #define PTC_PTC3_MASK 8 #define PTC_PTC_MASK 15 #define PTC_PTC_BITNUM 0 /*** PTD - Port D Data Register; 0x00000003 ***/ typedef union { byte Byte; struct { byte PTD0 :1; /* Port D Data Bit 0 */ byte PTD1 :1; /* Port D Data Bit 1 */ byte PTD2 :1; /* Port D Data Bit 2 */ byte PTD3 :1; /* Port D Data Bit 3 */ byte PTD4 :1; /* Port D Data Bit 4 */ byte PTD5 :1; /* Port D Data Bit 5 */ byte PTD6 :1; /* Port D Data Bit 6 */ byte PTD7 :1; /* Port D Data Bit 7 */ } Bits; } PTDSTR; extern volatile PTDSTR _PTD @0x00000003; #define PTD _PTD.Byte #define PTD_PTD0 _PTD.Bits.PTD0 #define PTD_PTD1 _PTD.Bits.PTD1 #define PTD_PTD2 _PTD.Bits.PTD2 #define PTD_PTD3 _PTD.Bits.PTD3 #define PTD_PTD4 _PTD.Bits.PTD4 #define PTD_PTD5 _PTD.Bits.PTD5 #define PTD_PTD6 _PTD.Bits.PTD6 #define PTD_PTD7 _PTD.Bits.PTD7 #define PTD_PTD0_MASK 1 #define PTD_PTD1_MASK 2 #define PTD_PTD2_MASK 4 #define PTD_PTD3_MASK 8 #define PTD_PTD4_MASK 16 #define PTD_PTD5_MASK 32 #define PTD_PTD6_MASK 64 #define PTD_PTD7_MASK 128 /*** DDRA - Data Direction Register A; 0x00000004 ***/ typedef union { byte Byte; struct { byte DDRA0 :1; /* Data Direction Register A Bit 0 */ byte DDRA1 :1; /* Data Direction Register A Bit 1 */ byte :1; byte DDRA3 :1; /* Data Direction Register A Bit 3 */ byte DDRA4 :1; /* Data Direction Register A Bit 4 */ byte DDRA5 :1; /* Data Direction Register A Bit 5 */ byte :1; byte :1; } Bits; struct { byte grpDDRA :2; byte :1; byte grpDDRA_3 :3; byte :1; byte :1; } MergedBits; } DDRASTR; extern volatile DDRASTR _DDRA @0x00000004; #define DDRA _DDRA.Byte #define DDRA_DDRA0 _DDRA.Bits.DDRA0 #define DDRA_DDRA1 _DDRA.Bits.DDRA1 #define DDRA_DDRA3 _DDRA.Bits.DDRA3 #define DDRA_DDRA4 _DDRA.Bits.DDRA4 #define DDRA_DDRA5 _DDRA.Bits.DDRA5 #define DDRA_DDRA _DDRA.MergedBits.grpDDRA #define DDRA_DDRA_3 _DDRA.MergedBits.grpDDRA_3 #define DDRA_DDRA0_MASK 1 #define DDRA_DDRA1_MASK 2 #define DDRA_DDRA3_MASK 8 #define DDRA_DDRA4_MASK 16 #define DDRA_DDRA5_MASK 32 #define DDRA_DDRA_MASK 3 #define DDRA_DDRA_BITNUM 0 #define DDRA_DDRA_3_MASK 56 #define DDRA_DDRA_3_BITNUM 3 /*** DDRB - Data Direction Register B; 0x00000005 ***/ typedef union { byte Byte; struct { byte DDRB0 :1; /* Data Direction Register B Bit 0 */ byte DDRB1 :1; /* Data Direction Register B Bit 1 */ byte DDRB2 :1; /* Data Direction Register B Bit 2 */ byte DDRB3 :1; /* Data Direction Register B Bit 3 */ byte DDRB4 :1; /* Data Direction Register B Bit 4 */ byte DDRB5 :1; /* Data Direction Register B Bit 5 */ byte DDRB6 :1; /* Data Direction Register B Bit 6 */ byte DDRB7 :1; /* Data Direction Register B Bit 7 */ } Bits; } DDRBSTR; extern volatile DDRBSTR _DDRB @0x00000005; #define DDRB _DDRB.Byte #define DDRB_DDRB0 _DDRB.Bits.DDRB0 #define DDRB_DDRB1 _DDRB.Bits.DDRB1 #define DDRB_DDRB2 _DDRB.Bits.DDRB2 #define DDRB_DDRB3 _DDRB.Bits.DDRB3 #define DDRB_DDRB4 _DDRB.Bits.DDRB4 #define DDRB_DDRB5 _DDRB.Bits.DDRB5 #define DDRB_DDRB6 _DDRB.Bits.DDRB6 #define DDRB_DDRB7 _DDRB.Bits.DDRB7 #define DDRB_DDRB0_MASK 1 #define DDRB_DDRB1_MASK 2 #define DDRB_DDRB2_MASK 4 #define DDRB_DDRB3_MASK 8 #define DDRB_DDRB4_MASK 16 #define DDRB_DDRB5_MASK 32 #define DDRB_DDRB6_MASK 64 #define DDRB_DDRB7_MASK 128 /*** DDRC - Data Direction Register C; 0x00000006 ***/ typedef union { byte Byte; struct { byte DDRC0 :1; /* Data Direction Register C Bit 0 */ byte DDRC1 :1; /* Data Direction Register C Bit 1 */ byte DDRC2 :1; /* Data Direction Register C Bit 2 */ byte :1; byte :1; byte :1; byte :1; byte :1; } Bits; struct { byte grpDDRC :3; byte :1; byte :1; byte :1; byte :1; byte :1; } MergedBits; } DDRCSTR; extern volatile DDRCSTR _DDRC @0x00000006; #define DDRC _DDRC.Byte #define DDRC_DDRC0 _DDRC.Bits.DDRC0 #define DDRC_DDRC1 _DDRC.Bits.DDRC1 #define DDRC_DDRC2 _DDRC.Bits.DDRC2 #define DDRC_DDRC _DDRC.MergedBits.grpDDRC #define DDRC_DDRC0_MASK 1 #define DDRC_DDRC1_MASK 2 #define DDRC_DDRC2_MASK 4 #define DDRC_DDRC_MASK 7 #define DDRC_DDRC_BITNUM 0 /*** DDRD - Data Direction Register D; 0x00000007 ***/ typedef union { byte Byte; struct { byte DDRD0 :1; /* Data Direction Register D Bit 0 */ byte DDRD1 :1; /* Data Direction Register D Bit 1 */ byte DDRD2 :1; /* Data Direction Register D Bit 2 */ byte DDRD3 :1; /* Data Direction Register D Bit 3 */ byte DDRD4 :1; /* Data Direction Register D Bit 4 */ byte DDRD5 :1; /* Data Direction Register D Bit 5 */ byte DDRD6 :1; /* Data Direction Register D Bit 6 */ byte DDRD7 :1; /* Data Direction Register D Bit 7 */ } Bits; } DDRDSTR; extern volatile DDRDSTR _DDRD @0x00000007; #define DDRD _DDRD.Byte #define DDRD_DDRD0 _DDRD.Bits.DDRD0 #define DDRD_DDRD1 _DDRD.Bits.DDRD1 #define DDRD_DDRD2 _DDRD.Bits.DDRD2 #define DDRD_DDRD3 _DDRD.Bits.DDRD3 #define DDRD_DDRD4 _DDRD.Bits.DDRD4 #define DDRD_DDRD5 _DDRD.Bits.DDRD5 #define DDRD_DDRD6 _DDRD.Bits.DDRD6 #define DDRD_DDRD7 _DDRD.Bits.DDRD7 #define DDRD_DDRD0_MASK 1 #define DDRD_DDRD1_MASK 2 #define DDRD_DDRD2_MASK 4 #define DDRD_DDRD3_MASK 8 #define DDRD_DDRD4_MASK 16 #define DDRD_DDRD5_MASK 32 #define DDRD_DDRD6_MASK 64 #define DDRD_DDRD7_MASK 128 /*** PTCPUE - Port C Input Pull-Up Enable Register; 0x00000009 ***/ typedef union { byte Byte; struct { byte PTCPUE0 :1; /* Pull-Up Enable bit 0, Port C */ byte PTCPUE1 :1; /* Pull-Up Enable bit 1, Port C */ byte PTCPUE2 :1; /* Pull-Up Enable bit 2, Port C */ byte PTCPUE3 :1; /* Pull-Up Enable bit 3, Port C */ byte :1; byte :1; byte :1; byte :1; } Bits; struct { byte grpPTCPUE :4; byte :1; byte :1; byte :1; byte :1; } MergedBits; } PTCPUESTR; extern volatile PTCPUESTR _PTCPUE @0x00000009; #define PTCPUE _PTCPUE.Byte #define PTCPUE_PTCPUE0 _PTCPUE.Bits.PTCPUE0 #define PTCPUE_PTCPUE1 _PTCPUE.Bits.PTCPUE1 #define PTCPUE_PTCPUE2 _PTCPUE.Bits.PTCPUE2 #define PTCPUE_PTCPUE3 _PTCPUE.Bits.PTCPUE3 #define PTCPUE_PTCPUE _PTCPUE.MergedBits.grpPTCPUE #define PTCPUE_PTCPUE0_MASK 1 #define PTCPUE_PTCPUE1_MASK 2 #define PTCPUE_PTCPUE2_MASK 4 #define PTCPUE_PTCPUE3_MASK 8 #define PTCPUE_PTCPUE_MASK 15 #define PTCPUE_PTCPUE_BITNUM 0 /*** PTDPUE - Port D Input Pull-Up Enable Register; 0x0000000A ***/ typedef union { byte Byte; struct { byte PTDPUE0 :1; /* Pull-Up Enable bit 0, Port D */ byte PTDPUE1 :1; /* Pull-Up Enable bit 1, Port D */ byte PTDPUE2 :1; /* Pull-Up Enable bit 2, Port D */ byte PTDPUE3 :1; /* Pull-Up Enable bit 3, Port D */ byte PTDPUE4 :1; /* Pull-Up Enable bit 4, Port D */ byte PTDPUE5 :1; /* Pull-Up Enable bit 5, Port D */ byte PTDPUE6 :1; /* Pull-Up Enable bit 6, Port D */ byte PTDPUE7 :1; /* Pull-Up Enable bit 7, Port D */ } Bits; } PTDPUESTR; extern volatile PTDPUESTR _PTDPUE @0x0000000A; #define PTDPUE _PTDPUE.Byte #define PTDPUE_PTDPUE0 _PTDPUE.Bits.PTDPUE0 #define PTDPUE_PTDPUE1 _PTDPUE.Bits.PTDPUE1 #define PTDPUE_PTDPUE2 _PTDPUE.Bits.PTDPUE2 #define PTDPUE_PTDPUE3 _PTDPUE.Bits.PTDPUE3 #define PTDPUE_PTDPUE4 _PTDPUE.Bits.PTDPUE4 #define PTDPUE_PTDPUE5 _PTDPUE.Bits.PTDPUE5 #define PTDPUE_PTDPUE6 _PTDPUE.Bits.PTDPUE6 #define PTDPUE_PTDPUE7 _PTDPUE.Bits.PTDPUE7 #define PTDPUE_PTDPUE0_MASK 1 #define PTDPUE_PTDPUE1_MASK 2 #define PTDPUE_PTDPUE2_MASK 4 #define PTDPUE_PTDPUE3_MASK 8 #define PTDPUE_PTDPUE4_MASK 16 #define PTDPUE_PTDPUE5_MASK 32 #define PTDPUE_PTDPUE6_MASK 64 #define PTDPUE_PTDPUE7_MASK 128 /*** PTAPUE - Port A Input Pull-Up Enable Register; 0x0000000B ***/ typedef union { byte Byte; struct { byte PTAPUE0 :1; /* Pull-Up Enable bit 0, Port A */ byte PTAPUE1 :1; /* Pull-Up Enable bit 1, Port A */ byte PTAPUE2 :1; /* Pull-Up Enable bit 2, Port A */ byte PTAPUE3 :1; /* Pull-Up Enable bit 3, Port A */ byte PTAPUE4 :1; /* Pull-Up Enable bit 4, Port A */ byte PTAPUE5 :1; /* Pull-Up Enable bit 5, Port A */ byte :1; byte OSC2EN :1; /* Enable PTA4 on OSC2 Pin */ } Bits; struct { byte grpPTAPUE :6; byte :1; byte :1; } MergedBits; } PTAPUESTR; extern volatile PTAPUESTR _PTAPUE @0x0000000B; #define PTAPUE _PTAPUE.Byte #define PTAPUE_PTAPUE0 _PTAPUE.Bits.PTAPUE0 #define PTAPUE_PTAPUE1 _PTAPUE.Bits.PTAPUE1 #define PTAPUE_PTAPUE2 _PTAPUE.Bits.PTAPUE2 #define PTAPUE_PTAPUE3 _PTAPUE.Bits.PTAPUE3 #define PTAPUE_PTAPUE4 _PTAPUE.Bits.PTAPUE4 #define PTAPUE_PTAPUE5 _PTAPUE.Bits.PTAPUE5 #define PTAPUE_OSC2EN _PTAPUE.Bits.OSC2EN #define PTAPUE_PTAPUE _PTAPUE.MergedBits.grpPTAPUE #define PTAPUE_PTAPUE0_MASK 1 #define PTAPUE_PTAPUE1_MASK 2 #define PTAPUE_PTAPUE2_MASK 4 #define PTAPUE_PTAPUE3_MASK 8 #define PTAPUE_PTAPUE4_MASK 16 #define PTAPUE_PTAPUE5_MASK 32 #define PTAPUE_OSC2EN_MASK 128 #define PTAPUE_PTAPUE_MASK 63 #define PTAPUE_PTAPUE_BITNUM 0 /*** PTBPUE - Port B Input Pull-Up Enable Register; 0x0000000C ***/ typedef union { byte Byte; struct { byte PTBPUE0 :1; /* Pull-Up Enable bit 0, Port B */ byte PTBPUE1 :1; /* Pull-Up Enable bit 1, Port B */ byte PTBPUE2 :1; /* Pull-Up Enable bit 2, Port B */ byte PTBPUE3 :1; /* Pull-Up Enable bit 3, Port B */ byte PTBPUE4 :1; /* Pull-Up Enable bit 4, Port B */ byte PTBPUE5 :1; /* Pull-Up Enable bit 5, Port B */ byte PTBPUE6 :1; /* Pull-Up Enable bit 6, Port B */ byte PTBPUE7 :1; /* Pull-Up Enable bit 7, Port B */ } Bits; } PTBPUESTR; extern volatile PTBPUESTR _PTBPUE @0x0000000C; #define PTBPUE _PTBPUE.Byte #define PTBPUE_PTBPUE0 _PTBPUE.Bits.PTBPUE0 #define PTBPUE_PTBPUE1 _PTBPUE.Bits.PTBPUE1 #define PTBPUE_PTBPUE2 _PTBPUE.Bits.PTBPUE2 #define PTBPUE_PTBPUE3 _PTBPUE.Bits.PTBPUE3 #define PTBPUE_PTBPUE4 _PTBPUE.Bits.PTBPUE4 #define PTBPUE_PTBPUE5 _PTBPUE.Bits.PTBPUE5 #define PTBPUE_PTBPUE6 _PTBPUE.Bits.PTBPUE6 #define PTBPUE_PTBPUE7 _PTBPUE.Bits.PTBPUE7 #define PTBPUE_PTBPUE0_MASK 1 #define PTBPUE_PTBPUE1_MASK 2 #define PTBPUE_PTBPUE2_MASK 4 #define PTBPUE_PTBPUE3_MASK 8 #define PTBPUE_PTBPUE4_MASK 16 #define PTBPUE_PTBPUE5_MASK 32 #define PTBPUE_PTBPUE6_MASK 64 #define PTBPUE_PTBPUE7_MASK 128 /*** SPCR - SPI Control Register; 0x0000000D ***/ typedef union { byte Byte; struct { byte SPTIE :1; /* SPI Transmit Interrupt Enable Bit */ byte SPE :1; /* SPI Enable Bit */ byte SPWOM :1; /* SPI Wired-OR Mode Bit */ byte CPHA :1; /* Clock Phase Bit */ byte CPOL :1; /* Clock Polarity Bit */ byte SPMSTR :1; /* SPI Master Bit */ byte :1; byte SPRIE :1; /* SPI Receiver Interrupt Enable Bit */ } Bits; } SPCRSTR; extern volatile SPCRSTR _SPCR @0x0000000D; #define SPCR _SPCR.Byte #define SPCR_SPTIE _SPCR.Bits.SPTIE #define SPCR_SPE _SPCR.Bits.SPE #define SPCR_SPWOM _SPCR.Bits.SPWOM #define SPCR_CPHA _SPCR.Bits.CPHA #define SPCR_CPOL _SPCR.Bits.CPOL #define SPCR_SPMSTR _SPCR.Bits.SPMSTR #define SPCR_SPRIE _SPCR.Bits.SPRIE #define SPCR_SPTIE_MASK 1 #define SPCR_SPE_MASK 2 #define SPCR_SPWOM_MASK 4 #define SPCR_CPHA_MASK 8 #define SPCR_CPOL_MASK 16 #define SPCR_SPMSTR_MASK 32 #define SPCR_SPRIE_MASK 128 /*** SPSCR - SPI Status and Control Register; 0x0000000E ***/ typedef union { byte Byte; struct { byte SPR0 :1; /* SPI Baud Rate Select Bit 0 */ byte SPR1 :1; /* SPI Baud Rate Select Bit 1 */ byte MODFEN :1; /* Mode Fault Enable Bit */ byte SPTE :1; /* SPI Transmitter Empty Bit */ byte MODF :1; /* Mode Fault Bit */ byte OVRF :1; /* Overflow Bit */ byte ERRIE :1; /* Error Interrupt Enable Bit */ byte SPRF :1; /* SPI Receiver Full Bit */ } Bits; struct { byte grpSPR :2; byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; } MergedBits; } SPSCRSTR; extern volatile SPSCRSTR _SPSCR @0x0000000E; #define SPSCR _SPSCR.Byte #define SPSCR_SPR0 _SPSCR.Bits.SPR0 #define SPSCR_SPR1 _SPSCR.Bits.SPR1 #define SPSCR_MODFEN _SPSCR.Bits.MODFEN #define SPSCR_SPTE _SPSCR.Bits.SPTE #define SPSCR_MODF _SPSCR.Bits.MODF #define SPSCR_OVRF _SPSCR.Bits.OVRF #define SPSCR_ERRIE _SPSCR.Bits.ERRIE #define SPSCR_SPRF _SPSCR.Bits.SPRF #define SPSCR_SPR _SPSCR.MergedBits.grpSPR #define SPSCR_SPR0_MASK 1 #define SPSCR_SPR1_MASK 2 #define SPSCR_MODFEN_MASK 4 #define SPSCR_SPTE_MASK 8 #define SPSCR_MODF_MASK 16 #define SPSCR_OVRF_MASK 32 #define SPSCR_ERRIE_MASK 64 #define SPSCR_SPRF_MASK 128 #define SPSCR_SPR_MASK 3 #define SPSCR_SPR_BITNUM 0 /*** SPDR - SPI Data Register; 0x0000000F ***/ typedef union { byte Byte; struct { byte R0_T0 :1; /* Receive/Transmit Data Bit 0 */ byte R1_T1 :1; /* Receive/Transmit Data Bit 1 */ byte R2_T2 :1; /* Receive/Transmit Data Bit 2 */ byte R3_T3 :1; /* Receive/Transmit Data Bit 3 */ byte R4_T4 :1; /* Receive/Transmit Data Bit 4 */ byte R5_T5 :1; /* Receive/Transmit Data Bit 5 */ byte R6_T6 :1; /* Receive/Transmit Data Bit 6 */ byte R7_T7 :1; /* Receive/Transmit Data Bit 7 */ } Bits; } SPDRSTR; extern volatile SPDRSTR _SPDR @0x0000000F; #define SPDR _SPDR.Byte #define SPDR_R0_T0 _SPDR.Bits.R0_T0 #define SPDR_R1_T1 _SPDR.Bits.R1_T1 #define SPDR_R2_T2 _SPDR.Bits.R2_T2 #define SPDR_R3_T3 _SPDR.Bits.R3_T3 #define SPDR_R4_T4 _SPDR.Bits.R4_T4 #define SPDR_R5_T5 _SPDR.Bits.R5_T5 #define SPDR_R6_T6 _SPDR.Bits.R6_T6 #define SPDR_R7_T7 _SPDR.Bits.R7_T7 #define SPDR_R0_T0_MASK 1 #define SPDR_R1_T1_MASK 2 #define SPDR_R2_T2_MASK 4 #define SPDR_R3_T3_MASK 8 #define SPDR_R4_T4_MASK 16 #define SPDR_R5_T5_MASK 32 #define SPDR_R6_T6_MASK 64 #define SPDR_R7_T7_MASK 128 /*** SCC1 - ESCI Control Register 1; 0x00000010 ***/ typedef union { byte Byte; struct { byte PTY :1; /* Parity Bit */ byte PEN :1; /* Parity Enable Bit */ byte ILTY :1; /* Idle Line Type Bit */ byte WAKE :1; /* Wakeup Condition Bit */ byte M :1; /* Mode (Character Length) Bit */ byte TXINV :1; /* Transmit Inversion Bit */ byte ENSCI :1; /* Enable ESCI Bit */ byte LOOPS :1; /* Loop Mode Select Bit */ } Bits; } SCC1STR; extern volatile SCC1STR _SCC1 @0x00000010; #define SCC1 _SCC1.Byte #define SCC1_PTY _SCC1.Bits.PTY #define SCC1_PEN _SCC1.Bits.PEN #define SCC1_ILTY _SCC1.Bits.ILTY #define SCC1_WAKE _SCC1.Bits.WAKE #define SCC1_M _SCC1.Bits.M #define SCC1_TXINV _SCC1.Bits.TXINV #define SCC1_ENSCI _SCC1.Bits.ENSCI #define SCC1_LOOPS _SCC1.Bits.LOOPS #define SCC1_PTY_MASK 1 #define SCC1_PEN_MASK 2 #define SCC1_ILTY_MASK 4 #define SCC1_WAKE_MASK 8 #define SCC1_M_MASK 16 #define SCC1_TXINV_MASK 32 #define SCC1_ENSCI_MASK 64 #define SCC1_LOOPS_MASK 128 /*** SCC2 - ESCI Control Register 2; 0x00000011 ***/ typedef union { byte Byte; struct { byte SBK :1; /* Send Break Bit */ byte RWU :1; /* Receiver Wakeup Bit */ byte RE :1; /* Receiver Enable Bit */ byte TE :1; /* Transmitter Enable Bit */ byte ILIE :1; /* Idle Line Interrupt Enable Bit */ byte SCRIE :1; /* ESCI Receive Interrupt Enable Bit */ byte TCIE :1; /* Transmission Complete Interrupt Enable Bit */ byte SCTIE :1; /* ESCI Transmit Interrupt Enable Bit */ } Bits; } SCC2STR; extern volatile SCC2STR _SCC2 @0x00000011; #define SCC2 _SCC2.Byte #define SCC2_SBK _SCC2.Bits.SBK #define SCC2_RWU _SCC2.Bits.RWU #define SCC2_RE _SCC2.Bits.RE #define SCC2_TE _SCC2.Bits.TE #define SCC2_ILIE _SCC2.Bits.ILIE #define SCC2_SCRIE _SCC2.Bits.SCRIE #define SCC2_TCIE _SCC2.Bits.TCIE #define SCC2_SCTIE _SCC2.Bits.SCTIE #define SCC2_SBK_MASK 1 #define SCC2_RWU_MASK 2 #define SCC2_RE_MASK 4 #define SCC2_TE_MASK 8 #define SCC2_ILIE_MASK 16 #define SCC2_SCRIE_MASK 32 #define SCC2_TCIE_MASK 64 #define SCC2_SCTIE_MASK 128 /*** SCC3 - ESCI Control Register 3; 0x00000012 ***/ typedef union { byte Byte; struct { byte PEIE :1; /* Receiver Parity Error Interrupt Enable Bit */ byte FEIE :1; /* Receiver Framing Error Interrupt Enable Bit */ byte NEIE :1; /* Receiver Noise Error Interrupt Enable Bit */ byte ORIE :1; /* Receiver Overrun Interrupt Enable Bit */ byte :1; byte :1; byte T8 :1; /* Transmitted Bit 8 */ byte R8 :1; /* Received Bit 8 */ } Bits; } SCC3STR; extern volatile SCC3STR _SCC3 @0x00000012; #define SCC3 _SCC3.Byte #define SCC3_PEIE _SCC3.Bits.PEIE #define SCC3_FEIE _SCC3.Bits.FEIE #define SCC3_NEIE _SCC3.Bits.NEIE #define SCC3_ORIE _SCC3.Bits.ORIE #define SCC3_T8 _SCC3.Bits.T8 #define SCC3_R8 _SCC3.Bits.R8 #define SCC3_PEIE_MASK 1 #define SCC3_FEIE_MASK 2 #define SCC3_NEIE_MASK 4 #define SCC3_ORIE_MASK 8 #define SCC3_T8_MASK 64 #define SCC3_R8_MASK 128 /*** SCS1 - ESCI Status Register 1; 0x00000013 ***/ typedef union { byte Byte; struct { byte PE :1; /* Receiver Parity Error Bit */ byte FE :1; /* Receiver Framing Error Bit */ byte NF :1; /* Receiver Noise Flag Bit */ byte OR :1; /* Receiver Overrun Bit */ byte IDLE :1; /* Receiver Idle Bit */ byte SCRF :1; /* SCI Receiver Full Bit */ byte TC :1; /* Transmission Complete Bit */ byte SCTE :1; /* SCI Transmitter Empty Bit */ } Bits; } SCS1STR; extern volatile SCS1STR _SCS1 @0x00000013; #define SCS1 _SCS1.Byte #define SCS1_PE _SCS1.Bits.PE #define SCS1_FE _SCS1.Bits.FE #define SCS1_NF _SCS1.Bits.NF #define SCS1_OR _SCS1.Bits.OR #define SCS1_IDLE _SCS1.Bits.IDLE #define SCS1_SCRF _SCS1.Bits.SCRF #define SCS1_TC _SCS1.Bits.TC #define SCS1_SCTE _SCS1.Bits.SCTE #define SCS1_PE_MASK 1 #define SCS1_FE_MASK 2 #define SCS1_NF_MASK 4 #define SCS1_OR_MASK 8 #define SCS1_IDLE_MASK 16 #define SCS1_SCRF_MASK 32 #define SCS1_TC_MASK 64 #define SCS1_SCTE_MASK 128 /*** SCS2 - ESCI Status Register 2; 0x00000014 ***/ typedef union { byte Byte; struct { byte RPF :1; /* Reception in Progress Flag Bit */ byte BKF :1; /* Break Flag Bit */ byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; } Bits; } SCS2STR; extern volatile SCS2STR _SCS2 @0x00000014; #define SCS2 _SCS2.Byte #define SCS2_RPF _SCS2.Bits.RPF #define SCS2_BKF _SCS2.Bits.BKF #define SCS2_RPF_MASK 1 #define SCS2_BKF_MASK 2 /*** SCDR - ESCI Data Register; 0x00000015 ***/ typedef union { byte Byte; struct { byte R0_T0 :1; /* Receive/Transmit Data Bit 0 */ byte R1_T1 :1; /* Receive/Transmit Data Bit 1 */ byte R2_T2 :1; /* Receive/Transmit Data Bit 2 */ byte R3_T3 :1; /* Receive/Transmit Data Bit 3 */ byte R4_T4 :1; /* Receive/Transmit Data Bit 4 */ byte R5_T5 :1; /* Receive/Transmit Data Bit 5 */ byte R6_T6 :1; /* Receive/Transmit Data Bit 6 */ byte R7_T7 :1; /* Receive/Transmit Data Bit 7 */ } Bits; } SCDRSTR; extern volatile SCDRSTR _SCDR @0x00000015; #define SCDR _SCDR.Byte #define SCDR_R0_T0 _SCDR.Bits.R0_T0 #define SCDR_R1_T1 _SCDR.Bits.R1_T1 #define SCDR_R2_T2 _SCDR.Bits.R2_T2 #define SCDR_R3_T3 _SCDR.Bits.R3_T3 #define SCDR_R4_T4 _SCDR.Bits.R4_T4 #define SCDR_R5_T5 _SCDR.Bits.R5_T5 #define SCDR_R6_T6 _SCDR.Bits.R6_T6 #define SCDR_R7_T7 _SCDR.Bits.R7_T7 #define SCDR_R0_T0_MASK 1 #define SCDR_R1_T1_MASK 2 #define SCDR_R2_T2_MASK 4 #define SCDR_R3_T3_MASK 8 #define SCDR_R4_T4_MASK 16 #define SCDR_R5_T5_MASK 32 #define SCDR_R6_T6_MASK 64 #define SCDR_R7_T7_MASK 128 /*** SCBR - ESCI Baud Rate Register; 0x00000016 ***/ typedef union { byte Byte; struct { byte SCR0 :1; /* ESCI Baud Rate Select Bit 0 */ byte SCR1 :1; /* ESCI Baud Rate Select Bit 1 */ byte SCR2 :1; /* ESCI Baud Rate Select Bit 2 */ byte :1; byte SCP0 :1; /* ESCI Baud Rate Prescaler Bit 0 */ byte SCP1 :1; /* ESCI Baud Rate Prescaler Bit 1 */ byte LINR :1; /* LIN Break Symbol Receiver Bit */ byte LINT :1; /* LIN Breal Symbol Transmit Enable */ } Bits; struct { byte grpSCR :3; byte :1; byte grpSCP :2; byte :1; byte :1; } MergedBits; } SCBRSTR; extern volatile SCBRSTR _SCBR @0x00000016; #define SCBR _SCBR.Byte #define SCBR_SCR0 _SCBR.Bits.SCR0 #define SCBR_SCR1 _SCBR.Bits.SCR1 #define SCBR_SCR2 _SCBR.Bits.SCR2 #define SCBR_SCP0 _SCBR.Bits.SCP0 #define SCBR_SCP1 _SCBR.Bits.SCP1 #define SCBR_LINR _SCBR.Bits.LINR #define SCBR_LINT _SCBR.Bits.LINT #define SCBR_SCR _SCBR.MergedBits.grpSCR #define SCBR_SCP _SCBR.MergedBits.grpSCP #define SCBR_SCR0_MASK 1 #define SCBR_SCR1_MASK 2 #define SCBR_SCR2_MASK 4 #define SCBR_SCP0_MASK 16 #define SCBR_SCP1_MASK 32 #define SCBR_LINR_MASK 64 #define SCBR_LINT_MASK 128 #define SCBR_SCR_MASK 7 #define SCBR_SCR_BITNUM 0 #define SCBR_SCP_MASK 48 #define SCBR_SCP_BITNUM 4 /*** SCPSC - ESCI Prescaler Register; 0x00000017 ***/ typedef union { byte Byte; struct { byte PSSB0 :1; /* Clock Insertion Select Bit 0 */ byte PSSB1 :1; /* Clock Insertion Select Bit 1 */ byte PSSB2 :1; /* Clock Insertion Select Bit 2 */ byte PSSB3 :1; /* Clock Insertion Select Bit 3 */ byte PSSB4 :1; /* Clock Insertion Select Bit 4 */ byte PDS0 :1; /* Prescaler Divisor Select Bit 0 */ byte PDS1 :1; /* Prescaler Divisor Select Bit 1 */ byte PDS2 :1; /* Prescaler Divisor Select Bit 2 */ } Bits; struct { byte grpPSSB :5; byte grpPDS :3; } MergedBits; } SCPSCSTR; extern volatile SCPSCSTR _SCPSC @0x00000017; #define SCPSC _SCPSC.Byte #define SCPSC_PSSB0 _SCPSC.Bits.PSSB0 #define SCPSC_PSSB1 _SCPSC.Bits.PSSB1 #define SCPSC_PSSB2 _SCPSC.Bits.PSSB2 #define SCPSC_PSSB3 _SCPSC.Bits.PSSB3 #define SCPSC_PSSB4 _SCPSC.Bits.PSSB4 #define SCPSC_PDS0 _SCPSC.Bits.PDS0 #define SCPSC_PDS1 _SCPSC.Bits.PDS1 #define SCPSC_PDS2 _SCPSC.Bits.PDS2 #define SCPSC_PSSB _SCPSC.MergedBits.grpPSSB #define SCPSC_PDS _SCPSC.MergedBits.grpPDS #define SCPSC_PSSB0_MASK 1 #define SCPSC_PSSB1_MASK 2 #define SCPSC_PSSB2_MASK 4 #define SCPSC_PSSB3_MASK 8 #define SCPSC_PSSB4_MASK 16 #define SCPSC_PDS0_MASK 32 #define SCPSC_PDS1_MASK 64 #define SCPSC_PDS2_MASK 128 #define SCPSC_PSSB_MASK 31 #define SCPSC_PSSB_BITNUM 0 #define SCPSC_PDS_MASK 224 #define SCPSC_PDS_BITNUM 5 /*** SCIACTL - ESCI Arbiter Control Register; 0x00000018 ***/ typedef union { byte Byte; struct { byte ARD8 :1; /* Arbiter Counter MSB */ byte AROVFL :1; /* Arbiter Counter Overflow Bit */ byte ARUN :1; /* Arbiter Counter Running Flag */ byte AFIN :1; /* Arbiter Bit Time Measurement Finish Flag */ byte ACLK :1; /* Arbiter Counter Clock Select Bit */ byte AM0 :1; /* Arbiter Mode Select Bit 0 */ byte ALOST :1; /* Arbitration Lost Flag */ byte AM1 :1; /* Arbiter Mode Select Bit 1 */ } Bits; } SCIACTLSTR; extern volatile SCIACTLSTR _SCIACTL @0x00000018; #define SCIACTL _SCIACTL.Byte #define SCIACTL_ARD8 _SCIACTL.Bits.ARD8 #define SCIACTL_AROVFL _SCIACTL.Bits.AROVFL #define SCIACTL_ARUN _SCIACTL.Bits.ARUN #define SCIACTL_AFIN _SCIACTL.Bits.AFIN #define SCIACTL_ACLK _SCIACTL.Bits.ACLK #define SCIACTL_AM0 _SCIACTL.Bits.AM0 #define SCIACTL_ALOST _SCIACTL.Bits.ALOST #define SCIACTL_AM1 _SCIACTL.Bits.AM1 #define SCIACTL_ARD8_MASK 1 #define SCIACTL_AROVFL_MASK 2 #define SCIACTL_ARUN_MASK 4 #define SCIACTL_AFIN_MASK 8 #define SCIACTL_ACLK_MASK 16 #define SCIACTL_AM0_MASK 32 #define SCIACTL_ALOST_MASK 64 #define SCIACTL_AM1_MASK 128 /*** SCIADAT - ESCI Arbiter Data Register; 0x00000019 ***/ typedef union { byte Byte; struct { byte ARD0 :1; /* Arbiter Least Significant Counter Bit 0 */ byte ARD1 :1; /* Arbiter Least Significant Counter Bit 1 */ byte ARD2 :1; /* Arbiter Least Significant Counter Bit 2 */ byte ARD3 :1; /* Arbiter Least Significant Counter Bit 3 */ byte ARD4 :1; /* Arbiter Least Significant Counter Bit 4 */ byte ARD5 :1; /* Arbiter Least Significant Counter Bit 5 */ byte ARD6 :1; /* Arbiter Least Significant Counter Bit 6 */ byte ARD7 :1; /* Arbiter Least Significant Counter Bit 7 */ } Bits; } SCIADATSTR; extern volatile SCIADATSTR _SCIADAT @0x00000019; #define SCIADAT _SCIADAT.Byte #define SCIADAT_ARD0 _SCIADAT.Bits.ARD0 #define SCIADAT_ARD1 _SCIADAT.Bits.ARD1 #define SCIADAT_ARD2 _SCIADAT.Bits.ARD2 #define SCIADAT_ARD3 _SCIADAT.Bits.ARD3 #define SCIADAT_ARD4 _SCIADAT.Bits.ARD4 #define SCIADAT_ARD5 _SCIADAT.Bits.ARD5 #define SCIADAT_ARD6 _SCIADAT.Bits.ARD6 #define SCIADAT_ARD7 _SCIADAT.Bits.ARD7 #define SCIADAT_ARD0_MASK 1 #define SCIADAT_ARD1_MASK 2 #define SCIADAT_ARD2_MASK 4 #define SCIADAT_ARD3_MASK 8 #define SCIADAT_ARD4_MASK 16 #define SCIADAT_ARD5_MASK 32 #define SCIADAT_ARD6_MASK 64 #define SCIADAT_ARD7_MASK 128 /*** KBSCR - Keyboard Status and Control Register; 0x0000001A ***/ typedef union { byte Byte; struct { byte MODEK :1; /* Keyboard Triggering Sensitivity Bit */ byte IMASKK :1; /* Keyboard Interrupt Mask Bit */ byte ACKK :1; /* Keyboard Acknowledge Bit */ byte KEYF :1; /* Keyboard Flag Bit */ byte :1; byte :1; byte :1; byte :1; } Bits; } KBSCRSTR; extern volatile KBSCRSTR _KBSCR @0x0000001A; #define KBSCR _KBSCR.Byte #define KBSCR_MODEK _KBSCR.Bits.MODEK #define KBSCR_IMASKK _KBSCR.Bits.IMASKK #define KBSCR_ACKK _KBSCR.Bits.ACKK #define KBSCR_KEYF _KBSCR.Bits.KEYF #define KBSCR_MODEK_MASK 1 #define KBSCR_IMASKK_MASK 2 #define KBSCR_ACKK_MASK 4 #define KBSCR_KEYF_MASK 8 /*** KBIER - Keyboard Interrrupt Enable Register KBIER; 0x0000001B ***/ typedef union { byte Byte; struct { byte KBIE0 :1; /* Keyboard Interrupt Enable Bit 0 */ byte KBIE1 :1; /* Keyboard Interrupt Enable Bit 1 */ byte KBIE2 :1; /* Keyboard Interrupt Enable Bit 2 */ byte KBIE3 :1; /* Keyboard Interrupt Enable Bit 3 */ byte KBIE4 :1; /* Keyboard Interrupt Enable Bit 4 */ byte KBIE5 :1; /* Keyboard Interrupt Enable Bit 5 */ byte :1; byte :1; } Bits; struct { byte grpKBIE :6; byte :1; byte :1; } MergedBits; } KBIERSTR; extern volatile KBIERSTR _KBIER @0x0000001B; #define KBIER _KBIER.Byte #define KBIER_KBIE0 _KBIER.Bits.KBIE0 #define KBIER_KBIE1 _KBIER.Bits.KBIE1 #define KBIER_KBIE2 _KBIER.Bits.KBIE2 #define KBIER_KBIE3 _KBIER.Bits.KBIE3 #define KBIER_KBIE4 _KBIER.Bits.KBIE4 #define KBIER_KBIE5 _KBIER.Bits.KBIE5 #define KBIER_KBIE _KBIER.MergedBits.grpKBIE #define KBIER_KBIE0_MASK 1 #define KBIER_KBIE1_MASK 2 #define KBIER_KBIE2_MASK 4 #define KBIER_KBIE3_MASK 8 #define KBIER_KBIE4_MASK 16 #define KBIER_KBIE5_MASK 32 #define KBIER_KBIE_MASK 63 #define KBIER_KBIE_BITNUM 0 /*** KBIPR - Keyboard Interrupt Polarity Register; 0x0000001C ***/ typedef union { byte Byte; struct { byte KBIP0 :1; /* Keyboard Interrupt Polarity Bit 0 */ byte KBIP1 :1; /* Keyboard Interrupt Polarity Bit 1 */ byte KBIP2 :1; /* Keyboard Interrupt Polarity Bit 2 */ byte KBIP3 :1; /* Keyboard Interrupt Polarity Bit 3 */ byte KBIP4 :1; /* Keyboard Interrupt Polarity Bit 4 */ byte KBIP5 :1; /* Keyboard Interrupt Polarity Bit 5 */ byte :1; byte :1; } Bits; struct { byte grpKBIP :6; byte :1; byte :1; } MergedBits; } KBIPRSTR; extern volatile KBIPRSTR _KBIPR @0x0000001C; #define KBIPR _KBIPR.Byte #define KBIPR_KBIP0 _KBIPR.Bits.KBIP0 #define KBIPR_KBIP1 _KBIPR.Bits.KBIP1 #define KBIPR_KBIP2 _KBIPR.Bits.KBIP2 #define KBIPR_KBIP3 _KBIPR.Bits.KBIP3 #define KBIPR_KBIP4 _KBIPR.Bits.KBIP4 #define KBIPR_KBIP5 _KBIPR.Bits.KBIP5 #define KBIPR_KBIP _KBIPR.MergedBits.grpKBIP #define KBIPR_KBIP0_MASK 1 #define KBIPR_KBIP1_MASK 2 #define KBIPR_KBIP2_MASK 4 #define KBIPR_KBIP3_MASK 8 #define KBIPR_KBIP4_MASK 16 #define KBIPR_KBIP5_MASK 32 #define KBIPR_KBIP_MASK 63 #define KBIPR_KBIP_BITNUM 0 /*** INTSCR - IRQ Status and Control Register; 0x0000001D ***/ typedef union { byte Byte; struct { byte MODE :1; /* IRQ Edge/Level Select Bit */ byte IMASK :1; /* IRQ Interrupt Mask Bit */ byte ACK :1; /* IRQ Interrupt Request Acknowledge Bit */ byte IRQF :1; /* IRQ Flag Bit */ byte :1; byte :1; byte :1; byte :1; } Bits; } INTSCRSTR; extern volatile INTSCRSTR _INTSCR @0x0000001D; #define INTSCR _INTSCR.Byte #define INTSCR_MODE _INTSCR.Bits.MODE #define INTSCR_IMASK _INTSCR.Bits.IMASK #define INTSCR_ACK _INTSCR.Bits.ACK #define INTSCR_IRQF _INTSCR.Bits.IRQF #define INTSCR_MODE_MASK 1 #define INTSCR_IMASK_MASK 2 #define INTSCR_ACK_MASK 4 #define INTSCR_IRQF_MASK 8 /*** CONFIG2 - Configuration Register 2; 0x0000001E ***/ typedef union { byte Byte; struct { byte RSTEN :1; /* RST Pin Function Selection */ byte OSCENINSTOP :1; /* Oscillator Enable in Stop Mode Bit */ byte ESCIBDSRC :1; /* ESCI Baud Rate Clock Source Bit */ byte TIM2POS :1; /* TIM2 Position Bit */ byte :1; byte :1; byte IRQEN :1; /* IRQ Pin Function Selection Bit */ byte IRQPUD :1; /* IRQ Pin Pullup Control Bit */ } Bits; } CONFIG2STR; extern volatile CONFIG2STR _CONFIG2 @0x0000001E; #define CONFIG2 _CONFIG2.Byte #define CONFIG2_RSTEN _CONFIG2.Bits.RSTEN #define CONFIG2_OSCENINSTOP _CONFIG2.Bits.OSCENINSTOP #define CONFIG2_ESCIBDSRC _CONFIG2.Bits.ESCIBDSRC #define CONFIG2_TIM2POS _CONFIG2.Bits.TIM2POS #define CONFIG2_IRQEN _CONFIG2.Bits.IRQEN #define CONFIG2_IRQPUD _CONFIG2.Bits.IRQPUD #define CONFIG2_RSTEN_MASK 1 #define CONFIG2_OSCENINSTOP_MASK 2 #define CONFIG2_ESCIBDSRC_MASK 4 #define CONFIG2_TIM2POS_MASK 8 #define CONFIG2_IRQEN_MASK 64 #define CONFIG2_IRQPUD_MASK 128 /*** CONFIG1 - Configuration Register 1; 0x0000001F ***/ typedef union { byte Byte; struct { byte COPD :1; /* COP Disable Bit */ byte STOP :1; /* STOP Instruction Enable Bit */ byte SSREC :1; /* Short Stop Recovery Bit */ byte LVITRIP :1; /* LVI Trip Point Selection Bit */ byte LVIPWRD :1; /* Low Voltage Inhibit Power Disable Bit */ byte LVIRSTD :1; /* Low Voltage Inhibit Reset Disable Bit */ byte LVISTOP :1; /* LVI Enable in Stop Mode Bit */ byte COPRS :1; /* COP Reset Period Selection Bit */ } Bits; } CONFIG1STR; extern volatile CONFIG1STR _CONFIG1 @0x0000001F; #define CONFIG1 _CONFIG1.Byte #define CONFIG1_COPD _CONFIG1.Bits.COPD #define CONFIG1_STOP _CONFIG1.Bits.STOP #define CONFIG1_SSREC _CONFIG1.Bits.SSREC #define CONFIG1_LVITRIP _CONFIG1.Bits.LVITRIP #define CONFIG1_LVIPWRD _CONFIG1.Bits.LVIPWRD #define CONFIG1_LVIRSTD _CONFIG1.Bits.LVIRSTD #define CONFIG1_LVISTOP _CONFIG1.Bits.LVISTOP #define CONFIG1_COPRS _CONFIG1.Bits.COPRS #define CONFIG1_COPD_MASK 1 #define CONFIG1_STOP_MASK 2 #define CONFIG1_SSREC_MASK 4 #define CONFIG1_LVITRIP_MASK 8 #define CONFIG1_LVIPWRD_MASK 16 #define CONFIG1_LVIRSTD_MASK 32 #define CONFIG1_LVISTOP_MASK 64 #define CONFIG1_COPRS_MASK 128 /*** T1SC - TIM1 Status and Control Register TSC; 0x00000020 ***/ typedef union { byte Byte; struct { byte PS0 :1; /* Prescaler Select Bit 0 */ byte PS1 :1; /* Prescaler Select Bit 1 */ byte PS2 :1; /* Prescaler Select Bit 2 */ byte :1; byte TRST :1; /* TIM1 Reset Bit */ byte TSTOP :1; /* TIM1 Stop Bit */ byte TOIE :1; /* TIM1 Overflow Interrupt Enable Bit */ byte TOF :1; /* TIM1 Overflow Flag Bit */ } Bits; struct { byte grpPS :3; byte :1; byte :1; byte :1; byte :1; byte :1; } MergedBits; } T1SCSTR; extern volatile T1SCSTR _T1SC @0x00000020; #define T1SC _T1SC.Byte #define T1SC_PS0 _T1SC.Bits.PS0 #define T1SC_PS1 _T1SC.Bits.PS1 #define T1SC_PS2 _T1SC.Bits.PS2 #define T1SC_TRST _T1SC.Bits.TRST #define T1SC_TSTOP _T1SC.Bits.TSTOP #define T1SC_TOIE _T1SC.Bits.TOIE #define T1SC_TOF _T1SC.Bits.TOF #define T1SC_PS _T1SC.MergedBits.grpPS #define T1SC_PS0_MASK 1 #define T1SC_PS1_MASK 2 #define T1SC_PS2_MASK 4 #define T1SC_TRST_MASK 16 #define T1SC_TSTOP_MASK 32 #define T1SC_TOIE_MASK 64 #define T1SC_TOF_MASK 128 #define T1SC_PS_MASK 7 #define T1SC_PS_BITNUM 0 /*** T1CNT - TIM1 Counter Register; 0x00000021 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T1CNTH - TIM1 Counter Register High; 0x00000021 ***/ union { byte Byte; } T1CNTHSTR; #define T1CNTH _T1CNT.Overlap_STR.T1CNTHSTR.Byte /*** T1CNTL - TIM1 Counter Register Low; 0x00000022 ***/ union { byte Byte; } T1CNTLSTR; #define T1CNTL _T1CNT.Overlap_STR.T1CNTLSTR.Byte } Overlap_STR; } T1CNTSTR; extern volatile T1CNTSTR _T1CNT @0x00000021; #define T1CNT _T1CNT.Word /*** T1MOD - TIM1 Counter Modulo Register; 0x00000023 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T1MODH - TIM1 Counter Modulo Register High; 0x00000023 ***/ union { byte Byte; } T1MODHSTR; #define T1MODH _T1MOD.Overlap_STR.T1MODHSTR.Byte /*** T1MODL - TIM1 Counter Modulo Register Low; 0x00000024 ***/ union { byte Byte; } T1MODLSTR; #define T1MODL _T1MOD.Overlap_STR.T1MODLSTR.Byte } Overlap_STR; } T1MODSTR; extern volatile T1MODSTR _T1MOD @0x00000023; #define T1MOD _T1MOD.Word /*** T1SC0 - TIM1 Channel 0 Status and Control Register; 0x00000025 ***/ typedef union { byte Byte; struct { byte CH0MAX :1; /* Channel 0 Maximum Duty Cycle Bit */ byte TOV0 :1; /* Toggle-On-Overflow Bit */ byte ELS0A :1; /* Edge/Level Select Bit A */ byte ELS0B :1; /* Edge/Level Select Bit B */ byte MS0A :1; /* Mode Select Bit A */ byte MS0B :1; /* Mode Select Bit B */ byte CH0IE :1; /* Channel 0 Interrupt Enable Bit */ byte CH0F :1; /* Channel 0 Flag Bit */ } Bits; struct { byte :1; byte grpTOV :1; byte grpELS0x :2; byte grpMS0x :2; byte :1; byte :1; } MergedBits; } T1SC0STR; extern volatile T1SC0STR _T1SC0 @0x00000025; #define T1SC0 _T1SC0.Byte #define T1SC0_CH0MAX _T1SC0.Bits.CH0MAX #define T1SC0_TOV0 _T1SC0.Bits.TOV0 #define T1SC0_ELS0A _T1SC0.Bits.ELS0A #define T1SC0_ELS0B _T1SC0.Bits.ELS0B #define T1SC0_MS0A _T1SC0.Bits.MS0A #define T1SC0_MS0B _T1SC0.Bits.MS0B #define T1SC0_CH0IE _T1SC0.Bits.CH0IE #define T1SC0_CH0F _T1SC0.Bits.CH0F #define T1SC0_ELS0x _T1SC0.MergedBits.grpELS0x #define T1SC0_MS0x _T1SC0.MergedBits.grpMS0x #define T1SC0_CH0MAX_MASK 1 #define T1SC0_TOV0_MASK 2 #define T1SC0_ELS0A_MASK 4 #define T1SC0_ELS0B_MASK 8 #define T1SC0_MS0A_MASK 16 #define T1SC0_MS0B_MASK 32 #define T1SC0_CH0IE_MASK 64 #define T1SC0_CH0F_MASK 128 #define T1SC0_ELS0x_MASK 12 #define T1SC0_ELS0x_BITNUM 2 #define T1SC0_MS0x_MASK 48 #define T1SC0_MS0x_BITNUM 4 /*** T1CH0 - TIM1 Channel 0 Register; 0x00000026 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T1CH0H - TIM1 Channel 0 Register High; 0x00000026 ***/ union { byte Byte; } T1CH0HSTR; #define T1CH0H _T1CH0.Overlap_STR.T1CH0HSTR.Byte /*** T1CH0L - TIM1 Channel 0 Register Low; 0x00000027 ***/ union { byte Byte; } T1CH0LSTR; #define T1CH0L _T1CH0.Overlap_STR.T1CH0LSTR.Byte } Overlap_STR; } T1CH0STR; extern volatile T1CH0STR _T1CH0 @0x00000026; #define T1CH0 _T1CH0.Word /*** T1SC1 - TIM1 Channel 1 Status and Control Register; 0x00000028 ***/ typedef union { byte Byte; struct { byte CH1MAX :1; /* Channel 1 Maximum Duty Cycle Bit */ byte TOV1 :1; /* Toggle-On-Overflow Bit */ byte ELS1A :1; /* Edge/Level Select Bit A */ byte ELS1B :1; /* Edge/Level Select Bit B */ byte MS1A :1; /* Mode Select Bit A */ byte :1; byte CH1IE :1; /* Channel 1 Interrupt Enable Bit */ byte CH1F :1; /* Channel 1 Flag Bit */ } Bits; struct { byte :1; byte grpTOV_1 :1; byte grpELS1x :2; byte grpMS1x :1; byte :1; byte :1; byte :1; } MergedBits; } T1SC1STR; extern volatile T1SC1STR _T1SC1 @0x00000028; #define T1SC1 _T1SC1.Byte #define T1SC1_CH1MAX _T1SC1.Bits.CH1MAX #define T1SC1_TOV1 _T1SC1.Bits.TOV1 #define T1SC1_ELS1A _T1SC1.Bits.ELS1A #define T1SC1_ELS1B _T1SC1.Bits.ELS1B #define T1SC1_MS1A _T1SC1.Bits.MS1A #define T1SC1_CH1IE _T1SC1.Bits.CH1IE #define T1SC1_CH1F _T1SC1.Bits.CH1F #define T1SC1_ELS1x _T1SC1.MergedBits.grpELS1x #define T1SC1_CH1MAX_MASK 1 #define T1SC1_TOV1_MASK 2 #define T1SC1_ELS1A_MASK 4 #define T1SC1_ELS1B_MASK 8 #define T1SC1_MS1A_MASK 16 #define T1SC1_CH1IE_MASK 64 #define T1SC1_CH1F_MASK 128 #define T1SC1_ELS1x_MASK 12 #define T1SC1_ELS1x_BITNUM 2 /*** T1CH1 - TIM1 Channel 1 Register; 0x00000029 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T1CH1H - TIM1 Channel 1 Register High; 0x00000029 ***/ union { byte Byte; } T1CH1HSTR; #define T1CH1H _T1CH1.Overlap_STR.T1CH1HSTR.Byte /*** T1CH1L - TIM1 Channel 1 Register Low; 0x0000002A ***/ union { byte Byte; } T1CH1LSTR; #define T1CH1L _T1CH1.Overlap_STR.T1CH1LSTR.Byte } Overlap_STR; } T1CH1STR; extern volatile T1CH1STR _T1CH1 @0x00000029; #define T1CH1 _T1CH1.Word /*** T1SC2 - TIM1 Channel 2 Status and Control Register; 0x00000030 ***/ typedef union { byte Byte; struct { byte CH2MAX :1; /* Channel 2 Maximum Duty Cycle Bit */ byte TOV2 :1; /* Toggle-On-Overflow Bit */ byte ELS2A :1; /* Edge/Level Select Bit A */ byte ELS2B :1; /* Edge/Level Select Bit B */ byte MS2A :1; /* Mode Select Bit A */ byte :1; byte CH2IE :1; /* Channel 2 Interrupt Enable Bit */ byte CH2F :1; /* Channel 2 Flag Bit */ } Bits; struct { byte :1; byte grpTOV_2 :1; byte grpELS2x :2; byte grpMS2x :1; byte :1; byte :1; byte :1; } MergedBits; } T1SC2STR; extern volatile T1SC2STR _T1SC2 @0x00000030; #define T1SC2 _T1SC2.Byte #define T1SC2_CH2MAX _T1SC2.Bits.CH2MAX #define T1SC2_TOV2 _T1SC2.Bits.TOV2 #define T1SC2_ELS2A _T1SC2.Bits.ELS2A #define T1SC2_ELS2B _T1SC2.Bits.ELS2B #define T1SC2_MS2A _T1SC2.Bits.MS2A #define T1SC2_CH2IE _T1SC2.Bits.CH2IE #define T1SC2_CH2F _T1SC2.Bits.CH2F #define T1SC2_ELS2x _T1SC2.MergedBits.grpELS2x #define T1SC2_CH2MAX_MASK 1 #define T1SC2_TOV2_MASK 2 #define T1SC2_ELS2A_MASK 4 #define T1SC2_ELS2B_MASK 8 #define T1SC2_MS2A_MASK 16 #define T1SC2_CH2IE_MASK 64 #define T1SC2_CH2F_MASK 128 #define T1SC2_ELS2x_MASK 12 #define T1SC2_ELS2x_BITNUM 2 /*** T1CH2 - TIM1 Channel 2 Register; 0x00000031 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T1CH2H - TIM1 Channel 2 Register High; 0x00000031 ***/ union { byte Byte; } T1CH2HSTR; #define T1CH2H _T1CH2.Overlap_STR.T1CH2HSTR.Byte /*** T1CH2L - TIM1 Channel 2 Register Low; 0x00000032 ***/ union { byte Byte; } T1CH2LSTR; #define T1CH2L _T1CH2.Overlap_STR.T1CH2LSTR.Byte } Overlap_STR; } T1CH2STR; extern volatile T1CH2STR _T1CH2 @0x00000031; #define T1CH2 _T1CH2.Word /*** T1SC3 - TIM1 Channel 3 Status and Control Register; 0x00000033 ***/ typedef union { byte Byte; struct { byte CH3MAX :1; /* Channel 3 Maximum Duty Cycle Bit */ byte TOV3 :1; /* Toggle-On-Overflow Bit */ byte ELS3A :1; /* Edge/Level Select Bit A */ byte ELS3B :1; /* Edge/Level Select Bit B */ byte MS3A :1; /* Mode Select Bit A */ byte :1; byte CH3IE :1; /* Channel 3 Interrupt Enable Bit */ byte CH3F :1; /* Channel 3 Flag Bit */ } Bits; struct { byte :1; byte grpTOV_3 :1; byte grpELS3x :2; byte grpMS3x :1; byte :1; byte :1; byte :1; } MergedBits; } T1SC3STR; extern volatile T1SC3STR _T1SC3 @0x00000033; #define T1SC3 _T1SC3.Byte #define T1SC3_CH3MAX _T1SC3.Bits.CH3MAX #define T1SC3_TOV3 _T1SC3.Bits.TOV3 #define T1SC3_ELS3A _T1SC3.Bits.ELS3A #define T1SC3_ELS3B _T1SC3.Bits.ELS3B #define T1SC3_MS3A _T1SC3.Bits.MS3A #define T1SC3_CH3IE _T1SC3.Bits.CH3IE #define T1SC3_CH3F _T1SC3.Bits.CH3F #define T1SC3_ELS3x _T1SC3.MergedBits.grpELS3x #define T1SC3_CH3MAX_MASK 1 #define T1SC3_TOV3_MASK 2 #define T1SC3_ELS3A_MASK 4 #define T1SC3_ELS3B_MASK 8 #define T1SC3_MS3A_MASK 16 #define T1SC3_CH3IE_MASK 64 #define T1SC3_CH3F_MASK 128 #define T1SC3_ELS3x_MASK 12 #define T1SC3_ELS3x_BITNUM 2 /*** T1CH3 - TIM1 Channel 3 Register; 0x00000034 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T1CH3H - TIM1 Channel 3 Register High; 0x00000034 ***/ union { byte Byte; } T1CH3HSTR; #define T1CH3H _T1CH3.Overlap_STR.T1CH3HSTR.Byte /*** T1CH3L - TIM1 Channel 3 Register Low; 0x00000035 ***/ union { byte Byte; } T1CH3LSTR; #define T1CH3L _T1CH3.Overlap_STR.T1CH3LSTR.Byte } Overlap_STR; } T1CH3STR; extern volatile T1CH3STR _T1CH3 @0x00000034; #define T1CH3 _T1CH3.Word /*** OSCSC - Oscillator Status and Control Register; 0x00000036 ***/ typedef union { byte Byte; struct { byte ECGST :1; /* External Clock Status Bit */ byte ECGON :1; /* External Clock Generator On Bit */ byte ECFS0 :1; /* External Clock Frequency Select Bit 0 */ byte ECFS1 :1; /* External Clock Frequency Select Bit 1 */ byte ICFS0 :1; /* Internal Clock Frequency Select Bit 0 */ byte ICFS1 :1; /* Internal Clock Frequency Select Bit 1 */ byte OSCOPT0 :1; /* OSC Option Bit 0 */ byte OSCOPT1 :1; /* OSC Option Bit 1 */ } Bits; struct { byte :1; byte :1; byte grpECFS :2; byte grpICFS :2; byte grpOSCOPT :2; } MergedBits; } OSCSCSTR; extern volatile OSCSCSTR _OSCSC @0x00000036; #define OSCSC _OSCSC.Byte #define OSCSC_ECGST _OSCSC.Bits.ECGST #define OSCSC_ECGON _OSCSC.Bits.ECGON #define OSCSC_ECFS0 _OSCSC.Bits.ECFS0 #define OSCSC_ECFS1 _OSCSC.Bits.ECFS1 #define OSCSC_ICFS0 _OSCSC.Bits.ICFS0 #define OSCSC_ICFS1 _OSCSC.Bits.ICFS1 #define OSCSC_OSCOPT0 _OSCSC.Bits.OSCOPT0 #define OSCSC_OSCOPT1 _OSCSC.Bits.OSCOPT1 #define OSCSC_ECFS _OSCSC.MergedBits.grpECFS #define OSCSC_ICFS _OSCSC.MergedBits.grpICFS #define OSCSC_OSCOPT _OSCSC.MergedBits.grpOSCOPT #define OSCSC_ECGST_MASK 1 #define OSCSC_ECGON_MASK 2 #define OSCSC_ECFS0_MASK 4 #define OSCSC_ECFS1_MASK 8 #define OSCSC_ICFS0_MASK 16 #define OSCSC_ICFS1_MASK 32 #define OSCSC_OSCOPT0_MASK 64 #define OSCSC_OSCOPT1_MASK 128 #define OSCSC_ECFS_MASK 12 #define OSCSC_ECFS_BITNUM 2 #define OSCSC_ICFS_MASK 48 #define OSCSC_ICFS_BITNUM 4 #define OSCSC_OSCOPT_MASK 192 #define OSCSC_OSCOPT_BITNUM 6 /*** OSCTRIM - Oscillator Trim Register; 0x00000038 ***/ typedef union { byte Byte; struct { byte TRIM0 :1; /* Internal Oscillator Trim Factor Bit 0 */ byte TRIM1 :1; /* Internal Oscillator Trim Factor Bit 1 */ byte TRIM2 :1; /* Internal Oscillator Trim Factor Bit 2 */ byte TRIM3 :1; /* Internal Oscillator Trim Factor Bit 3 */ byte TRIM4 :1; /* Internal Oscillator Trim Factor Bit 4 */ byte TRIM5 :1; /* Internal Oscillator Trim Factor Bit 5 */ byte TRIM6 :1; /* Internal Oscillator Trim Factor Bit 6 */ byte TRIM7 :1; /* Internal Oscillator Trim Factor Bit 7 */ } Bits; } OSCTRIMSTR; extern volatile OSCTRIMSTR _OSCTRIM @0x00000038; #define OSCTRIM _OSCTRIM.Byte #define OSCTRIM_TRIM0 _OSCTRIM.Bits.TRIM0 #define OSCTRIM_TRIM1 _OSCTRIM.Bits.TRIM1 #define OSCTRIM_TRIM2 _OSCTRIM.Bits.TRIM2 #define OSCTRIM_TRIM3 _OSCTRIM.Bits.TRIM3 #define OSCTRIM_TRIM4 _OSCTRIM.Bits.TRIM4 #define OSCTRIM_TRIM5 _OSCTRIM.Bits.TRIM5 #define OSCTRIM_TRIM6 _OSCTRIM.Bits.TRIM6 #define OSCTRIM_TRIM7 _OSCTRIM.Bits.TRIM7 #define OSCTRIM_TRIM0_MASK 1 #define OSCTRIM_TRIM1_MASK 2 #define OSCTRIM_TRIM2_MASK 4 #define OSCTRIM_TRIM3_MASK 8 #define OSCTRIM_TRIM4_MASK 16 #define OSCTRIM_TRIM5_MASK 32 #define OSCTRIM_TRIM6_MASK 64 #define OSCTRIM_TRIM7_MASK 128 /*** ADSCR - ADC10 Status and Control Register; 0x0000003C ***/ typedef union { byte Byte; struct { byte ADCH0 :1; /* ADC10 Channel Select Bit 0 */ byte ADCH1 :1; /* ADC10 Channel Select Bit 1 */ byte ADCH2 :1; /* ADC10 Channel Select Bit 2 */ byte ADCH3 :1; /* ADC10 Channel Select Bit 3 */ byte ADCH4 :1; /* ADC10 Channel Select Bit 4 */ byte ADCO :1; /* ADC10 Continuous Conversion Bit */ byte AIEN :1; /* ADC10 Interrupt Enable Bit */ byte COCO :1; /* Conversions Complete Bit */ } Bits; struct { byte grpADCH :5; byte :1; byte :1; byte :1; } MergedBits; } ADSCRSTR; extern volatile ADSCRSTR _ADSCR @0x0000003C; #define ADSCR _ADSCR.Byte #define ADSCR_ADCH0 _ADSCR.Bits.ADCH0 #define ADSCR_ADCH1 _ADSCR.Bits.ADCH1 #define ADSCR_ADCH2 _ADSCR.Bits.ADCH2 #define ADSCR_ADCH3 _ADSCR.Bits.ADCH3 #define ADSCR_ADCH4 _ADSCR.Bits.ADCH4 #define ADSCR_ADCO _ADSCR.Bits.ADCO #define ADSCR_AIEN _ADSCR.Bits.AIEN #define ADSCR_COCO _ADSCR.Bits.COCO #define ADSCR_ADCH _ADSCR.MergedBits.grpADCH #define ADSCR_ADCH0_MASK 1 #define ADSCR_ADCH1_MASK 2 #define ADSCR_ADCH2_MASK 4 #define ADSCR_ADCH3_MASK 8 #define ADSCR_ADCH4_MASK 16 #define ADSCR_ADCO_MASK 32 #define ADSCR_AIEN_MASK 64 #define ADSCR_COCO_MASK 128 #define ADSCR_ADCH_MASK 31 #define ADSCR_ADCH_BITNUM 0 /*** ADR - ADC10 Data Register - Right-justified; 0x0000003D ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** ADRH - ADC10 Data Register High - Right-justified mode; 0x0000003D ***/ union { byte Byte; struct { byte AD8 :1; /* ADC10 Data Bit 8 */ byte AD9 :1; /* ADC10 Data Bit 9 */ byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; } Bits; struct { byte grpAD_8 :2; byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; } MergedBits; } ADRHSTR; #define ADRH _ADR.Overlap_STR.ADRHSTR.Byte #define ADRH_AD8 _ADR.Overlap_STR.ADRHSTR.Bits.AD8 #define ADRH_AD9 _ADR.Overlap_STR.ADRHSTR.Bits.AD9 #define ADRH_AD_8 _ADR.Overlap_STR.ADRHSTR.MergedBits.grpAD_8 #define ADRH_AD ADRH_AD_8 #define ADRH_AD8_MASK 1 #define ADRH_AD9_MASK 2 #define ADRH_AD_8_MASK 3 #define ADRH_AD_8_BITNUM 0 /*** ADRL - ADC10 Data Register Low - Right-justified mode; 0x0000003E ***/ union { byte Byte; struct { byte AD0 :1; /* ADC10 Data Bit 0 */ byte AD1 :1; /* ADC10 Data Bit 1 */ byte AD2 :1; /* ADC10 Data Bit 2 */ byte AD3 :1; /* ADC10 Data Bit 3 */ byte AD4 :1; /* ADC10 Data Bit 4 */ byte AD5 :1; /* ADC10 Data Bit 5 */ byte AD6 :1; /* ADC10 Data Bit 6 */ byte AD7 :1; /* ADC10 Data Bit 7 */ } Bits; } ADRLSTR; #define ADRL _ADR.Overlap_STR.ADRLSTR.Byte #define ADRL_AD0 _ADR.Overlap_STR.ADRLSTR.Bits.AD0 #define ADRL_AD1 _ADR.Overlap_STR.ADRLSTR.Bits.AD1 #define ADRL_AD2 _ADR.Overlap_STR.ADRLSTR.Bits.AD2 #define ADRL_AD3 _ADR.Overlap_STR.ADRLSTR.Bits.AD3 #define ADRL_AD4 _ADR.Overlap_STR.ADRLSTR.Bits.AD4 #define ADRL_AD5 _ADR.Overlap_STR.ADRLSTR.Bits.AD5 #define ADRL_AD6 _ADR.Overlap_STR.ADRLSTR.Bits.AD6 #define ADRL_AD7 _ADR.Overlap_STR.ADRLSTR.Bits.AD7 #define ADRL_AD0_MASK 1 #define ADRL_AD1_MASK 2 #define ADRL_AD2_MASK 4 #define ADRL_AD3_MASK 8 #define ADRL_AD4_MASK 16 #define ADRL_AD5_MASK 32 #define ADRL_AD6_MASK 64 #define ADRL_AD7_MASK 128 } Overlap_STR; } ADRSTR; extern volatile ADRSTR _ADR @0x0000003D; #define ADR _ADR.Word /*** ADCLK - ADC Input Clock Register; 0x0000003F ***/ typedef union { byte Byte; struct { byte ACLKEN :1; /* Asynchronous Clock Source Enable */ byte ADLSMP :1; /* Long Sample Time Configuration */ byte MODE0 :1; /* 10- or 8-Bit or External-Triggered Mode Selection Bit 0 */ byte MODE1 :1; /* 10- or 8-Bit or External-Triggered Mode Selection Bit 1 */ byte ADICLK :1; /* Input Clock Select Bit */ byte ADIV0 :1; /* ADC10 Clock Divider Bit 0 */ byte ADIV1 :1; /* ADC10 Clock Divider Bit 1 */ byte ADLPC :1; /* ADC10 Low-Power Configuration Bit */ } Bits; struct { byte :1; byte :1; byte grpMODE :2; byte :1; byte grpADIV :2; byte :1; } MergedBits; } ADCLKSTR; extern volatile ADCLKSTR _ADCLK @0x0000003F; #define ADCLK _ADCLK.Byte #define ADCLK_ACLKEN _ADCLK.Bits.ACLKEN #define ADCLK_ADLSMP _ADCLK.Bits.ADLSMP #define ADCLK_MODE0 _ADCLK.Bits.MODE0 #define ADCLK_MODE1 _ADCLK.Bits.MODE1 #define ADCLK_ADICLK _ADCLK.Bits.ADICLK #define ADCLK_ADIV0 _ADCLK.Bits.ADIV0 #define ADCLK_ADIV1 _ADCLK.Bits.ADIV1 #define ADCLK_ADLPC _ADCLK.Bits.ADLPC #define ADCLK_MODE _ADCLK.MergedBits.grpMODE #define ADCLK_ADIV _ADCLK.MergedBits.grpADIV #define ADCLK_ACLKEN_MASK 1 #define ADCLK_ADLSMP_MASK 2 #define ADCLK_MODE0_MASK 4 #define ADCLK_MODE1_MASK 8 #define ADCLK_ADICLK_MASK 16 #define ADCLK_ADIV0_MASK 32 #define ADCLK_ADIV1_MASK 64 #define ADCLK_ADLPC_MASK 128 #define ADCLK_MODE_MASK 12 #define ADCLK_MODE_BITNUM 2 #define ADCLK_ADIV_MASK 96 #define ADCLK_ADIV_BITNUM 5 /*** T2SC - TIM2 Status and Control Register TSC; 0x00000240 ***/ typedef union { byte Byte; struct { byte PS0 :1; /* Prescaler Select Bit 0 */ byte PS1 :1; /* Prescaler Select Bit 1 */ byte PS2 :1; /* Prescaler Select Bit 2 */ byte :1; byte TRST :1; /* TIM2 Reset Bit */ byte TSTOP :1; /* TIM2 Stop Bit */ byte TOIE :1; /* TIM2 Overflow Interrupt Enable Bit */ byte TOF :1; /* TIM2 Overflow Flag Bit */ } Bits; struct { byte grpPS :3; byte :1; byte :1; byte :1; byte :1; byte :1; } MergedBits; } T2SCSTR; extern volatile T2SCSTR _T2SC @0x00000240; #define T2SC _T2SC.Byte #define T2SC_PS0 _T2SC.Bits.PS0 #define T2SC_PS1 _T2SC.Bits.PS1 #define T2SC_PS2 _T2SC.Bits.PS2 #define T2SC_TRST _T2SC.Bits.TRST #define T2SC_TSTOP _T2SC.Bits.TSTOP #define T2SC_TOIE _T2SC.Bits.TOIE #define T2SC_TOF _T2SC.Bits.TOF #define T2SC_PS _T2SC.MergedBits.grpPS #define T2SC_PS0_MASK 1 #define T2SC_PS1_MASK 2 #define T2SC_PS2_MASK 4 #define T2SC_TRST_MASK 16 #define T2SC_TSTOP_MASK 32 #define T2SC_TOIE_MASK 64 #define T2SC_TOF_MASK 128 #define T2SC_PS_MASK 7 #define T2SC_PS_BITNUM 0 /*** T2CNT - TIM2 Counter Register; 0x00000241 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T2CNTH - TIM2 Counter Register High; 0x00000241 ***/ union { byte Byte; } T2CNTHSTR; #define T2CNTH _T2CNT.Overlap_STR.T2CNTHSTR.Byte /*** T2CNTL - TIM2 Counter Register Low; 0x00000242 ***/ union { byte Byte; } T2CNTLSTR; #define T2CNTL _T2CNT.Overlap_STR.T2CNTLSTR.Byte } Overlap_STR; } T2CNTSTR; extern volatile T2CNTSTR _T2CNT @0x00000241; #define T2CNT _T2CNT.Word /*** T2MOD - TIM2 Counter Modulo Register; 0x00000243 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T2MODH - TIM2 Counter Modulo Register High; 0x00000243 ***/ union { byte Byte; } T2MODHSTR; #define T2MODH _T2MOD.Overlap_STR.T2MODHSTR.Byte /*** T2MODL - TIM2 Counter Modulo Register Low; 0x00000244 ***/ union { byte Byte; } T2MODLSTR; #define T2MODL _T2MOD.Overlap_STR.T2MODLSTR.Byte } Overlap_STR; } T2MODSTR; extern volatile T2MODSTR _T2MOD @0x00000243; #define T2MOD _T2MOD.Word /*** T2SC0 - TIM2 Channel 0 Status and Control Register; 0x00000245 ***/ typedef union { byte Byte; struct { byte CH0MAX :1; /* Channel 0 Maximum Duty Cycle Bit */ byte TOV0 :1; /* Toggle-On-Overflow Bit */ byte ELS0A :1; /* Edge/Level Select Bit A */ byte ELS0B :1; /* Edge/Level Select Bit B */ byte MS0A :1; /* Mode Select Bit A */ byte MS0B :1; /* Mode Select Bit B */ byte CH0IE :1; /* Channel 0 Interrupt Enable Bit */ byte CH0F :1; /* Channel 0 Flag Bit */ } Bits; struct { byte :1; byte grpTOV :1; byte grpELS0x :2; byte grpMS0x :2; byte :1; byte :1; } MergedBits; } T2SC0STR; extern volatile T2SC0STR _T2SC0 @0x00000245; #define T2SC0 _T2SC0.Byte #define T2SC0_CH0MAX _T2SC0.Bits.CH0MAX #define T2SC0_TOV0 _T2SC0.Bits.TOV0 #define T2SC0_ELS0A _T2SC0.Bits.ELS0A #define T2SC0_ELS0B _T2SC0.Bits.ELS0B #define T2SC0_MS0A _T2SC0.Bits.MS0A #define T2SC0_MS0B _T2SC0.Bits.MS0B #define T2SC0_CH0IE _T2SC0.Bits.CH0IE #define T2SC0_CH0F _T2SC0.Bits.CH0F #define T2SC0_ELS0x _T2SC0.MergedBits.grpELS0x #define T2SC0_MS0x _T2SC0.MergedBits.grpMS0x #define T2SC0_CH0MAX_MASK 1 #define T2SC0_TOV0_MASK 2 #define T2SC0_ELS0A_MASK 4 #define T2SC0_ELS0B_MASK 8 #define T2SC0_MS0A_MASK 16 #define T2SC0_MS0B_MASK 32 #define T2SC0_CH0IE_MASK 64 #define T2SC0_CH0F_MASK 128 #define T2SC0_ELS0x_MASK 12 #define T2SC0_ELS0x_BITNUM 2 #define T2SC0_MS0x_MASK 48 #define T2SC0_MS0x_BITNUM 4 /*** T2CH0 - TIM2 Channel 0 Register; 0x00000246 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T2CH0H - TIM2 Channel 0 Register High; 0x00000246 ***/ union { byte Byte; } T2CH0HSTR; #define T2CH0H _T2CH0.Overlap_STR.T2CH0HSTR.Byte /*** T2CH0L - TIM2 Channel 0 Register Low; 0x00000247 ***/ union { byte Byte; } T2CH0LSTR; #define T2CH0L _T2CH0.Overlap_STR.T2CH0LSTR.Byte } Overlap_STR; } T2CH0STR; extern volatile T2CH0STR _T2CH0 @0x00000246; #define T2CH0 _T2CH0.Word /*** T2SC1 - TIM2 Channel 1 Status and Control Register; 0x00000248 ***/ typedef union { byte Byte; struct { byte CH1MAX :1; /* Channel 1 Maximum Duty Cycle Bit */ byte TOV1 :1; /* Toggle-On-Overflow Bit */ byte ELS1A :1; /* Edge/Level Select Bit A */ byte ELS1B :1; /* Edge/Level Select Bit B */ byte MS1A :1; /* Mode Select Bit A */ byte :1; byte CH1IE :1; /* Channel 1 Interrupt Enable Bit */ byte CH1F :1; /* Channel 1 Flag Bit */ } Bits; struct { byte :1; byte grpTOV_1 :1; byte grpELS1x :2; byte grpMS1x :1; byte :1; byte :1; byte :1; } MergedBits; } T2SC1STR; extern volatile T2SC1STR _T2SC1 @0x00000248; #define T2SC1 _T2SC1.Byte #define T2SC1_CH1MAX _T2SC1.Bits.CH1MAX #define T2SC1_TOV1 _T2SC1.Bits.TOV1 #define T2SC1_ELS1A _T2SC1.Bits.ELS1A #define T2SC1_ELS1B _T2SC1.Bits.ELS1B #define T2SC1_MS1A _T2SC1.Bits.MS1A #define T2SC1_CH1IE _T2SC1.Bits.CH1IE #define T2SC1_CH1F _T2SC1.Bits.CH1F #define T2SC1_ELS1x _T2SC1.MergedBits.grpELS1x #define T2SC1_CH1MAX_MASK 1 #define T2SC1_TOV1_MASK 2 #define T2SC1_ELS1A_MASK 4 #define T2SC1_ELS1B_MASK 8 #define T2SC1_MS1A_MASK 16 #define T2SC1_CH1IE_MASK 64 #define T2SC1_CH1F_MASK 128 #define T2SC1_ELS1x_MASK 12 #define T2SC1_ELS1x_BITNUM 2 /*** T2CH1 - TIM2 Channel 1 Register; 0x00000249 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** T2CH1H - TIM2 Channel 1 Register High; 0x00000249 ***/ union { byte Byte; } T2CH1HSTR; #define T2CH1H _T2CH1.Overlap_STR.T2CH1HSTR.Byte /*** T2CH1L - TIM2 Channel 1 Register Low; 0x0000024A ***/ union { byte Byte; } T2CH1LSTR; #define T2CH1L _T2CH1.Overlap_STR.T2CH1LSTR.Byte } Overlap_STR; } T2CH1STR; extern volatile T2CH1STR _T2CH1 @0x00000249; #define T2CH1 _T2CH1.Word /*** PWUSC - Periodic Wakeup Status and Control Register; 0x0000024C ***/ typedef union { byte Byte; struct { byte SMODE :1; /* Periodic Wakeup Module Enabled in Stop Mode Bit */ byte PWUIE :1; /* Periodic Wakeup Interrupt Enable Bit */ byte PWUACK :1; /* Periodic Wakeup Acknowledge Bit */ byte PWUF :1; /* Keyboard Flag Bit */ byte PWUCLKSEL :1; /* Periodic Wakeup Clock Select Bit */ byte PWUON :1; /* Periodic Wakeup Enabled Bit */ byte :1; byte :1; } Bits; } PWUSCSTR; extern volatile PWUSCSTR _PWUSC @0x0000024C; #define PWUSC _PWUSC.Byte #define PWUSC_SMODE _PWUSC.Bits.SMODE #define PWUSC_PWUIE _PWUSC.Bits.PWUIE #define PWUSC_PWUACK _PWUSC.Bits.PWUACK #define PWUSC_PWUF _PWUSC.Bits.PWUF #define PWUSC_PWUCLKSEL _PWUSC.Bits.PWUCLKSEL #define PWUSC_PWUON _PWUSC.Bits.PWUON #define PWUSC_SMODE_MASK 1 #define PWUSC_PWUIE_MASK 2 #define PWUSC_PWUACK_MASK 4 #define PWUSC_PWUF_MASK 8 #define PWUSC_PWUCLKSEL_MASK 16 #define PWUSC_PWUON_MASK 32 /*** PWUP - Periodic Wakeup Prescaler Register; 0x0000024D ***/ typedef union { byte Byte; struct { byte PS0 :1; /* Prescaler Select Bit 0 */ byte PS1 :1; /* Prescaler Select Bit 1 */ byte PS2 :1; /* Prescaler Select Bit 2 */ byte PS3 :1; /* Prescaler Select Bit 3 */ byte :1; byte :1; byte :1; byte :1; } Bits; struct { byte grpPS :4; byte :1; byte :1; byte :1; byte :1; } MergedBits; } PWUPSTR; extern volatile PWUPSTR _PWUP @0x0000024D; #define PWUP _PWUP.Byte #define PWUP_PS0 _PWUP.Bits.PS0 #define PWUP_PS1 _PWUP.Bits.PS1 #define PWUP_PS2 _PWUP.Bits.PS2 #define PWUP_PS3 _PWUP.Bits.PS3 #define PWUP_PS _PWUP.MergedBits.grpPS #define PWUP_PS0_MASK 1 #define PWUP_PS1_MASK 2 #define PWUP_PS2_MASK 4 #define PWUP_PS3_MASK 8 #define PWUP_PS_MASK 15 #define PWUP_PS_BITNUM 0 /*** PWUMOD - Periodic Wakeup Modulo Register; 0x0000024E ***/ typedef union { byte Byte; } PWUMODSTR; extern volatile PWUMODSTR _PWUMOD @0x0000024E; #define PWUMOD _PWUMOD.Byte /*** BSR - Break Status Register; 0x0000FE00 ***/ typedef union { byte Byte; struct { byte :1; byte SBSW :1; /* SIM Break Stop/Wait */ byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; } Bits; } BSRSTR; extern volatile BSRSTR _BSR @0x0000FE00; #define BSR _BSR.Byte #define BSR_SBSW _BSR.Bits.SBSW #define BSR_SBSW_MASK 2 /*** SRSR - SIM Reset Status Register; 0x0000FE01 ***/ typedef union { byte Byte; struct { byte :1; byte LVI :1; /* Low-Voltage Inhibit Reset Bit */ byte MODRST :1; /* Monitor Mode Entry Module Reset bit */ byte ILAD :1; /* Illegal Address Reset Bit (opcode fetches only) */ byte ILOP :1; /* Illegal Opcode Reset Bit */ byte COP :1; /* Computer Operating Properly Reset Bit */ byte PIN :1; /* External Reset Bit */ byte POR :1; /* Power-On Reset Bit */ } Bits; } SRSRSTR; extern volatile SRSRSTR _SRSR @0x0000FE01; #define SRSR _SRSR.Byte #define SRSR_LVI _SRSR.Bits.LVI #define SRSR_MODRST _SRSR.Bits.MODRST #define SRSR_ILAD _SRSR.Bits.ILAD #define SRSR_ILOP _SRSR.Bits.ILOP #define SRSR_COP _SRSR.Bits.COP #define SRSR_PIN _SRSR.Bits.PIN #define SRSR_POR _SRSR.Bits.POR #define SRSR_LVI_MASK 2 #define SRSR_MODRST_MASK 4 #define SRSR_ILAD_MASK 8 #define SRSR_ILOP_MASK 16 #define SRSR_COP_MASK 32 #define SRSR_PIN_MASK 64 #define SRSR_POR_MASK 128 /*** BRKAR - Break Auxiliary Register; 0x0000FE02 ***/ typedef union { byte Byte; struct { byte BDCOP :1; /* Break Disable COP Bit */ byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; } Bits; } BRKARSTR; extern volatile BRKARSTR _BRKAR @0x0000FE02; #define BRKAR _BRKAR.Byte #define BRKAR_BDCOP _BRKAR.Bits.BDCOP #define BRKAR_BDCOP_MASK 1 /*** BFCR - SIM Break Flag Control Register; 0x0000FE03 ***/ typedef union { byte Byte; struct { byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; byte BCFE :1; /* Break Clear Flag Enable Bit */ } Bits; } BFCRSTR; extern volatile BFCRSTR _BFCR @0x0000FE03; #define BFCR _BFCR.Byte #define BFCR_BCFE _BFCR.Bits.BCFE #define BFCR_BCFE_MASK 128 /*** INT1 - Interrupt Status Register 1; 0x0000FE04 ***/ typedef union { byte Byte; struct { byte :1; byte :1; byte IF1 :1; /* Interrupt Flag 1 */ byte IF2 :1; /* Interrupt Flag 2 */ byte IF3 :1; /* Interrupt Flag 3 */ byte IF4 :1; /* Interrupt Flag 4 */ byte IF5 :1; /* Interrupt Flag 5 */ byte IF6 :1; /* Interrupt Flag 6 */ } Bits; struct { byte :1; byte :1; byte grpIF_1 :6; } MergedBits; } INT1STR; extern volatile INT1STR _INT1 @0x0000FE04; #define INT1 _INT1.Byte #define INT1_IF1 _INT1.Bits.IF1 #define INT1_IF2 _INT1.Bits.IF2 #define INT1_IF3 _INT1.Bits.IF3 #define INT1_IF4 _INT1.Bits.IF4 #define INT1_IF5 _INT1.Bits.IF5 #define INT1_IF6 _INT1.Bits.IF6 #define INT1_IF_1 _INT1.MergedBits.grpIF_1 #define INT1_IF INT1_IF_1 #define INT1_IF1_MASK 4 #define INT1_IF2_MASK 8 #define INT1_IF3_MASK 16 #define INT1_IF4_MASK 32 #define INT1_IF5_MASK 64 #define INT1_IF6_MASK 128 #define INT1_IF_1_MASK 252 #define INT1_IF_1_BITNUM 2 /*** INT2 - Interrupt Status Register 2; 0x0000FE05 ***/ typedef union { byte Byte; struct { byte IF7 :1; /* Interrupt Flag 7 */ byte IF8 :1; /* Interrupt Flag 8 */ byte IF9 :1; /* Interrupt Flag 9 */ byte IF10 :1; /* Interrupt Flag 10 */ byte IF11 :1; /* Interrupt Flag 11 */ byte IF12 :1; /* Interrupt Flag 12 */ byte IF13 :1; /* Interrupt Flag 13 */ byte IF14 :1; /* Interrupt Flag 14 */ } Bits; } INT2STR; extern volatile INT2STR _INT2 @0x0000FE05; #define INT2 _INT2.Byte #define INT2_IF7 _INT2.Bits.IF7 #define INT2_IF8 _INT2.Bits.IF8 #define INT2_IF9 _INT2.Bits.IF9 #define INT2_IF10 _INT2.Bits.IF10 #define INT2_IF11 _INT2.Bits.IF11 #define INT2_IF12 _INT2.Bits.IF12 #define INT2_IF13 _INT2.Bits.IF13 #define INT2_IF14 _INT2.Bits.IF14 #define INT2_IF7_MASK 1 #define INT2_IF8_MASK 2 #define INT2_IF9_MASK 4 #define INT2_IF10_MASK 8 #define INT2_IF11_MASK 16 #define INT2_IF12_MASK 32 #define INT2_IF13_MASK 64 #define INT2_IF14_MASK 128 /*** INT3 - Interrupt Status Register 3; 0x0000FE06 ***/ typedef union { byte Byte; struct { byte IF15 :1; /* Interrupt Flag 15 */ byte IF16 :1; /* Interrupt Flag 16 */ byte IF17 :1; /* Interrupt Flag 17 */ byte IF18 :1; /* Interrupt Flag 18 */ byte IF19 :1; /* Interrupt Flag 19 */ byte IF20 :1; /* Interrupt Flag 20 */ byte IF21 :1; /* Interrupt Flag 21 */ byte IF22 :1; /* Interrupt Flag 22 */ } Bits; } INT3STR; extern volatile INT3STR _INT3 @0x0000FE06; #define INT3 _INT3.Byte #define INT3_IF15 _INT3.Bits.IF15 #define INT3_IF16 _INT3.Bits.IF16 #define INT3_IF17 _INT3.Bits.IF17 #define INT3_IF18 _INT3.Bits.IF18 #define INT3_IF19 _INT3.Bits.IF19 #define INT3_IF20 _INT3.Bits.IF20 #define INT3_IF21 _INT3.Bits.IF21 #define INT3_IF22 _INT3.Bits.IF22 #define INT3_IF15_MASK 1 #define INT3_IF16_MASK 2 #define INT3_IF17_MASK 4 #define INT3_IF18_MASK 8 #define INT3_IF19_MASK 16 #define INT3_IF20_MASK 32 #define INT3_IF21_MASK 64 #define INT3_IF22_MASK 128 /*** FLCR - FLASH Control Register; 0x0000FE08 ***/ typedef union { byte Byte; struct { byte PGM :1; /* Program Control Bit */ byte ERASE :1; /* Erase Control Bit */ byte MASS :1; /* Mass Erase Control Bit */ byte HVEN :1; /* High-Voltage Enable Bit */ byte :1; byte :1; byte :1; byte :1; } Bits; } FLCRSTR; extern volatile FLCRSTR _FLCR @0x0000FE08; #define FLCR _FLCR.Byte #define FLCR_PGM _FLCR.Bits.PGM #define FLCR_ERASE _FLCR.Bits.ERASE #define FLCR_MASS _FLCR.Bits.MASS #define FLCR_HVEN _FLCR.Bits.HVEN #define FLCR_PGM_MASK 1 #define FLCR_ERASE_MASK 2 #define FLCR_MASS_MASK 4 #define FLCR_HVEN_MASK 8 /*** BRK - Break Address Register; 0x0000FE09 ***/ typedef union { word Word; /* Overlapped registers: */ struct { /*** BRKH - Break Address Register High; 0x0000FE09 ***/ union { byte Byte; struct { byte BIT8 :1; /* Break Address Register Bit 8 */ byte BIT9 :1; /* Break Address Register Bit 9 */ byte BIT10 :1; /* Break Address Register Bit 10 */ byte BIT11 :1; /* Break Address Register Bit 11 */ byte BIT12 :1; /* Break Address Register Bit 12 */ byte BIT13 :1; /* Break Address Register Bit 13 */ byte BIT14 :1; /* Break Address Register Bit 14 */ byte BIT15 :1; /* Break Address Register Bit 15 */ } Bits; } BRKHSTR; #define BRKH _BRK.Overlap_STR.BRKHSTR.Byte #define BRKH_BIT8 _BRK.Overlap_STR.BRKHSTR.Bits.BIT8 #define BRKH_BIT9 _BRK.Overlap_STR.BRKHSTR.Bits.BIT9 #define BRKH_BIT10 _BRK.Overlap_STR.BRKHSTR.Bits.BIT10 #define BRKH_BIT11 _BRK.Overlap_STR.BRKHSTR.Bits.BIT11 #define BRKH_BIT12 _BRK.Overlap_STR.BRKHSTR.Bits.BIT12 #define BRKH_BIT13 _BRK.Overlap_STR.BRKHSTR.Bits.BIT13 #define BRKH_BIT14 _BRK.Overlap_STR.BRKHSTR.Bits.BIT14 #define BRKH_BIT15 _BRK.Overlap_STR.BRKHSTR.Bits.BIT15 #define BRKH_BIT8_MASK 1 #define BRKH_BIT9_MASK 2 #define BRKH_BIT10_MASK 4 #define BRKH_BIT11_MASK 8 #define BRKH_BIT12_MASK 16 #define BRKH_BIT13_MASK 32 #define BRKH_BIT14_MASK 64 #define BRKH_BIT15_MASK 128 /*** BRKL - Break Address Register Low; 0x0000FE0A ***/ union { byte Byte; struct { byte BIT0 :1; /* Break Address Register Bit 0 */ byte BIT1 :1; /* Break Address Register Bit 1 */ byte BIT2 :1; /* Break Address Register Bit 2 */ byte BIT3 :1; /* Break Address Register Bit 3 */ byte BIT4 :1; /* Break Address Register Bit 4 */ byte BIT5 :1; /* Break Address Register Bit 5 */ byte BIT6 :1; /* Break Address Register Bit 6 */ byte BIT7 :1; /* Break Address Register Bit 7 */ } Bits; } BRKLSTR; #define BRKL _BRK.Overlap_STR.BRKLSTR.Byte #define BRKL_BIT0 _BRK.Overlap_STR.BRKLSTR.Bits.BIT0 #define BRKL_BIT1 _BRK.Overlap_STR.BRKLSTR.Bits.BIT1 #define BRKL_BIT2 _BRK.Overlap_STR.BRKLSTR.Bits.BIT2 #define BRKL_BIT3 _BRK.Overlap_STR.BRKLSTR.Bits.BIT3 #define BRKL_BIT4 _BRK.Overlap_STR.BRKLSTR.Bits.BIT4 #define BRKL_BIT5 _BRK.Overlap_STR.BRKLSTR.Bits.BIT5 #define BRKL_BIT6 _BRK.Overlap_STR.BRKLSTR.Bits.BIT6 #define BRKL_BIT7 _BRK.Overlap_STR.BRKLSTR.Bits.BIT7 #define BRKL_BIT0_MASK 1 #define BRKL_BIT1_MASK 2 #define BRKL_BIT2_MASK 4 #define BRKL_BIT3_MASK 8 #define BRKL_BIT4_MASK 16 #define BRKL_BIT5_MASK 32 #define BRKL_BIT6_MASK 64 #define BRKL_BIT7_MASK 128 } Overlap_STR; } BRKSTR; extern volatile BRKSTR _BRK @0x0000FE09; #define BRK _BRK.Word /*** BRKSCR - Break Status and Control Register; 0x0000FE0B ***/ typedef union { byte Byte; struct { byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; byte BRKA :1; /* Break Active Bit */ byte BRKE :1; /* Break Enable Bit */ } Bits; } BRKSCRSTR; extern volatile BRKSCRSTR _BRKSCR @0x0000FE0B; #define BRKSCR _BRKSCR.Byte #define BRKSCR_BRKA _BRKSCR.Bits.BRKA #define BRKSCR_BRKE _BRKSCR.Bits.BRKE #define BRKSCR_BRKA_MASK 64 #define BRKSCR_BRKE_MASK 128 /*** LVISR - LVI Status Register; 0x0000FE0C ***/ typedef union { byte Byte; struct { byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; byte :1; byte LVIOUT :1; /* LVI Output Bit */ } Bits; } LVISRSTR; extern volatile LVISRSTR _LVISR @0x0000FE0C; #define LVISR _LVISR.Byte #define LVISR_LVIOUT _LVISR.Bits.LVIOUT #define LVISR_LVIOUT_MASK 128 /*** FLBPR - FLASH Block Protect Register; 0x0000FFBE ***/ typedef union { byte Byte; struct { byte BPR0 :1; /* Block Protect Register Bit 0 */ byte BPR1 :1; /* Block Protect Register Bit 1 */ byte BPR2 :1; /* Block Protect Register Bit 2 */ byte BPR3 :1; /* Block Protect Register Bit 3 */ byte BPR4 :1; /* Block Protect Register Bit 4 */ byte BPR5 :1; /* Block Protect Register Bit 5 */ byte BPR6 :1; /* Block Protect Register Bit 6 */ byte BPR7 :1; /* Block Protect Register Bit 7 */ } Bits; } FLBPRSTR; /* Tip for register initialization in the user code: const byte FLBPR_INIT @0x0000FFBE = ; */ #define _FLBPR (*(const FLBPRSTR * __far)0x0000FFBE) #define FLBPR _FLBPR.Byte #define FLBPR_BPR0 _FLBPR.Bits.BPR0 #define FLBPR_BPR1 _FLBPR.Bits.BPR1 #define FLBPR_BPR2 _FLBPR.Bits.BPR2 #define FLBPR_BPR3 _FLBPR.Bits.BPR3 #define FLBPR_BPR4 _FLBPR.Bits.BPR4 #define FLBPR_BPR5 _FLBPR.Bits.BPR5 #define FLBPR_BPR6 _FLBPR.Bits.BPR6 #define FLBPR_BPR7 _FLBPR.Bits.BPR7 #define FLBPR_BPR0_MASK 1 #define FLBPR_BPR1_MASK 2 #define FLBPR_BPR2_MASK 4 #define FLBPR_BPR3_MASK 8 #define FLBPR_BPR4_MASK 16 #define FLBPR_BPR5_MASK 32 #define FLBPR_BPR6_MASK 64 #define FLBPR_BPR7_MASK 128 /*** Optional - Internal Oscillator Trim; 0x0000FFC0 ***/ typedef union { byte Byte; struct { byte TRIM0 :1; /* ICG Trim Factor Bit 0 */ byte TRIM1 :1; /* ICG Trim Factor Bit 1 */ byte TRIM2 :1; /* ICG Trim Factor Bit 2 */ byte TRIM3 :1; /* ICG Trim Factor Bit 3 */ byte TRIM4 :1; /* ICG Trim Factor Bit 4 */ byte TRIM5 :1; /* ICG Trim Factor Bit 5 */ byte TRIM6 :1; /* ICG Trim Factor Bit 6 */ byte TRIM7 :1; /* ICG Trim Factor Bit 7 */ } Bits; } OptionalSTR; /* Tip for register initialization in the user code: const byte Optional_INIT @0x0000FFC0 = ; */ #define _Optional (*(const OptionalSTR * __far)0x0000FFC0) #define Optional _Optional.Byte #define Optional_TRIM0 _Optional.Bits.TRIM0 #define Optional_TRIM1 _Optional.Bits.TRIM1 #define Optional_TRIM2 _Optional.Bits.TRIM2 #define Optional_TRIM3 _Optional.Bits.TRIM3 #define Optional_TRIM4 _Optional.Bits.TRIM4 #define Optional_TRIM5 _Optional.Bits.TRIM5 #define Optional_TRIM6 _Optional.Bits.TRIM6 #define Optional_TRIM7 _Optional.Bits.TRIM7 #define Optional_TRIM0_MASK 1 #define Optional_TRIM1_MASK 2 #define Optional_TRIM2_MASK 4 #define Optional_TRIM3_MASK 8 #define Optional_TRIM4_MASK 16 #define Optional_TRIM5_MASK 32 #define Optional_TRIM6_MASK 64 #define Optional_TRIM7_MASK 128 /*** COPCTL - COP Control Register; 0x0000FFFF ***/ typedef union { byte Byte; struct { byte BIT0 :1; /* Bit 0 */ byte BIT1 :1; /* Bit 1 */ byte BIT2 :1; /* Bit 2 */ byte BIT3 :1; /* Bit 3 */ byte BIT4 :1; /* Bit 4 */ byte BIT5 :1; /* Bit 5 */ byte BIT6 :1; /* Bit 6 */ byte BIT7 :1; /* Bit 7 */ } Bits; } COPCTLSTR; extern volatile COPCTLSTR _COPCTL @0x0000FFFF; #define COPCTL _COPCTL.Byte #define COPCTL_BIT0 _COPCTL.Bits.BIT0 #define COPCTL_BIT1 _COPCTL.Bits.BIT1 #define COPCTL_BIT2 _COPCTL.Bits.BIT2 #define COPCTL_BIT3 _COPCTL.Bits.BIT3 #define COPCTL_BIT4 _COPCTL.Bits.BIT4 #define COPCTL_BIT5 _COPCTL.Bits.BIT5 #define COPCTL_BIT6 _COPCTL.Bits.BIT6 #define COPCTL_BIT7 _COPCTL.Bits.BIT7 #define COPCTL_BIT0_MASK 1 #define COPCTL_BIT1_MASK 2 #define COPCTL_BIT2_MASK 4 #define COPCTL_BIT3_MASK 8 #define COPCTL_BIT4_MASK 16 #define COPCTL_BIT5_MASK 32 #define COPCTL_BIT6_MASK 64 #define COPCTL_BIT7_MASK 128 /***********************************************/ /** D E P R E C I A T E D S Y M B O L S **/ /***********************************************/ /* --------------------------------------------------------------------------- */ /* The following symbols were removed, because they were invalid or irrelevant */ /* --------------------------------------------------------------------------- */ /* **** 11.9.2009 12:42:42 */ #define T1CH_ARR This_symb_has_been_depreciated #define T2CH_ARR This_symb_has_been_depreciated #endif