pub struct BlockingSerialPort(/* private fields */);
Expand description
Serial port handle for blocking I/O
This struct is a lightweight version of SerialPort
that can be used to perform blocking
serial I/O (via Write
or IoWrite
). It is intended for use in places where
interrupt-driven I/O is not possible, such as early bootstrapping or panic handling.
Implementations§
Source§impl BlockingSerialPort
impl BlockingSerialPort
Sourcepub unsafe fn new(base: u16) -> Self
pub unsafe fn new(base: u16) -> Self
Creates and returns a new BlockingSerialPort
instance.
§Safety
An 8250-compatible serial port must exist at the specified address. Otherwise we could end up spamming some unknown device with I/O operations.
For a given base
address, there must be no other SerialPort
or BlockingSerialPort
in
active use.
Trait Implementations§
Source§impl IoWrite for BlockingSerialPort
impl IoWrite for BlockingSerialPort
Auto Trait Implementations§
impl Freeze for BlockingSerialPort
impl RefUnwindSafe for BlockingSerialPort
impl Send for BlockingSerialPort
impl Sync for BlockingSerialPort
impl Unpin for BlockingSerialPort
impl UnwindSafe for BlockingSerialPort
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