[][src]Struct msp430fr2x5x_hal::serial::SerialConfig

pub struct SerialConfig<USCI: SerialUsci, S> { /* fields omitted */ }

Builder object for configuring a serial UART

Once the clock source has been selected, the builder can be converted into pins that can transmit or received bytes via a serial connection.

Implementations

impl<USCI: SerialUsci> SerialConfig<USCI, NoClockSet>[src]

pub fn new(
    usci: USCI,
    order: BitOrder,
    cnt: BitCount,
    stopbits: StopBits,
    parity: Parity,
    loopback: Loopback,
    baudrate: u32
) -> Self
[src]

Create a new serial configuration using a EUSCI peripheral

pub fn use_uclk<P: Into<USCI::ClockPin>>(
    self,
    _clk_pin: P,
    freq: u32
) -> SerialConfig<USCI, ClockSet>
[src]

Configure serial UART to use external UCLK, passing in the appropriately configured pin used as the clock signal as well as the frequency of the clock.

pub fn use_aclk(self, aclk: &Aclk) -> SerialConfig<USCI, ClockSet>[src]

Configure serial UART to use ACLK.

pub fn use_smclk(self, smclk: &Smclk) -> SerialConfig<USCI, ClockSet>[src]

Configure serial UART to use SMCLK.

impl<USCI: SerialUsci> SerialConfig<USCI, ClockSet>[src]

pub fn split<T: Into<USCI::TxPin>, R: Into<USCI::RxPin>>(
    self,
    _tx: T,
    _rx: R
) -> (Tx<USCI>, Rx<USCI>)
[src]

Perform hardware configuration and split into Tx and Rx pins from appropriate GPIOs

pub fn tx_only<T: Into<USCI::TxPin>>(self, _tx: T) -> Tx<USCI>[src]

Perform hardware configuration and create Tx pin from appropriate GPIO

pub fn rx_only<R: Into<USCI::RxPin>>(self, _rx: R) -> Rx<USCI>[src]

Perform hardware configuration and create Rx pin from appropriate GPIO

Auto Trait Implementations

impl<USCI, S> Send for SerialConfig<USCI, S> where
    S: Send,
    USCI: Send
[src]

impl<USCI, S> Sync for SerialConfig<USCI, S> where
    S: Sync,
    USCI: Sync
[src]

impl<USCI, S> Unpin for SerialConfig<USCI, S> where
    S: Unpin,
    USCI: Unpin
[src]

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.