Struct uart_16550::SerialPort
source · pub struct SerialPort { /* private fields */ }
Available on x86 or x86-64 only.
Expand description
A port-mapped UART.
Implementations§
source§impl 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§
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