📄 s12xecrg.h
字号:
byte :1;
byte :1;
byte LOCKIE :1; /* Lock Interrupt Enable */
byte :1;
byte :1; /* Illegal Address Reset Flag */
byte RTIE :1; /* Real Time Interrupt Enable */
} Bits;
} CRGINTSTR;
extern volatile CRGINTSTR _CRGINT @(REG_BASE + 0x00000038);
#define CRGINT _CRGINT.Byte
#define CRGINT_SCMIE _CRGINT.Bits.SCMIE
#define CRGINT_LOCKIE _CRGINT.Bits.LOCKIE
#define CRGINT_RTIE _CRGINT.Bits.RTIE
#define CRGINT_SCMIE_MASK 2
#define CRGINT_LOCKIE_MASK 16
#define CRGINT_RTIE_MASK 128
/*** CLKSEL - CRG Clock Select Register; 0x00000039 ***/
typedef union {
byte Byte;
struct {
byte COPWAI :1; /* COP stops in WAIT mode */
byte RTIWAI :1; /* RTI stops in WAIT mode */
byte :1;
byte PLLWAI :1; /* PLL stops in WAIT mode */
byte :1;
byte :1;
byte PSTP :1; /* Pseudo Stop */
byte PLLSEL :1; /* PLL selected for system clock */
} Bits;
} CLKSELSTR;
extern volatile CLKSELSTR _CLKSEL @(REG_BASE + 0x00000039);
#define CLKSEL _CLKSEL.Byte
#define CLKSEL_COPWAI _CLKSEL.Bits.COPWAI
#define CLKSEL_RTIWAI _CLKSEL.Bits.RTIWAI
#define CLKSEL_PLLWAI _CLKSEL.Bits.PLLWAI
#define CLKSEL_PSTP _CLKSEL.Bits.PSTP
#define CLKSEL_PLLSEL _CLKSEL.Bits.PLLSEL
#define CLKSEL_COPWAI_MASK 1
#define CLKSEL_RTIWAI_MASK 2
#define CLKSEL_PLLWAI_MASK 8
#define CLKSEL_PSTP_MASK 64
#define CLKSEL_PLLSEL_MASK 128
/*** PLLCTL - CRG PLL Control Register; 0x0000003A ***/
typedef union {
byte Byte;
struct {
byte SCME :1; /* Self-clock mode enable */
byte PCE :1; /* COP Enable during Pseudo Stop Bit */
byte PRE :1; /* RTI Enable during Pseudo Stop Bit */
byte FSTWKP :1; /* Fast Wake-up from Full Stop Bit */
byte FM0 :1; /* FM modulation */
byte FM1 :1;
byte PLLON :1; /* Phase Lock Loop On */
byte CME :1; /* Crystal Monitor Enable */
} Bits;
} PLLCTLSTR;
extern volatile PLLCTLSTR _PLLCTL @(REG_BASE + 0x0000003A);
#define PLLCTL _PLLCTL.Byte
#define PLLCTL_SCME _PLLCTL.Bits.SCME
#define PLLCTL_PCE _PLLCTL.Bits.PCE
#define PLLCTL_PRE _PLLCTL.Bits.PRE
#define PLLCTL_FSTWKP _PLLCTL.Bits.FSTWKP
#define PLLCTL_FM0 _PLLCTL.Bits.FM0
#define PLLCTL_FM1 _PLLCTL.Bits.FM1
#define PLLCTL_PLLON _PLLCTL.Bits.PLLON
#define PLLCTL_CME _PLLCTL.Bits.CME
#define PLLCTL_SCME_MASK 1
#define PLLCTL_PCE_MASK 2
#define PLLCTL_PRE_MASK 4
#define PLLCTL_FSTWKP_MASK 8
#define PLLCTL_FM0_MASK 16
#define PLLCTL_FM1_MASK 32
#define PLLCTL_PLLON_MASK 64
#define PLLCTL_CME_MASK 128
/*** RTICTL - CRG RTI Control Register; 0x0000003B ***/
typedef union {
byte Byte;
struct {
byte RTR0 :1; /* Real Time Interrupt Modulus Counter Select Bit 0 */
byte RTR1 :1; /* Real Time Interrupt Modulus Counter Select Bit 1 */
byte RTR2 :1; /* Real Time Interrupt Modulus Counter Select Bit 2 */
byte RTR3 :1; /* Real Time Interrupt Modulus Counter Select Bit 3 */
byte RTR4 :1; /* Real Time Interrupt Prescale Rate Select Bit 4 */
byte RTR5 :1; /* Real Time Interrupt Prescale Rate Select Bit 5 */
byte RTR6 :1; /* Real Time Interrupt Prescale Rate Select Bit 6 */
byte RTDEC :1; /* Decimal or Binary Divider Select Bit */
} Bits;
struct {
byte grpRTR :7;
byte :1;
} MergedBits;
} RTICTLSTR;
extern volatile RTICTLSTR _RTICTL @(REG_BASE + 0x0000003B);
#define RTICTL _RTICTL.Byte
#define RTICTL_RTR0 _RTICTL.Bits.RTR0
#define RTICTL_RTR1 _RTICTL.Bits.RTR1
#define RTICTL_RTR2 _RTICTL.Bits.RTR2
#define RTICTL_RTR3 _RTICTL.Bits.RTR3
#define RTICTL_RTR4 _RTICTL.Bits.RTR4
#define RTICTL_RTR5 _RTICTL.Bits.RTR5
#define RTICTL_RTR6 _RTICTL.Bits.RTR6
#define RTICTL_RTDEC _RTICTL.Bits.RTDEC
#define RTICTL_RTR _RTICTL.MergedBits.grpRTR
#define RTICTL_RTR0_MASK 1
#define RTICTL_RTR1_MASK 2
#define RTICTL_RTR2_MASK 4
#define RTICTL_RTR3_MASK 8
#define RTICTL_RTR4_MASK 16
#define RTICTL_RTR5_MASK 32
#define RTICTL_RTR6_MASK 64
#define RTICTL_RTDEC_MASK 128
#define RTICTL_RTR_MASK 127
#define RTICTL_RTR_BITNUM 0
/*** COPCTL - CRG COP Control Register; 0x0000003C ***/
typedef union {
byte Byte;
struct {
byte CR0 :1; /* COP Watchdog Timer Rate select Bit 0 */
byte CR1 :1; /* COP Watchdog Timer Rate select Bit 1 */
byte CR2 :1; /* COP Watchdog Timer Rate select Bit 2 */
byte :1;
byte :1;
byte WRTMASK :1; /* Write Mask for WCOP and CR[2:0] Bit */
byte RSBCK :1; /* COP and RTI stop in Active BDM mode Bit */
byte WCOP :1; /* Window COP mode */
} Bits;
struct {
byte grpCR :3;
byte :1;
byte :1;
byte :1;
byte :1;
byte :1;
} MergedBits;
} COPCTLSTR;
extern volatile COPCTLSTR _COPCTL @(REG_BASE + 0x0000003C);
#define COPCTL _COPCTL.Byte
#define COPCTL_CR0 _COPCTL.Bits.CR0
#define COPCTL_CR1 _COPCTL.Bits.CR1
#define COPCTL_CR2 _COPCTL.Bits.CR2
#define COPCTL_WRTMASK _COPCTL.Bits.WRTMASK
#define COPCTL_RSBCK _COPCTL.Bits.RSBCK
#define COPCTL_WCOP _COPCTL.Bits.WCOP
#define COPCTL_CR _COPCTL.MergedBits.grpCR
#define COPCTL_CR0_MASK 1
#define COPCTL_CR1_MASK 2
#define COPCTL_CR2_MASK 4
#define COPCTL_WRTMASK_MASK 32
#define COPCTL_RSBCK_MASK 64
#define COPCTL_WCOP_MASK 128
#define COPCTL_CR_MASK 7
#define COPCTL_CR_BITNUM 0
/*** ARMCOP - CRG COP Timer Arm/Reset Register; 0x0000003F ***/
typedef union {
byte Byte;
} ARMCOPSTR;
extern volatile ARMCOPSTR _ARMCOP @(REG_BASE + 0x0000003F);
#define ARMCOP _ARMCOP.Byte
#endif /* S12XECRG_H */
/*******************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -