/// Set up the labelled TX/RX pins to operate as a UART device at the
/// specified baud rate.
Set up the labelled TX/RX pins to operate as a UART device at the
specified baud rate.
Set up the labelled TX / RX pins to operate as a UART device at the specified baud rate .
pub fn init<F: Into<Hertz>>(
        self,
        clocks: &mut GenericClockController,
        baud: F,
        sercom2: SERCOM2,
        mclk: &mut MCLK,
    ) -> HalUart {
        let gclk0 = clocks.gclk0();
        let pads = uart::Pads::default().rx(self.rx).tx(self.tx);
        uart::Config::new(
            mclk,
            sercom2,
            pads,
            clocks.sercom2_core(&gclk0).unwrap().freq(),
        )
        .baud(
            baud.into(),
            uart::BaudMode::Fractional(uart::Oversampling::Bits16),
        )
        .enable()
    }
pub fn init < F : Into < Hertz > > ( self , clocks : & mut GenericClockController , baud : F , sercom2 : SERCOM2 , mclk : & mut MCLK , ) -> HalUart { let gclk0 = clocks . gclk0 ( ) ; let pads = uart :: Pads :: default ( ) . rx ( self . rx ) . tx ( self . tx ) ; uart :: Config :: new ( mclk , sercom2 , pads , clocks . sercom2_core ( & gclk0 ) . unwrap ( ) . freq ( ) , ) . baud ( baud . into ( ) , uart :: BaudMode :: Fractional ( uart :: Oversampling :: Bits16 ) , ) . enable ( ) }
Set up the labelled TX/RX pins to operate as a UART device at the
specified baud rate.
Set up the labelled TX / RX pins to operate as a UART device at the specified baud rate .
self
clocks
&mut GenericClockController
baud
F
sercom2
SERCOM2
mclk
&mut MCLK