[−][src]Function pyportal::spi_master
pub fn spi_master<F: Into<Hertz>>(
clocks: &mut GenericClockController,
bus_speed: F,
sercom2: SERCOM2,
mclk: &mut MCLK,
sck: Pa13<Input<Floating>>,
mosi: Pa12<Input<Floating>>,
miso: Pa14<Input<Floating>>,
port: &mut Port
) -> SPIMaster2<Sercom2Pad2<Pa14<PfC>>, Sercom2Pad0<Pa12<PfC>>, Sercom2Pad1<Pa13<PfC>>>
This powers up SERCOM2 and configures it for use as an
SPI Master in SPI Mode 0.
Unlike the flash_spi_master
function, this
one does not accept a CS pin; configuring a pin for CS
is the responsibility of the caller, because it could be
any OutputPin, or even a pulled up line on the slave.