Tx

Struct Tx 

Source
pub struct Tx<USART, Config> { /* private fields */ }
Expand description

Serial transmitter

Implementations§

Source§

impl<Config> Tx<USART1, Config>

Source

pub fn listen(&mut self)

Starts listening for an interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for an interrupt event

Source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

Source§

impl<Config> Tx<USART2, Config>

Source

pub fn listen(&mut self)

Starts listening for an interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for an interrupt event

Source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

Source§

impl<Config> Tx<USART3, Config>

Source

pub fn listen(&mut self)

Starts listening for an interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for an interrupt event

Source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

Source§

impl<Config> Tx<USART4, Config>

Source

pub fn listen(&mut self)

Starts listening for an interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for an interrupt event

Source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

Source§

impl<Config> Tx<LPUART, Config>

Source

pub fn listen(&mut self)

Starts listening for an interrupt event

Source

pub fn unlisten(&mut self)

Stop listening for an interrupt event

Source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

Source§

impl Tx<USART1, FullConfig>

Source

pub fn fifo_threshold_reached(&self) -> bool

Returns true if the tx fifo threshold has been reached.

Source§

impl Tx<USART2, FullConfig>

Source

pub fn fifo_threshold_reached(&self) -> bool

Returns true if the tx fifo threshold has been reached.

Trait Implementations§

Source§

impl<Config> Target for Tx<LPUART, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Tx<USART1, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Tx<USART2, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Tx<USART3, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<Config> Target for Tx<USART4, Config>

Source§

fn dmamux(&self) -> DmaMuxIndex

Returns the correct DMAMUX index to configure DMA channel for this peripheral
Source§

fn enable_dma(&mut self)

Enable DMA on the target
Source§

fn disable_dma(&mut self)

Disable DMA on the target
Source§

impl<USART, Config> Write for Tx<USART, Config>
where Tx<USART, Config>: 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<Config> Write<u8> for Tx<LPUART, Config>

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

impl<Config> Write<u8> for Tx<USART1, Config>

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

impl<Config> Write<u8> for Tx<USART2, Config>

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

impl<Config> Write<u8> for Tx<USART3, Config>

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

impl<Config> Write<u8> for Tx<USART4, Config>

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<USART, Config> Freeze for Tx<USART, Config>

§

impl<USART, Config> RefUnwindSafe for Tx<USART, Config>
where USART: RefUnwindSafe, Config: RefUnwindSafe,

§

impl<USART, Config> Send for Tx<USART, Config>
where USART: Send, Config: Send,

§

impl<USART, Config> Sync for Tx<USART, Config>
where USART: Sync, Config: Sync,

§

impl<USART, Config> Unpin for Tx<USART, Config>
where USART: Unpin, Config: Unpin,

§

impl<USART, Config> UnwindSafe for Tx<USART, Config>
where USART: UnwindSafe, Config: 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.