7)、将添加位域后的寄存器结构体重新实现。
/********************************************************************
* SCI header file
* Defines a register file structure for the SCI peripheral
********************************************************************/
#define Uint16 unsigned int
#define Uint32 unsigned long
struct SCI_REGS {
Uint16 SCICCR_REG SCICCR; // Communications control register
Uint16 SCICTL1_REG SCICTL1; // Control register 1
Uint16 SCIHBAUD; // Baud rate (high) register
Uint16 SCILBAUD; // Baud rate (low) register
Uint16 SCICTL2_REG SCICTL2; // Control register 2
Uint16 SCIRXST_REG SCIRXST; // Receive status register
Uint16 SCIRXEMU; // Receive emulation buffer register
Uint16 SCIRXBUF_REG SCIRXBUF; // Receive data buffer
Uint16 rsvd1; // reserved
Uint16 SCITXBUF; // Transmit data buffer
Uint16 SCIFFTX_REG SCIFFTX; // FIFO transmit register
Uint16 SCIFFRX_REG SCIFFRX; // FIFO receive register
Uint16 SCIFFCT_REG SCIFFCT; // FIFO control register
Uint16 rsvd2; // reserved
Uint16 rsvd3; // reserved
Uint16 SCIPRI_REG SCIPRI; // FIFO Priority control
}; |