Skip to main content

SerialExt

Trait SerialExt 

Source
pub trait SerialExt<PINS>: Sized {
    // Required method
    fn configure(
        self,
        pins: PINS,
        baud_rate: Bps,
        clocks: &Clocks,
    ) -> Serial<Self, PINS>;
}
Expand description

Extension trait that constrains UART peripherals

Required Methods§

Source

fn configure( self, pins: PINS, baud_rate: Bps, clocks: &Clocks, ) -> Serial<Self, PINS>

Configures a UART peripheral to provide serial communication

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.

Implementations on Foreign Types§

Source§

impl<TX: ExternalPin, RX: ExternalPin> SerialExt<(TX, RX)> for UARTHS

Source§

fn configure( self, pins: (TX, RX), baud_rate: Bps, clocks: &Clocks, ) -> Serial<UARTHS, (TX, RX)>

Implementors§

Source§

impl<UART: UartX, TX: ExternalPin, RX: ExternalPin> SerialExt<(TX, RX)> for UART