pub fn spi_master<F: Into<Hertz>>(
    clocks: &mut GenericClockController,
    bus_speed: F,
    sercom6: pac::SERCOM6,
    mclk: &mut pac::MCLK,
    sck: gpio::Pc17<Input<Floating>>,
    mosi: gpio::Pc16<Input<Floating>>,
    miso: gpio::Pc19<Input<Floating>>,
    port: &mut Port,
) -> SPIMaster6<
    hal::sercom::Sercom6Pad3<gpio::Pc19<gpio::PfC>>,
    hal::sercom::Sercom6Pad0<gpio::Pc16<gpio::PfC>>,
    hal::sercom::Sercom6Pad1<gpio::Pc17<gpio::PfC>>,
> {
    let gclk0 = clocks.gclk0();
    SPIMaster6::new(
        &clocks.sercom6_core(&gclk0).unwrap(),
        bus_speed.into(),
        hal::hal::spi::Mode {
            phase: hal::hal::spi::Phase::CaptureOnFirstTransition,
            polarity: hal::hal::spi::Polarity::IdleLow,
        },
        sercom6,
        mclk,
        (miso.into_pad(port), mosi.into_pad(port), sck.into_pad(port)),
    )
}
/// Convenience for setting up the labelled SPI peripheral.
/// This powers up SERCOM6 and configures it for use as an
/// SPI Master in SPI Mode 0.
Convenience for setting up the labelled SPI peripheral.
This powers up SERCOM6 and configures it for use as an
SPI Master in SPI Mode 0.
Convenience for setting up the labelled SPI peripheral . This powers up SERCOM6 and configures it for use as an SPI Master in SPI Mode 0 .
pub fn spi_master<F: Into<Hertz>>(
    clocks: &mut GenericClockController,
    bus_speed: F,
    sercom6: pac::SERCOM6,
    mclk: &mut pac::MCLK,
    sck: gpio::Pc17<Input<Floating>>,
    mosi: gpio::Pc16<Input<Floating>>,
    miso: gpio::Pc19<Input<Floating>>,
    port: &mut Port,
) -> SPIMaster6<
    hal::sercom::Sercom6Pad3<gpio::Pc19<gpio::PfC>>,
    hal::sercom::Sercom6Pad0<gpio::Pc16<gpio::PfC>>,
    hal::sercom::Sercom6Pad1<gpio::Pc17<gpio::PfC>>,
> {
    let gclk0 = clocks.gclk0();
    SPIMaster6::new(
        &clocks.sercom6_core(&gclk0).unwrap(),
        bus_speed.into(),
        hal::hal::spi::Mode {
            phase: hal::hal::spi::Phase::CaptureOnFirstTransition,
            polarity: hal::hal::spi::Polarity::IdleLow,
        },
        sercom6,
        mclk,
        (miso.into_pad(port), mosi.into_pad(port), sck.into_pad(port)),
    )
}
pub fn spi_master < F : Into < Hertz > > ( clocks : & mut GenericClockController , bus_speed : F , sercom6 : pac :: SERCOM6 , mclk : & mut pac :: MCLK , sck : gpio :: Pc17 < Input < Floating > > , mosi : gpio :: Pc16 < Input < Floating > > , miso : gpio :: Pc19 < Input < Floating > > , port : & mut Port , ) -> SPIMaster6 < hal :: sercom :: Sercom6Pad3 < gpio :: Pc19 < gpio :: PfC > > , hal :: sercom :: Sercom6Pad0 < gpio :: Pc16 < gpio :: PfC > > , hal :: sercom :: Sercom6Pad1 < gpio :: Pc17 < gpio :: PfC > > , > { let gclk0 = clocks . gclk0 ( ) ; SPIMaster6 :: new ( & clocks . sercom6_core ( & gclk0 ) . unwrap ( ) , bus_speed . into ( ) , hal :: hal :: spi :: Mode { phase : hal :: hal :: spi :: Phase :: CaptureOnFirstTransition , polarity : hal :: hal :: spi :: Polarity :: IdleLow , } , sercom6 , mclk , ( miso . into_pad ( port ) , mosi . into_pad ( port ) , sck . into_pad ( port ) ) , ) }
Convenience for setting up the labelled SPI peripheral.
Convenience for setting up the labelled SPI peripheral .
clocks
&mut GenericClockController
bus_speed
F
sercom6
pac::SERCOM6
mclk
&mut pac::MCLK
sck
gpio::Pc17<Input<Floating>>
mosi
gpio::Pc16<Input<Floating>>
miso
gpio::Pc19<Input<Floating>>
port
&mut Port
clocks
&mut GenericClockController
bus_speed
F
sercom6
pac::SERCOM6
mclk
&mut pac::MCLK
sck
gpio::Pc17<Input<Floating>>
mosi
gpio::Pc16<Input<Floating>>
miso
gpio::Pc19<Input<Floating>>
port
&mut Port