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,
impl<'d, T> Spi<'d, T, FullDuplexMode>where
T: Instance,
Sourcepub 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>
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>
Constructs an SPI instance in 8bit dataframe mode.
Trait Implementations§
Source§impl<'d, C> WithDmaSpi2<'d, C> for Spi<'d, SPI2, FullDuplexMode>
impl<'d, C> WithDmaSpi2<'d, C> for Spi<'d, SPI2, FullDuplexMode>
Auto Trait Implementations§
impl<'d, T, M> Freeze for Spi<'d, T, M>where
T: Freeze,
impl<'d, T, M> RefUnwindSafe for Spi<'d, T, M>where
T: RefUnwindSafe,
M: RefUnwindSafe,
impl<'d, T, M> Send for Spi<'d, T, M>
impl<'d, T, M> Sync for Spi<'d, T, M>
impl<'d, T, M> Unpin for Spi<'d, T, M>
impl<'d, T, M> !UnwindSafe for Spi<'d, T, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more