/// Convenience for setting up the labelled RX, TX pins to
/// operate as a UART device running at the specified baud.
Convenience for setting up the labelled RX, TX pins to
operate as a UART device running at the specified baud.
Convenience for setting up the labelled RX TX pins to operate as a UART device running at the specified baud .
pub fn uart(
    clocks: &mut GenericClockController,
    baud: impl Into<Hertz>,
    sercom: UartSercom,
    mclk: &mut pac::MCLK,
    uart_rx: impl Into<UartRx>,
    uart_tx: impl Into<UartTx>,
) -> Uart {
    let gclk0 = clocks.gclk0();
    let clock = &clocks.sercom0_core(&gclk0).unwrap();
    let baud = baud.into();
    let pads = uart::Pads::default().rx(uart_rx.into()).tx(uart_tx.into());
    uart::Config::new(mclk, sercom, pads, clock.freq())
        .baud(baud, BaudMode::Fractional(Oversampling::Bits16))
        .enable()
}
pub fn uart ( clocks : & mut GenericClockController , baud : impl Into < Hertz > , sercom : UartSercom , mclk : & mut pac :: MCLK , uart_rx : impl Into < UartRx > , uart_tx : impl Into < UartTx > , ) -> Uart { let gclk0 = clocks . gclk0 ( ) ; let clock = & clocks . sercom0_core ( & gclk0 ) . unwrap ( ) ; let baud = baud . into ( ) ; let pads = uart :: Pads :: default ( ) . rx ( uart_rx . into ( ) ) . tx ( uart_tx . into ( ) ) ; uart :: Config :: new ( mclk , sercom , pads , clock . freq ( ) ) . baud ( baud , BaudMode :: Fractional ( Oversampling :: Bits16 ) ) . enable ( ) }
Convenience for setting up the labelled RX, TX pins to
operate as a UART device running at the specified baud.
Convenience for setting up the labelled RX TX pins to operate as a UART device running at the specified baud .
clocks
&mut GenericClockController
baud
impl Into<Hertz>
sercom
UartSercom
mclk
&mut pac::MCLK
uart_rx
impl Into<UartRx>
uart_tx
impl Into<UartTx>