pub trait _embedded_hal_serial_Write<Word> {
    type Error;

    // Required methods
    fn write(&mut self, word: Word) -> Result<(), Error<Self::Error>>;
    fn flush(&mut self) -> Result<(), Error<Self::Error>>;
}
Expand description

Write half of a serial interface

Required Associated Types§

source

type Error

Write error

Required Methods§

source

fn write(&mut self, word: Word) -> Result<(), Error<Self::Error>>

Writes a single word to the serial interface

source

fn flush(&mut self) -> Result<(), Error<Self::Error>>

Ensures that none of the previously written words are still buffered

Trait Implementations§

source§

impl<Word, Error> Write for dyn Write<Word, Error = Error>where Word: From<u8>,

source§

fn write_str(&mut self, s: &str) -> Result<(), Error>

Writes a string slice into this writer, returning whether the write succeeded. Read more
1.1.0 · source§

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 · source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more

Implementations on Foreign Types§

source§

impl<C, D> Write<<C as AnyConfig>::Word> for Uart<C, D>where C: ValidConfig, D: Transmit,

source§

fn write( &mut self, word: <C as AnyConfig>::Word ) -> Result<(), Error<<Uart<C, D> as Write<<C as AnyConfig>::Word>>::Error>>

Wait for a DRE flag, then write a word

source§

fn flush( &mut self ) -> Result<(), Error<<Uart<C, D> as Write<<C as AnyConfig>::Word>>::Error>>

Wait for a TXC flag

§

type Error = Infallible

source§

impl<C> Write<<C as AnyConfig>::Word> for Spi<C, Tx>where C: ValidConfig, <C as AnyConfig>::Size: AtomicSize, <C as AnyConfig>::Word: PrimInt + AsPrimitive<u32>,

Implement serial::Write for Tx Spi structs

serial::Write is only implemented for Spi structs with Tx Capability. Because the Capability is Tx, this implementation never reads the DATA register and ignores all buffer overflow errors.

§

type Error = Error

source§

fn write(&mut self, word: <C as AnyConfig>::Word) -> Result<(), Error<Error>>

source§

fn flush(&mut self) -> Result<(), Error<Error>>

Implementors§