pub struct HyperdebugUart { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Uart for HyperdebugUart
impl Uart for HyperdebugUart
Source§fn get_baudrate(&self) -> Result<u32>
fn get_baudrate(&self) -> Result<u32>
Returns the UART baudrate. May return zero for virtual UARTs.
Source§fn set_baudrate(&self, baudrate: u32) -> Result<()>
fn set_baudrate(&self, baudrate: u32) -> Result<()>
Sets the UART baudrate. May do nothing for virtual UARTs.
fn get_flow_control(&self) -> Result<FlowControl>
Source§fn set_flow_control(&self, flow_control: bool) -> Result<()>
fn set_flow_control(&self, flow_control: bool) -> Result<()>
Enables software flow control for
write
s.Source§fn get_device_path(&self) -> Result<String>
fn get_device_path(&self) -> Result<String>
Returns
"/dev/ttyUSBn"
or similar OS device path usable by external programs for
directly accessing the serial port.Source§fn poll_read(&self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<Result<usize>>
fn poll_read(&self, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<Result<usize>>
Reads UART receive data into
buf
, returning the number of bytes read. Read moreSource§fn clear_rx_buffer(&self) -> Result<()>
fn clear_rx_buffer(&self) -> Result<()>
Clears the UART RX buffer.
fn set_break(&self, enable: bool) -> Result<()>
fn set_parity(&self, parity: Parity) -> Result<()>
fn get_parity(&self) -> Result<Parity>
Auto Trait Implementations§
impl !Freeze for HyperdebugUart
impl !RefUnwindSafe for HyperdebugUart
impl !Send for HyperdebugUart
impl !Sync for HyperdebugUart
impl Unpin for HyperdebugUart
impl !UnwindSafe for HyperdebugUart
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