Struct esp32c3_hal::spi::slave::Spi

source ·
pub struct Spi<'d, T, M> { /* private fields */ }
Expand description

SPI peripheral driver

Implementations§

source§

impl<'d, T> Spi<'d, T, FullDuplexMode>where T: Instance,

source

pub fn new<SCK, MOSI, MISO, CS>( spi: impl Peripheral<P = T> + 'd, sck: impl Peripheral<P = SCK> + 'd, mosi: impl Peripheral<P = MOSI> + 'd, miso: impl Peripheral<P = MISO> + 'd, cs: impl Peripheral<P = CS> + 'd, mode: SpiMode ) -> Spi<'d, T, FullDuplexMode>where SCK: InputPin, MOSI: InputPin, MISO: OutputPin, CS: InputPin,

Constructs an SPI instance in 8bit dataframe mode.

Trait Implementations§

source§

impl<'d, C> WithDmaSpi2<'d, C> for Spi<'d, SPI2, FullDuplexMode>where C: ChannelTypes, <C as ChannelTypes>::P: SpiPeripheral + Spi2Peripheral,

source§

fn with_dma(self, channel: Channel<'d, C>) -> SpiDma<'d, SPI2, C>

Auto Trait Implementations§

§

impl<'d, T, M> RefUnwindSafe for Spi<'d, T, M>where M: RefUnwindSafe, T: RefUnwindSafe,

§

impl<'d, T, M> Send for Spi<'d, T, M>where M: Send, T: Send,

§

impl<'d, T, M> Sync for Spi<'d, T, M>where M: Sync, T: Sync,

§

impl<'d, T, M> Unpin for Spi<'d, T, M>where M: Unpin, T: Unpin,

§

impl<'d, T, M> !UnwindSafe for Spi<'d, T, M>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.