pub trait ConsoleDevice {
// Provided methods
fn console_poll_read(
&self,
_cx: &mut Context<'_>,
_buf: &mut [u8],
) -> Poll<Result<usize>> { ... }
fn console_write(&self, _buf: &[u8]) -> Result<()> { ... }
fn set_break(&self, _enable: bool) -> Result<()> { ... }
fn get_tx_ready_pin(&self) -> Result<Option<&Rc<dyn GpioPin>>> { ... }
}
Provided Methods§
Sourcefn console_poll_read(
&self,
_cx: &mut Context<'_>,
_buf: &mut [u8],
) -> Poll<Result<usize>>
fn console_poll_read( &self, _cx: &mut Context<'_>, _buf: &mut [u8], ) -> Poll<Result<usize>>
Reads data from the UART to print to the console (used when this UART is the console device).
Sourcefn console_write(&self, _buf: &[u8]) -> Result<()>
fn console_write(&self, _buf: &[u8]) -> Result<()>
Writes console input data to the UART (used when this UART is the console device).