opentitanlib::io::console

Trait ConsoleDevice

Source
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§

Source

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).

Source

fn console_write(&self, _buf: &[u8]) -> Result<()>

Writes console input data to the UART (used when this UART is the console device).

Source

fn set_break(&self, _enable: bool) -> Result<()>

Source

fn get_tx_ready_pin(&self) -> Result<Option<&Rc<dyn GpioPin>>>

Query if TX-ready pin non-polling mode is supported.

Implementors§