pub struct Uart<A: UartAddress, M: Mode> { /* private fields */ }
Implementations§
Source§impl<A: UartAddress, M: Mode> Uart<A, M>
impl<A: UartAddress, M: Mode> Uart<A, M>
Sourcepub fn read_interrupt_status(&self) -> InterruptStatus
pub fn read_interrupt_status(&self) -> InterruptStatus
Read from the interrupt status register.
Sourcepub fn write_fifo_control(&mut self, fifo_control: FifoControl)
pub fn write_fifo_control(&mut self, fifo_control: FifoControl)
Write to the FIFO control register.
Sourcepub fn read_line_control(&self) -> LineControl
pub fn read_line_control(&self) -> LineControl
Read from the line control register.
Sourcepub fn write_line_control(&mut self, value: LineControl)
pub fn write_line_control(&mut self, value: LineControl)
Write to the line control register.
Sourcepub fn write_modem_control(&mut self, value: ModemControl)
pub fn write_modem_control(&mut self, value: ModemControl)
Write to the modem control register.
Sourcepub fn read_line_status(&mut self) -> LineStatus
pub fn read_line_status(&mut self) -> LineStatus
Read from the line status register.
Sourcepub fn read_modem_status(&self) -> ModemStatus
pub fn read_modem_status(&self) -> ModemStatus
Read from the modem status register.
Source§impl<A: UartAddress> Uart<A, DLAB>
impl<A: UartAddress> Uart<A, DLAB>
Source§impl<A: UartAddress> Uart<A, Data>
impl<A: UartAddress> Uart<A, Data>
Sourcepub fn new_reset(base_address: A) -> Self
pub fn new_reset(base_address: A) -> Self
Creates a new Uart
pointing to base_address
, and resets all the control and holding registers.
Sourcepub fn write_byte(&mut self, byte: u8)
pub fn write_byte(&mut self, byte: u8)
Writes a byte to the transmitter holding register
Sourcepub fn read_interrupt_enable(&self) -> InterruptEnable
pub fn read_interrupt_enable(&self) -> InterruptEnable
Reads from the interrupt enable register.
Sourcepub fn write_interrupt_enable(&mut self, value: InterruptEnable)
pub fn write_interrupt_enable(&mut self, value: InterruptEnable)
Writes to the interrupt enable register.
Sourcepub fn into_dlab_mode(self) -> Uart<A, DLAB>
pub fn into_dlab_mode(self) -> Uart<A, DLAB>
Enables access to the divisor latch registers.
Auto Trait Implementations§
impl<A, M> Freeze for Uart<A, M>where
A: Freeze,
impl<A, M> RefUnwindSafe for Uart<A, M>where
A: RefUnwindSafe,
M: RefUnwindSafe,
impl<A, M> Send for Uart<A, M>
impl<A, M> Sync for Uart<A, M>
impl<A, M> Unpin for Uart<A, M>
impl<A, M> UnwindSafe for Uart<A, M>where
A: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more