Struct uart_16550::SerialPort
source · [−]pub struct SerialPort { /* private fields */ }
This is supported on x86-64 only.
Expand description
A port-mapped UART.
Implementations
sourceimpl SerialPort
impl SerialPort
sourcepub const unsafe fn new(base: u16) -> Self
pub const unsafe fn new(base: u16) -> Self
Creates a new serial port interface on the given I/O port.
This function is unsafe because the caller must ensure that the given base address really points to a serial port device.
sourcepub fn init(&mut self)
pub fn init(&mut self)
Initializes the serial port.
The default configuration of 38400/8-N-1 is used.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SerialPort
impl Send for SerialPort
impl Sync for SerialPort
impl Unpin for SerialPort
impl UnwindSafe for SerialPort
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more