pub fn base_controller_spi(
    clocks: &mut GenericClockController,
    sercom1: pac::SERCOM1,
    pm: &mut pac::PM,
    sck: Spi0Sck,
    mosi: Spi0Mosi,
    miso: Spi0Miso,
) -> Spi0 {
    let gclk0 = &clocks.gclk0();
    let clock = &clocks.sercom1_core(&gclk0).unwrap();
    let pads = spi::Pads::default().sclk(sck).data_in(miso).data_out(mosi);
    spi::Config::new(pm, sercom1, pads, clock.freq())
        .baud(BASE_CONTROLLER_FREQ)
        .spi_mode(BASE_CONTROLLER_SPI_MODE)
        .enable()
}
/// Convenience for setting up the labeled SPI0 peripheral.
/// SPI0 has the P1AM base controller connected.
/// This powers up SERCOM1 and configures it for talking to the
/// base controller.
Convenience for setting up the labeled SPI0 peripheral.
SPI0 has the P1AM base controller connected.
This powers up SERCOM1 and configures it for talking to the
base controller.
Convenience for setting up the labeled SPI0 peripheral . SPI0 has the P1AM base controller connected . This powers up SERCOM1 and configures it for talking to the base controller .
pub fn base_controller_spi(
    clocks: &mut GenericClockController,
    sercom1: pac::SERCOM1,
    pm: &mut pac::PM,
    sck: Spi0Sck,
    mosi: Spi0Mosi,
    miso: Spi0Miso,
) -> Spi0 {
    let gclk0 = &clocks.gclk0();
    let clock = &clocks.sercom1_core(&gclk0).unwrap();
    let pads = spi::Pads::default().sclk(sck).data_in(miso).data_out(mosi);
    spi::Config::new(pm, sercom1, pads, clock.freq())
        .baud(BASE_CONTROLLER_FREQ)
        .spi_mode(BASE_CONTROLLER_SPI_MODE)
        .enable()
}
pub fn base_controller_spi ( clocks : & mut GenericClockController , sercom1 : pac :: SERCOM1 , pm : & mut pac :: PM , sck : Spi0Sck , mosi : Spi0Mosi , miso : Spi0Miso , ) -> Spi0 { let gclk0 = & clocks . gclk0 ( ) ; let clock = & clocks . sercom1_core ( & gclk0 ) . unwrap ( ) ; let pads = spi :: Pads :: default ( ) . sclk ( sck ) . data_in ( miso ) . data_out ( mosi ) ; spi :: Config :: new ( pm , sercom1 , pads , clock . freq ( ) ) . baud ( BASE_CONTROLLER_FREQ ) . spi_mode ( BASE_CONTROLLER_SPI_MODE ) . enable ( ) }
Convenience for setting up the labeled SPI0 peripheral.
Convenience for setting up the labeled SPI0 peripheral .
clocks
&mut GenericClockController
sercom1
pac::SERCOM1
pm
&mut pac::PM
sck
Spi0Sck
mosi
Spi0Mosi
miso
Spi0Miso
clocks
&mut GenericClockController
sercom1
pac::SERCOM1
pm
&mut pac::PM
sck
Spi0Sck
mosi
Spi0Mosi
miso
Spi0Miso