pub fn uart(
    clocks: &mut GenericClockController,
    baud: impl Into<Hertz>,
    sercom5: Sercom5,
    mclk: &mut pac::MCLK,
    rx: impl Into<UartRx>,
    tx: impl Into<UartTx>,
) -> Uart {
    let gclk0 = clocks.gclk0();

    let clock = &clocks.sercom5_core(&gclk0).unwrap();
    let baud = baud.into();
    let pads = uart::Pads::default().rx(rx.into()).tx(tx.into());
    uart::Config::new(mclk, sercom5, 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.
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>,
    sercom5: Sercom5,
    mclk: &mut pac::MCLK,
    rx: impl Into<UartRx>,
    tx: impl Into<UartTx>,
) -> Uart {
    let gclk0 = clocks.gclk0();
    let clock = &clocks.sercom5_core(&gclk0).unwrap();
    let baud = baud.into();
    let pads = uart::Pads::default().rx(rx.into()).tx(tx.into());
    uart::Config::new(mclk, sercom5, pads, clock.freq())
        .baud(baud, BaudMode::Fractional(Oversampling::Bits16))
        .enable()
}
pub fn uart ( clocks : & mut GenericClockController , baud : impl Into < Hertz > , sercom5 : Sercom5 , mclk : & mut pac :: MCLK , rx : impl Into < UartRx > , tx : impl Into < UartTx > , ) -> Uart { let gclk0 = clocks . gclk0 ( ) ; let clock = & clocks . sercom5_core ( & gclk0 ) . unwrap ( ) ; let baud = baud . into ( ) ; let pads = uart :: Pads :: default ( ) . rx ( rx . into ( ) ) . tx ( tx . into ( ) ) ; uart :: Config :: new ( mclk , sercom5 , 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>
sercom5
Sercom5
mclk
&mut pac::MCLK
rx
impl Into<UartRx>
tx
impl Into<UartTx>
clocks
&mut GenericClockController
baud
impl Into<Hertz>
sercom5
Sercom5
mclk
&mut pac::MCLK
rx
impl Into<UartRx>
tx
impl Into<UartTx>