pub fn sdmmc_spi<F: Into<Hertz>>(
    clocks: &mut GenericClockController,
    bus_speed: F,
    sercom2: pac::SERCOM2,
    pm: &mut pac::PM,
    sck: SdSck,
    mosi: SdMosi,
    miso: SdMiso,
) -> SdSpi {
    let gclk0 = &clocks.gclk0();
    let clock = &clocks.sercom2_core(&gclk0).unwrap();
    let pads = spi::Pads::default().sclk(sck).data_in(miso).data_out(mosi);
    spi::Config::new(pm, sercom2, pads, clock.freq())
        .baud(bus_speed)
        .enable()
}
/// Convenience for setting up the labeled SPI2 peripheral.
/// SPI2 has the microSD card slot connected.
/// This powers up SERCOM2 and configures it for talking to the
/// base controller.
Convenience for setting up the labeled SPI2 peripheral.
SPI2 has the microSD card slot connected.
This powers up SERCOM2 and configures it for talking to the
base controller.
Convenience for setting up the labeled SPI2 peripheral . SPI2 has the microSD card slot connected . This powers up SERCOM2 and configures it for talking to the base controller .
pub fn sdmmc_spi<F: Into<Hertz>>(
    clocks: &mut GenericClockController,
    bus_speed: F,
    sercom2: pac::SERCOM2,
    pm: &mut pac::PM,
    sck: SdSck,
    mosi: SdMosi,
    miso: SdMiso,
) -> SdSpi {
    let gclk0 = &clocks.gclk0();
    let clock = &clocks.sercom2_core(&gclk0).unwrap();
    let pads = spi::Pads::default().sclk(sck).data_in(miso).data_out(mosi);
    spi::Config::new(pm, sercom2, pads, clock.freq())
        .baud(bus_speed)
        .enable()
}
pub fn sdmmc_spi < F : Into < Hertz > > ( clocks : & mut GenericClockController , bus_speed : F , sercom2 : pac :: SERCOM2 , pm : & mut pac :: PM , sck : SdSck , mosi : SdMosi , miso : SdMiso , ) -> SdSpi { let gclk0 = & clocks . gclk0 ( ) ; let clock = & clocks . sercom2_core ( & gclk0 ) . unwrap ( ) ; let pads = spi :: Pads :: default ( ) . sclk ( sck ) . data_in ( miso ) . data_out ( mosi ) ; spi :: Config :: new ( pm , sercom2 , pads , clock . freq ( ) ) . baud ( bus_speed ) . enable ( ) }
Convenience for setting up the labeled SPI2 peripheral.
Convenience for setting up the labeled SPI2 peripheral .
clocks
&mut GenericClockController
bus_speed
F
sercom2
pac::SERCOM2
pm
&mut pac::PM
sck
SdSck
mosi
SdMosi
miso
SdMiso
clocks
&mut GenericClockController
bus_speed
F
sercom2
pac::SERCOM2
pm
&mut pac::PM
sck
SdSck
mosi
SdMosi
miso
SdMiso