📄 tty_io.c
字号:
byte BIT4 :1; /* Port K Data Direction Bit 4 */
byte BIT5 :1; /* Port K Data Direction Bit 5 */
byte :1;
byte BIT7 :1; /* Port K Data Direction Bit 7 */
} Bits;
struct {
byte grpBIT :6;
byte :1;
byte grpBIT_7 :1;
} MergedBits;
} DDRKSTR;
extern volatile DDRKSTR _DDRK @(REG_BASE + 0x00000033);
#define DDRK _DDRK.Byte
#define DDRK_BIT0 _DDRK.Bits.BIT0
#define DDRK_BIT1 _DDRK.Bits.BIT1
#define DDRK_BIT2 _DDRK.Bits.BIT2
#define DDRK_BIT3 _DDRK.Bits.BIT3
#define DDRK_BIT4 _DDRK.Bits.BIT4
#define DDRK_BIT5 _DDRK.Bits.BIT5
#define DDRK_BIT7 _DDRK.Bits.BIT7
#define DDRK_BIT _DDRK.MergedBits.grpBIT
#define DDRK_BIT0_MASK 1
#define DDRK_BIT1_MASK 2
#define DDRK_BIT2_MASK 4
#define DDRK_BIT3_MASK 8
#define DDRK_BIT4_MASK 16
#define DDRK_BIT5_MASK 32
#define DDRK_BIT7_MASK 128
#define DDRK_BIT_MASK 63
#define DDRK_BIT_BITNUM 0
/*** SYNR - CRG Synthesizer Register; 0x00000034 ***/
typedef union {
byte Byte;
struct {
byte SYN0 :1; /* CRG Synthesizer Bit 0 */
byte SYN1 :1; /* CRG Synthesizer Bit 1 */
byte SYN2 :1; /* CRG Synthesizer Bit 2 */
byte SYN3 :1; /* CRG Synthesizer Bit 3 */
byte SYN4 :1; /* CRG Synthesizer Bit 4 */
byte SYN5 :1; /* CRG Synthesizer Bit 5 */
byte :1;
byte :1;
} Bits;
struct {
byte grpSYN :6;
byte :1;
byte :1;
} MergedBits;
} SYNRSTR;
extern volatile SYNRSTR _SYNR @(REG_BASE + 0x00000034);
#define SYNR _SYNR.Byte
#define SYNR_SYN0 _SYNR.Bits.SYN0
#define SYNR_SYN1 _SYNR.Bits.SYN1
#define SYNR_SYN2 _SYNR.Bits.SYN2
#define SYNR_SYN3 _SYNR.Bits.SYN3
#define SYNR_SYN4 _SYNR.Bits.SYN4
#define SYNR_SYN5 _SYNR.Bits.SYN5
#define SYNR_SYN _SYNR.MergedBits.grpSYN
#define SYNR_SYN0_MASK 1
#define SYNR_SYN1_MASK 2
#define SYNR_SYN2_MASK 4
#define SYNR_SYN3_MASK 8
#define SYNR_SYN4_MASK 16
#define SYNR_SYN5_MASK 32
#define SYNR_SYN_MASK 63
#define SYNR_SYN_BITNUM 0
/*** REFDV - CRG Reference Divider Register; 0x00000035 ***/
typedef union {
byte Byte;
struct {
byte REFDV0 :1; /* CRG Reference Divider Bit 0 */
byte REFDV1 :1; /* CRG Reference Divider Bit 1 */
byte REFDV2 :1; /* CRG Reference Divider Bit 2 */
byte REFDV3 :1; /* CRG Reference Divider Bit 3 */
byte :1;
byte :1;
byte :1;
byte :1;
} Bits;
struct {
byte grpREFDV :4;
byte :1;
byte :1;
byte :1;
byte :1;
} MergedBits;
} REFDVSTR;
extern volatile REFDVSTR _REFDV @(REG_BASE + 0x00000035);
#define REFDV _REFDV.Byte
#define REFDV_REFDV0 _REFDV.Bits.REFDV0
#define REFDV_REFDV1 _REFDV.Bits.REFDV1
#define REFDV_REFDV2 _REFDV.Bits.REFDV2
#define REFDV_REFDV3 _REFDV.Bits.REFDV3
#define REFDV_REFDV _REFDV.MergedBits.grpREFDV
#define REFDV_REFDV0_MASK 1
#define REFDV_REFDV1_MASK 2
#define REFDV_REFDV2_MASK 4
#define REFDV_REFDV3_MASK 8
#define REFDV_REFDV_MASK 15
#define REFDV_REFDV_BITNUM 0
/*** CRGFLG - CRG Flags Register; 0x00000037 ***/
typedef union {
byte Byte;
struct {
byte SCM :1; /* Self-clock mode Status */
byte SCMIF :1; /* Self-clock mode Interrupt Flag */
byte TRACK :1; /* Track Status */
byte LOCK :1; /* Lock Status */
byte LOCKIF :1; /* PLL Lock Interrupt Flag */
byte LVRF :1; /* Low Voltage Reset Flag */
byte PORF :1; /* Power on Reset Flag */
byte RTIF :1; /* Real Time Interrupt Flag */
} Bits;
} CRGFLGSTR;
extern volatile CRGFLGSTR _CRGFLG @(REG_BASE + 0x00000037);
#define CRGFLG _CRGFLG.Byte
#define CRGFLG_SCM _CRGFLG.Bits.SCM
#define CRGFLG_SCMIF _CRGFLG.Bits.SCMIF
#define CRGFLG_TRACK _CRGFLG.Bits.TRACK
#define CRGFLG_LOCK _CRGFLG.Bits.LOCK
#define CRGFLG_LOCKIF _CRGFLG.Bits.LOCKIF
#define CRGFLG_LVRF _CRGFLG.Bits.LVRF
#define CRGFLG_PORF _CRGFLG.Bits.PORF
#define CRGFLG_RTIF _CRGFLG.Bits.RTIF
#define CRGFLG_SCM_MASK 1
#define CRGFLG_SCMIF_MASK 2
#define CRGFLG_TRACK_MASK 4
#define CRGFLG_LOCK_MASK 8
#define CRGFLG_LOCKIF_MASK 16
#define CRGFLG_LVRF_MASK 32
#define CRGFLG_PORF_MASK 64
#define CRGFLG_RTIF_MASK 128
/*** CRGINT - CRG Interrupt Enable Register; 0x00000038 ***/
typedef union {
byte Byte;
struct {
byte :1;
byte SCMIE :1; /* Self-clock mode Interrupt Enable */
byte :1;
byte :1;
byte LOCKIE :1; /* Lock Interrupt Enable */
byte :1;
byte :1;
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 CWAI :1; /* CLK24 and CLK23 stop in WAIT mode */
byte PLLWAI :1; /* PLL stops in WAIT mode */
byte ROAWAI :1; /* Reduced Oscillator Amplitude in WAIT mode */
byte SYSWAI :1; /* System clocks stop in WAIT mode */
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_CWAI _CLKSEL.Bits.CWAI
#define CLKSEL_PLLWAI _CLKSEL.Bits.PLLWAI
#define CLKSEL_ROAWAI _CLKSEL.Bits.ROAWAI
#define CLKSEL_SYSWAI _CLKSEL.Bits.SYSWAI
#define CLKSEL_PSTP _CLKSEL.Bits.PSTP
#define CLKSEL_PLLSEL _CLKSEL.Bits.PLLSEL
#define CLKSEL_COPWAI_MASK 1
#define CLKSEL_RTIWAI_MASK 2
#define CLKSEL_CWAI_MASK 4
#define CLKSEL_PLLWAI_MASK 8
#define CLKSEL_ROAWAI_MASK 16
#define CLKSEL_SYSWAI_MASK 32
#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 :1;
byte ACQ :1; /* Acquisition */
byte AUTO :1; /* Automatic Bandwidth Control */
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_ACQ _PLLCTL.Bits.ACQ
#define PLLCTL_AUTO _PLLCTL.Bits.AUTO
#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_ACQ_MASK 16
#define PLLCTL_AUTO_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 :1;
} 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_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_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 :1;
byte RSBCK :1; /* COP and RTI stop in Active BDM mode Bit */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -