pub struct RegisterBlock {
pub lcr: LCR,
pub mcr: MCR,
pub lsr: LSR,
pub msr: MSR,
pub scr: SCR,
pub acr: ACR,
pub fdr: FDR,
pub ter: TER,
pub rs485ctrl: RS485CTRL,
pub rs485adrmatch: RS485ADRMATCH,
pub rs485dly: RS485DLY,
/* private fields */
}Expand description
Register block
Fields§
§lcr: LCR0x0c - Line Control Register. Contains controls for frame formatting and break generation.
mcr: MCR0x10 - Modem control register
lsr: LSR0x14 - Line Status Register. Contains flags for transmit and receive status, including line errors.
msr: MSR0x18 - Modem status register
scr: SCR0x1c - Scratch Pad Register. Eight-bit temporary storage for software.
acr: ACR0x20 - Auto-baud Control Register. Contains controls for the auto-baud feature.
fdr: FDR0x28 - Fractional Divider Register. Generates a clock input for the baud rate divider.
ter: TER0x30 - Transmit Enable Register. Turns off UART transmitter for use with software flow control.
rs485ctrl: RS485CTRL0x4c - RS-485/EIA-485 Control. Contains controls to configure various aspects of RS-485/EIA-485 modes.
rs485adrmatch: RS485ADRMATCH0x50 - RS-485/EIA-485 address match. Contains the address match value for RS-485/EIA-485 mode.
rs485dly: RS485DLY0x54 - RS-485/EIA-485 direction control delay.
Implementations§
Source§impl RegisterBlock
impl RegisterBlock
Sourcepub fn dll(&self) -> &DLL
pub fn dll(&self) -> &DLL
0x00 - Divisor Latch LSB. Least significant byte of the baud rate divisor value. The full divisor is used to generate a baud rate from the fractional rate divider. When DLAB=1.
Sourcepub fn thr(&self) -> &THR
pub fn thr(&self) -> &THR
0x00 - Transmit Holding Register. The next character to be transmitted is written here. When DLAB=0.
Sourcepub fn rbr(&self) -> &RBR
pub fn rbr(&self) -> &RBR
0x00 - Receiver Buffer Register. Contains the next received character to be read. When DLAB=0.
Sourcepub fn ier(&self) -> &IER
pub fn ier(&self) -> &IER
0x04 - Interrupt Enable Register. Contains individual interrupt enable bits for the 7 potential UART interrupts. When DLAB=0.