Trait SerialExt

Source
pub trait SerialExt: Sized + Instance {
    // Required method
    fn serial<WORD>(
        self,
        pins: (impl Into<Self::Tx<PushPull>>, impl Into<Self::Rx<PushPull>>),
        config: impl Into<Config>,
        clocks: &Clocks,
    ) -> Result<Serial<Self, WORD>, InvalidConfig>;

    // Provided methods
    fn tx<WORD>(
        self,
        tx_pin: impl Into<Self::Tx<PushPull>>,
        config: impl Into<Config>,
        clocks: &Clocks,
    ) -> Result<Tx<Self, WORD>, InvalidConfig>
       where NoPin: Into<Self::Rx<PushPull>> { ... }
    fn rx<WORD>(
        self,
        rx_pin: impl Into<Self::Rx<PushPull>>,
        config: impl Into<Config>,
        clocks: &Clocks,
    ) -> Result<Rx<Self, WORD>, InvalidConfig>
       where NoPin: Into<Self::Tx<PushPull>> { ... }
}

Required Methods§

Source

fn serial<WORD>( self, pins: (impl Into<Self::Tx<PushPull>>, impl Into<Self::Rx<PushPull>>), config: impl Into<Config>, clocks: &Clocks, ) -> Result<Serial<Self, WORD>, InvalidConfig>

Provided Methods§

Source

fn tx<WORD>( self, tx_pin: impl Into<Self::Tx<PushPull>>, config: impl Into<Config>, clocks: &Clocks, ) -> Result<Tx<Self, WORD>, InvalidConfig>
where NoPin: Into<Self::Rx<PushPull>>,

Source

fn rx<WORD>( self, rx_pin: impl Into<Self::Rx<PushPull>>, config: impl Into<Config>, clocks: &Clocks, ) -> Result<Rx<Self, WORD>, InvalidConfig>
where NoPin: Into<Self::Tx<PushPull>>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<UART: Instance> SerialExt for UART