Struct Tx

Source
pub struct Tx<U> { /* private fields */ }
Expand description

Serial transmitter

Implementations§

Source§

impl<U> Tx<U>
where Self: Target, U: Instance,

Source

pub fn write_all<B>( self, data: Pin<B>, dma: &Handle<<Self as Target>::Instance, Enabled>, stream: <Self as Target>::Stream, ) -> Transfer<Self, B, Ready>
where B: Deref + 'static, B::Target: AsSlice<Element = u8>,

Writes data using DMA

DMA supports transfers up to 65535 bytes. If data is longer, this method will panic.

Trait Implementations§

Source§

impl Target for Tx<UART4>

Source§

impl Target for Tx<UART5>

Source§

impl Target for Tx<UART7>

Source§

impl Target for Tx<UART8>

Source§

impl Target for Tx<USART1>

Source§

impl Target for Tx<USART2>

Source§

impl Target for Tx<USART3>

Source§

impl Target for Tx<USART6>

Source§

impl<U> Write for Tx<U>
where Tx<U>: Write<u8>,

Source§

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

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

impl<U> Write<u8> for Tx<U>
where U: Instance,

Source§

type Error = Error

Write error
Source§

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

Ensures that none of the previously written words are still buffered
Source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface

Auto Trait Implementations§

§

impl<U> Freeze for Tx<U>

§

impl<U> RefUnwindSafe for Tx<U>
where U: RefUnwindSafe,

§

impl<U> Send for Tx<U>
where U: Send,

§

impl<U> Sync for Tx<U>
where U: Sync,

§

impl<U> Unpin for Tx<U>
where U: Unpin,

§

impl<U> UnwindSafe for Tx<U>
where U: UnwindSafe,

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