Trait _embedded_hal_blocking_serial_Write

Source
pub trait _embedded_hal_blocking_serial_Write<Word> {
    type Error;

    // Required methods
    fn bwrite_all(&mut self, buffer: &[Word]) -> Result<(), Self::Error>;
    fn bflush(&mut self) -> Result<(), Self::Error>;
}
Expand description

Write half of a serial interface (blocking variant)

Required Associated Types§

Source

type Error

The type of error that can occur when writing

Required Methods§

Source

fn bwrite_all(&mut self, buffer: &[Word]) -> Result<(), Self::Error>

Writes a slice, blocking until everything has been written

An implementation can choose to buffer the write, returning Ok(()) after the complete slice has been written to a buffer, but before all words have been sent via the serial interface. To make sure that everything has been sent, call bflush after this function returns.

Source

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

Block until the serial interface has sent all buffered words

Implementors§

Source§

impl<S, Word> Write<Word> for S
where S: Default<Word>, Word: Clone,

Source§

type Error = <S as Write<Word>>::Error

Source§

impl<USART> Write<u16> for Tx<USART, u16>
where USART: Deref<Target = <USART as Ptr>::RB> + Instance,

Source§

impl<USART: Instance> Write<u8> for Serial<USART, u8>
where Tx<USART, u8>: Write<u8, Error = Error>,

Source§

impl<USART: Instance> Write<u8> for Tx<USART, u8>

Source§

impl<USART: Instance> Write<u16> for Serial<USART, u16>
where Tx<USART, u16>: Write<u16, Error = Error>,