[][src]Trait msp430fr2x5x_hal::prelude::prelude::_embedded_hal_serial_Write

pub trait _embedded_hal_serial_Write<Word> {
    type Error;
    pub fn write(&mut self, word: Word) -> Result<(), Error<Self::Error>>;
pub fn flush(&mut self) -> Result<(), Error<Self::Error>>; }

Write half of a serial interface

Associated Types

type Error[src]

Write error

Loading content...

Required methods

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

Writes a single word to the serial interface

pub fn flush(&mut self) -> Result<(), Error<Self::Error>>[src]

Ensures that none of the previously written words are still buffered

Loading content...

Trait Implementations

impl<Word, Error> Write for dyn Write<Word, Error = Error> + 'static where
    Word: From<u8>, 
[src]

Implementors

impl<USCI: SerialUsci> Write<u8> for Tx<USCI>[src]

type Error = Void

pub fn flush(&mut self) -> Result<(), Self::Error>[src]

Due to errata USCI42, UCTXCPTIFG will fire every time a byte is done transmitting, even if there's still more buffered. Thus, the implementation uses UCTXIFG instead. When flush() completes, the Tx buffer will be empty but the FIFO may still be sending.

pub fn write(&mut self, data: u8) -> Result<(), Self::Error>[src]

Check if Tx interrupt flag is set. If so, write a byte into the Tx buffer. Otherwise block on the Tx flag.

Loading content...