pub fn init(
        self,
        clocks: &mut GenericClockController,
        baud: impl Into<Hertz>,
        sercom2: pac::SERCOM2,
        pm: &mut pac::PM,
    ) -> SpiConfig {
        let gclk0 = clocks.gclk0();
        let clock = clocks.sercom2_core(&gclk0).unwrap();
        let pads = spi::Pads::default()
            .data_in(self.miso)
            .data_out(self.mosi)
            .sclk(self.sclk);
        spi::Config::new(pm, sercom2, pads, clock.freq())
            .spi_mode(spi::MODE_0)
            .baud(baud)
            .enable()
    }
/// Convenience function for creating a mode 0 SPI interface on the SPI
/// pins.
Convenience function for creating a mode 0 SPI interface on the SPI
pins.
Convenience function for creating a mode 0 SPI interface on the SPI pins .
pub fn init(
        self,
        clocks: &mut GenericClockController,
        baud: impl Into<Hertz>,
        sercom2: pac::SERCOM2,
        pm: &mut pac::PM,
    ) -> SpiConfig {
        let gclk0 = clocks.gclk0();
        let clock = clocks.sercom2_core(&gclk0).unwrap();
        let pads = spi::Pads::default()
            .data_in(self.miso)
            .data_out(self.mosi)
            .sclk(self.sclk);
        spi::Config::new(pm, sercom2, pads, clock.freq())
            .spi_mode(spi::MODE_0)
            .baud(baud)
            .enable()
    }
pub fn init ( self , clocks : & mut GenericClockController , baud : impl Into < Hertz > , sercom2 : pac :: SERCOM2 , pm : & mut pac :: PM , ) -> SpiConfig { let gclk0 = clocks . gclk0 ( ) ; let clock = clocks . sercom2_core ( & gclk0 ) . unwrap ( ) ; let pads = spi :: Pads :: default ( ) . data_in ( self . miso ) . data_out ( self . mosi ) . sclk ( self . sclk ) ; spi :: Config :: new ( pm , sercom2 , pads , clock . freq ( ) ) . spi_mode ( spi :: MODE_0 ) . baud ( baud ) . enable ( ) }
Convenience function for creating a mode 0 SPI interface on the SPI
pins.
Convenience function for creating a mode 0 SPI interface on the SPI pins .
self
clocks
&mut GenericClockController
baud
impl Into<Hertz>
sercom2
pac::SERCOM2
pm
&mut pac::PM
self
clocks
&mut GenericClockController
baud
impl Into<Hertz>
sercom2
pac::SERCOM2
pm
&mut pac::PM