📄 s12xfr.h
字号:
/*** CASERCR - Channel A Status Error Counter Register; 0x00000424 ***/
typedef union {
word Word;
struct {
word STATUS_ERR_CNT :16; /* Channel Status Error Counter */
} Bits;
} CASERCRSTR;
extern volatile CASERCRSTR _CASERCR @(REG_BASE + 0x00000424);
#define CASERCR _CASERCR.Word
#define CASERCR_STATUS_ERR_CNT _CASERCR.Bits.STATUS_ERR_CNT
#define CASERCR_STATUS_ERR_CNT_MASK 65535
#define CASERCR_STATUS_ERR_CNT_BITNUM 0
/*** CBSERCR - Channel B Status Error Counter Register; 0x00000426 ***/
typedef union {
word Word;
struct {
word STATUS_ERR_CNT :16; /* Channel Status Error Counter */
} Bits;
} CBSERCRSTR;
extern volatile CBSERCRSTR _CBSERCR @(REG_BASE + 0x00000426);
#define CBSERCR _CBSERCR.Word
#define CBSERCR_STATUS_ERR_CNT _CBSERCR.Bits.STATUS_ERR_CNT
#define CBSERCR_STATUS_ERR_CNT_MASK 65535
#define CBSERCR_STATUS_ERR_CNT_BITNUM 0
/*** PSR0 - Protocol Status Register 0; 0x00000428 ***/
typedef union {
word Word;
struct {
word WAKEUPSTATUS :3; /* Wakeup Status */
word :1;
word STARTUPSTATE :4; /* Startup State */
word PROTSTATE :3; /* Protocol State */
word :1;
word SLOTMODE :2; /* Slot Mod */
word ERRMODE :2; /* Error Mode */
} Bits;
} PSR0STR;
extern volatile PSR0STR _PSR0 @(REG_BASE + 0x00000428);
#define PSR0 _PSR0.Word
#define PSR0_WAKEUPSTATUS _PSR0.Bits.WAKEUPSTATUS
#define PSR0_STARTUPSTATE _PSR0.Bits.STARTUPSTATE
#define PSR0_PROTSTATE _PSR0.Bits.PROTSTATE
#define PSR0_SLOTMODE _PSR0.Bits.SLOTMODE
#define PSR0_ERRMODE _PSR0.Bits.ERRMODE
/* PSR_ARR: Access 4 PSRx registers in an array */
#define PSR_ARR ((word *) &PSR0)
#define PSR0_WAKEUPSTATUS_MASK 7
#define PSR0_WAKEUPSTATUS_BITNUM 0
#define PSR0_STARTUPSTATE_MASK 240
#define PSR0_STARTUPSTATE_BITNUM 4
#define PSR0_PROTSTATE_MASK 1792
#define PSR0_PROTSTATE_BITNUM 8
#define PSR0_SLOTMODE_MASK 12288
#define PSR0_SLOTMODE_BITNUM 12
#define PSR0_ERRMODE_MASK 49152
#define PSR0_ERRMODE_BITNUM 14
/*** PSR1 - Protocol Status Register 1; 0x0000042A ***/
typedef union {
word Word;
struct {
word APTAC :5; /* Allow Passive to Active Counter */
word FRZ :1; /* Freeze Occurred */
word HHR :1; /* Host Halt Request Pending */
word CPN :1; /* Cold Start Path Noise */
word REMCSAT :5; /* Remaining Coldstart Attempts */
word :1;
word CSP :1; /* Cold Start Path */
word CSAA :1; /* Cold Start Attempt Aborted Flag */
} Bits;
} PSR1STR;
extern volatile PSR1STR _PSR1 @(REG_BASE + 0x0000042A);
#define PSR1 _PSR1.Word
#define PSR1_APTAC _PSR1.Bits.APTAC
#define PSR1_FRZ _PSR1.Bits.FRZ
#define PSR1_HHR _PSR1.Bits.HHR
#define PSR1_CPN _PSR1.Bits.CPN
#define PSR1_REMCSAT _PSR1.Bits.REMCSAT
#define PSR1_CSP _PSR1.Bits.CSP
#define PSR1_CSAA _PSR1.Bits.CSAA
#define PSR1_APTAC_MASK 31
#define PSR1_APTAC_BITNUM 0
#define PSR1_FRZ_MASK 32
#define PSR1_HHR_MASK 64
#define PSR1_CPN_MASK 128
#define PSR1_REMCSAT_MASK 7936
#define PSR1_REMCSAT_BITNUM 8
#define PSR1_CSP_MASK 16384
#define PSR1_CSAA_MASK 32768
/*** PSR2 - Protocol Status Register 2; 0x0000042C ***/
typedef union {
word Word;
struct {
word CLKCORRFAILCNT :4; /* Clock Correction Failed Counter */
word MTA :1; /* Media Access Test Symbol MTS Received on Channel A */
word SSEA :1; /* Symbol Window Syntax Error on Channel A */
word SBVA :1; /* Symbol Window Boundary Violation on Channel A */
word STCA :1; /* Symbol Window Transmit Conflict on Channel A */
word NSEA :1; /* NIT Syntax Error on Channel A */
word NBVA :1; /* NIT Boundary Violation on Channel A */
word MTB :1; /* Media Access Test Symbol MTS Received on Channel B */
word SSEB :1; /* Symbol Window Syntax Error on Channel B */
word SBVB :1; /* Symbol Window Boundary Violation on Channel */
word STCB :1; /* Symbol Window Transmit Conflict on Channel B */
word NSEB :1; /* NIT Syntax Error on Channel B */
word NBVB :1; /* NIT Boundary Violation on Channel B */
} Bits;
} PSR2STR;
extern volatile PSR2STR _PSR2 @(REG_BASE + 0x0000042C);
#define PSR2 _PSR2.Word
#define PSR2_CLKCORRFAILCNT _PSR2.Bits.CLKCORRFAILCNT
#define PSR2_MTA _PSR2.Bits.MTA
#define PSR2_SSEA _PSR2.Bits.SSEA
#define PSR2_SBVA _PSR2.Bits.SBVA
#define PSR2_STCA _PSR2.Bits.STCA
#define PSR2_NSEA _PSR2.Bits.NSEA
#define PSR2_NBVA _PSR2.Bits.NBVA
#define PSR2_MTB _PSR2.Bits.MTB
#define PSR2_SSEB _PSR2.Bits.SSEB
#define PSR2_SBVB _PSR2.Bits.SBVB
#define PSR2_STCB _PSR2.Bits.STCB
#define PSR2_NSEB _PSR2.Bits.NSEB
#define PSR2_NBVB _PSR2.Bits.NBVB
#define PSR2_CLKCORRFAILCNT_MASK 15
#define PSR2_CLKCORRFAILCNT_BITNUM 0
#define PSR2_MTA_MASK 16
#define PSR2_SSEA_MASK 32
#define PSR2_SBVA_MASK 64
#define PSR2_STCA_MASK 128
#define PSR2_NSEA_MASK 256
#define PSR2_NBVA_MASK 512
#define PSR2_MTB_MASK 1024
#define PSR2_SSEB_MASK 2048
#define PSR2_SBVB_MASK 4096
#define PSR2_STCB_MASK 8192
#define PSR2_NSEB_MASK 16384
#define PSR2_NBVB_MASK 32768
/*** PSR3 - Protocol Status Register 3; 0x0000042E ***/
typedef union {
word Word;
struct {
word AVFA :1; /* Aggregated Valid Frame on Channel A */
word ASEA :1; /* Aggregated Syntax Error on Channel A */
word ACEA :1; /* Aggregated Content Error on Channel A */
word AACA :1; /* Aggregated Additional Communication on Channel A */
word ABVA :1; /* Aggregated Boundary Violation on Channel A */
word WUA :1; /* Wakeup Symbol Received on Channel A */
word :1;
word :1;
word AVFB :1; /* Aggregated Valid Frame on Channel B */
word ASEB :1; /* Aggregated Syntax Error on Channel B */
word ACEB :1; /* Aggregated Content Error on Channel B */
word AACB :1; /* Aggregated Additional Communication on Channel B */
word ABVB :1; /* Aggregated Boundary Violation on Channel B */
word WUB :1; /* Wakeup Symbol Received on Channel B */
word :1;
word :1;
} Bits;
} PSR3STR;
extern volatile PSR3STR _PSR3 @(REG_BASE + 0x0000042E);
#define PSR3 _PSR3.Word
#define PSR3_AVFA _PSR3.Bits.AVFA
#define PSR3_ASEA _PSR3.Bits.ASEA
#define PSR3_ACEA _PSR3.Bits.ACEA
#define PSR3_AACA _PSR3.Bits.AACA
#define PSR3_ABVA _PSR3.Bits.ABVA
#define PSR3_WUA _PSR3.Bits.WUA
#define PSR3_AVFB _PSR3.Bits.AVFB
#define PSR3_ASEB _PSR3.Bits.ASEB
#define PSR3_ACEB _PSR3.Bits.ACEB
#define PSR3_AACB _PSR3.Bits.AACB
#define PSR3_ABVB _PSR3.Bits.ABVB
#define PSR3_WUB _PSR3.Bits.WUB
#define PSR3_AVFA_MASK 1
#define PSR3_ASEA_MASK 2
#define PSR3_ACEA_MASK 4
#define PSR3_AACA_MASK 8
#define PSR3_ABVA_MASK 16
#define PSR3_WUA_MASK 32
#define PSR3_AVFB_MASK 256
#define PSR3_ASEB_MASK 512
#define PSR3_ACEB_MASK 1024
#define PSR3_AACB_MASK 2048
#define PSR3_ABVB_MASK 4096
#define PSR3_WUB_MASK 8192
/*** MTCTR - Macrotick Counter Register; 0x00000430 ***/
typedef union {
word Word;
struct {
word MTCT :14; /* Macrotick Counter */
word :1;
word :1;
} Bits;
} MTCTRSTR;
extern volatile MTCTRSTR _MTCTR @(REG_BASE + 0x00000430);
#define MTCTR _MTCTR.Word
#define MTCTR_MTCT _MTCTR.Bits.MTCT
#define MTCTR_MTCT_MASK 16383
#define MTCTR_MTCT_BITNUM 0
/*** CYCTR - Cycle Counter Register; 0x00000432 ***/
typedef union {
word Word;
struct {
word CYCCNT :6; /* Cycle Counter */
word :1;
word :1;
word :1;
word :1;
word :1;
word :1;
word :1;
word :1;
word :1;
word :1;
} Bits;
} CYCTRSTR;
extern volatile CYCTRSTR _CYCTR @(REG_BASE + 0x00000432);
#define CYCTR _CYCTR.Word
#define CYCTR_CYCCNT _CYCTR.Bits.CYCCNT
#define CYCTR_CYCCNT_MASK 63
#define CYCTR_CYCCNT_BITNUM 0
/*** SLTCTAR - Slot Counter Channel A Register; 0x00000434 ***/
typedef union {
word Word;
struct {
word SLOTCNTA :11; /* Slot Counter Value for Channel A */
word :1;
word :1;
word :1;
word :1;
word :1;
} Bits;
} SLTCTARSTR;
extern volatile SLTCTARSTR _SLTCTAR @(REG_BASE + 0x00000434);
#define SLTCTAR _SLTCTAR.Word
#define SLTCTAR_SLOTCNTA _SLTCTAR.Bits.SLOTCNTA
#define SLTCTAR_SLOTCNTA_MASK 2047
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -