opentitanlib::console::spi

Struct SpiConsoleDevice

Source
pub struct SpiConsoleDevice<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> SpiConsoleDevice<'a>

Source

pub fn new(spi: &'a dyn Target) -> Result<Self>

Trait Implementations§

Source§

impl<'a> ConsoleDevice for SpiConsoleDevice<'a>

Source§

fn console_read(&self, buf: &mut [u8], _timeout: Duration) -> 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 supports_nonblocking_read(&self) -> Result<bool>

Query if nonblocking mio mode is supported.
Source§

fn register_nonblocking_read( &self, _registry: &Registry, _token: Token, ) -> Result<()>

Switch this Uart instance into nonblocking mio mode. Going forward, read() should only be called after mio::poll() has indicated that the given Token is ready.
Source§

fn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>>

Get the same single NonblockingHelp object as from top level Transport.nonblocking_help().

Auto Trait Implementations§

§

impl<'a> !Freeze for SpiConsoleDevice<'a>

§

impl<'a> !RefUnwindSafe for SpiConsoleDevice<'a>

§

impl<'a> !Send for SpiConsoleDevice<'a>

§

impl<'a> !Sync for SpiConsoleDevice<'a>

§

impl<'a> Unpin for SpiConsoleDevice<'a>

§

impl<'a> !UnwindSafe for SpiConsoleDevice<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V