Struct uart_16550::SerialPort
source · pub struct SerialPort(_);
Available on x86 or x86-64 only.
Expand description
A x86 I/O 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 base port.
This function is unsafe because the caller must ensure that the given base address really points to a serial port device and that the caller has the necessary rights to perform the I/O operation.
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§
source§impl Debug for SerialPort
impl Debug for SerialPort
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