[−][src]Trait wio_terminal::prelude::_atsamd_hal_spi_common_CommonSpi
Required methods
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
Provided methods
pub fn disable(&mut self)
[src]
Disable the SPI
pub fn enable(&mut self)
[src]
Enable the SPI
pub fn set_mode(&mut self, mode: Mode)
[src]
Set the polarity (CPOL) and phase (CPHA) of the SPI
pub fn freq<F>(&self, src_clock_freq: Hertz) -> Hertz where
F: Into<Hertz>,
[src]
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))
.
pub fn calculate_baud<F>(freq: F, src_clock_freq: Hertz) -> u8 where
F: Into<Hertz>,
[src]
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
.
Implementations on Foreign Types
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster5<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster2<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster4<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster1<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster3<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster6<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster0<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
impl<MISO, MOSI, SCK> CommonSpi for SPIMaster7<MISO, MOSI, SCK>
[src]
pub fn spi(&self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance
pub fn spi_mut(&mut self) -> &SPIM
[src]
Helper for accessing the spi member of the sercom instance