[−][src]Trait samd11_bare::spi_common::CommonSpi
Required methods
fn spi(&self) -> &SPI
Helper for accessing the spi member of the sercom instance
fn spi_mut(&mut self) -> &SPI
Helper for accessing the spi member of the sercom instance
Provided methods
fn disable(&mut self)
Disable the SPI
fn enable(&mut self)
Enable the SPI
fn set_mode(&mut self, mode: Mode)
Set the polarity (CPOL) and phase (CPHA) of the SPI
fn freq<F>(&self, src_clock_freq: Hertz) -> Hertz where
F: Into<Hertz>,
F: Into<Hertz>,
Method for calculating the output frequency given our baud settings.
for synchronous SERCOM peripherals, the calculation for the final
frequency is f_baud = f_ref / (2 * (BAUD + 1))
.
fn calculate_baud<F>(freq: F, src_clock_freq: Hertz) -> u8 where
F: Into<Hertz>,
F: Into<Hertz>,
Helper for calculating our baudrate register
for synchronous SERCOM peripherals, the calculation for this
register is BAUD = f_ref / (2 * f_baud) - 1
.
Implementors
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster0<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPI
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPI
[src]
Helper for accessing the spi member of the sercom instance