[][src]Struct e310x_hal::serial::Serial

pub struct Serial<UART, PINS> { /* fields omitted */ }

Serial abstraction

Methods

impl<UART: UartX, TX, RX> Serial<UART, (TX, RX)>[src]

pub fn new(uart: UART, pins: (TX, RX), baud_rate: Bps, clocks: Clocks) -> Self where
    TX: TxPin<UART>,
    RX: RxPin<UART>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn listen(self) -> Self[src]

Starts listening for an interrupt event

pub fn unlisten(self) -> Self[src]

Stops listening for an interrupt event

pub fn split(self) -> (Tx<UART>, Rx<UART>)[src]

Splits the Serial abstraction into a transmitter and a receiver half

pub fn free(self) -> (UART, (TX, RX))[src]

Releases the UART peripheral and associated pins

impl<TX, RX> Serial<UART0, (TX, RX)>[src]

pub fn uart0(
    uart: UART0,
    pins: (TX, RX),
    baud_rate: Bps,
    clocks: Clocks
) -> Self where
    TX: TxPin<UART0>,
    RX: RxPin<UART0>, 
[src]

Deprecated:

Please use Serial::new function instead

Configures a UART peripheral to provide serial communication

impl<TX, RX> Serial<UART1, (TX, RX)>[src]

pub fn uart1(
    uart: UART1,
    pins: (TX, RX),
    baud_rate: Bps,
    clocks: Clocks
) -> Self where
    TX: TxPin<UART1>,
    RX: RxPin<UART1>, 
[src]

Deprecated:

Please use Serial::new function instead

Configures a UART peripheral to provide serial communication

Auto Trait Implementations

impl<UART, PINS> Send for Serial<UART, PINS> where
    PINS: Send,
    UART: Send

impl<UART, PINS> Sync for Serial<UART, PINS> where
    PINS: Sync,
    UART: Sync

impl<UART, PINS> Unpin for Serial<UART, PINS> where
    PINS: Unpin,
    UART: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.