pub struct Uart {
state: AtomicU8,
base_addr: u16,
}Expand description
x86_64 UART driver implementing UartOps
Fields§
§state: AtomicU8§base_addr: u16Implementations§
Source§impl Uart
impl Uart
const INIT_CALLED: u8
const USABLE: u8
Sourcepub fn new(base_addr: u16) -> Self
pub fn new(base_addr: u16) -> Self
Constructor; creates a new uninitialized Uart device with the given base_addr
Trait Implementations§
Source§impl UartOps for Uart
impl UartOps for Uart
Source§fn write_byte(&mut self, byte: u8) -> Result<(), UartError>
fn write_byte(&mut self, byte: u8) -> Result<(), UartError>
Write one byte to the UART device
Source§fn write_string(&mut self, string: &str) -> Result<(), UartError>
fn write_string(&mut self, string: &str) -> Result<(), UartError>
Write a string to the serial device
Default implementation calls
Self::write_byte for each byte in the string