Trait SpiExt

Source
pub trait SpiExt: Sized + Instance {
    // Required methods
    fn spi(
        self,
        pins: (impl Into<Self::Sck>, impl Into<Self::Miso>, impl Into<Self::Mosi>),
        mode: impl Into<Mode>,
        freq: Hertz,
        clocks: &Clocks,
    ) -> Spi<Self, false, u8>;
    fn spi_bidi(
        self,
        pins: (impl Into<Self::Sck>, impl Into<Self::Mosi>),
        mode: impl Into<Mode>,
        freq: Hertz,
        clocks: &Clocks,
    ) -> Spi<Self, true, u8>
       where NoPin: Into<Self::Miso>;
    fn spi_slave(
        self,
        pins: (impl Into<Self::Sck>, impl Into<Self::Miso>, impl Into<Self::Mosi>, Option<Self::Nss>),
        mode: impl Into<Mode>,
    ) -> SpiSlave<Self, false, u8>;
    fn spi_bidi_slave(
        self,
        pins: (impl Into<Self::Sck>, impl Into<Self::Miso>, Option<Self::Nss>),
        mode: impl Into<Mode>,
    ) -> SpiSlave<Self, true, u8>
       where NoPin: Into<Self::Mosi>;
}

Required Methods§

Source

fn spi( self, pins: (impl Into<Self::Sck>, impl Into<Self::Miso>, impl Into<Self::Mosi>), mode: impl Into<Mode>, freq: Hertz, clocks: &Clocks, ) -> Spi<Self, false, u8>

Source

fn spi_bidi( self, pins: (impl Into<Self::Sck>, impl Into<Self::Mosi>), mode: impl Into<Mode>, freq: Hertz, clocks: &Clocks, ) -> Spi<Self, true, u8>
where NoPin: Into<Self::Miso>,

Source

fn spi_slave( self, pins: (impl Into<Self::Sck>, impl Into<Self::Miso>, impl Into<Self::Mosi>, Option<Self::Nss>), mode: impl Into<Mode>, ) -> SpiSlave<Self, false, u8>

Source

fn spi_bidi_slave( self, pins: (impl Into<Self::Sck>, impl Into<Self::Miso>, Option<Self::Nss>), mode: impl Into<Mode>, ) -> SpiSlave<Self, true, u8>
where NoPin: Into<Self::Mosi>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<SPI: Instance> SpiExt for SPI