pub struct SPI4 { /* private fields */ }
Expand description
Serial peripheral interface
Implementations§
Trait Implementations§
Source§impl Enable for SPI4
impl Enable for SPI4
Source§fn enable(rcc: &RegisterBlock)
fn enable(rcc: &RegisterBlock)
Source§fn disable(rcc: &RegisterBlock)
fn disable(rcc: &RegisterBlock)
Source§fn is_enabled() -> bool
fn is_enabled() -> bool
Source§fn is_disabled() -> bool
fn is_disabled() -> bool
Source§unsafe fn enable_unchecked()
unsafe fn enable_unchecked()
Source§unsafe fn disable_unchecked()
unsafe fn disable_unchecked()
Source§impl LPEnable for SPI4
impl LPEnable for SPI4
Source§fn enable_in_low_power(rcc: &RegisterBlock)
fn enable_in_low_power(rcc: &RegisterBlock)
Source§fn disable_in_low_power(rcc: &RegisterBlock)
fn disable_in_low_power(rcc: &RegisterBlock)
Source§fn is_enabled_in_low_power() -> bool
fn is_enabled_in_low_power() -> bool
Source§fn is_disabled_in_low_power() -> bool
fn is_disabled_in_low_power() -> bool
Source§unsafe fn enable_in_low_power_unchecked()
unsafe fn enable_in_low_power_unchecked()
Source§unsafe fn disable_in_low_power_unchecked()
unsafe fn disable_in_low_power_unchecked()
Source§impl PeriAddress for SPI4
impl PeriAddress for SPI4
Source§impl Reset for SPI4
impl Reset for SPI4
Source§fn reset(rcc: &RegisterBlock)
fn reset(rcc: &RegisterBlock)
Source§unsafe fn reset_unchecked()
unsafe fn reset_unchecked()
impl DMASet<StreamX<DMA2, 0>, 4, PeripheralToMemory> for SPI4
impl DMASet<StreamX<DMA2, 1>, 4, MemoryToPeripheral> for SPI4
impl DMASet<StreamX<DMA2, 3>, 5, PeripheralToMemory> for SPI4
impl DMASet<StreamX<DMA2, 4>, 5, MemoryToPeripheral> for SPI4
impl Instance for SPI4
impl Send for SPI4
Auto Trait Implementations§
impl Freeze for SPI4
impl RefUnwindSafe for SPI4
impl !Sync for SPI4
impl Unpin for SPI4
impl UnwindSafe for SPI4
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
Source§impl<T> BusTimerClock for T
impl<T> BusTimerClock for T
Source§impl<SPI> SpiExt for SPIwhere
SPI: Instance,
impl<SPI> SpiExt for SPIwhere
SPI: Instance,
Source§fn spi(
self,
pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Miso>, impl Into<<SPI as SpiCommon>::Mosi>),
mode: impl Into<Mode>,
freq: Rate<u32, 1, 1>,
clocks: &Clocks,
) -> Spi<SPI>
fn spi( self, pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Miso>, impl Into<<SPI as SpiCommon>::Mosi>), mode: impl Into<Mode>, freq: Rate<u32, 1, 1>, clocks: &Clocks, ) -> Spi<SPI>
Enables the SPI clock, resets the peripheral, sets Alternate
mode for pins
and initialize the peripheral as SPI Master Normal mode.
§Note
Depending on freq
you may need to set GPIO speed for pins
(the Speed::Low
is default for GPIO) before create Spi
instance.
Otherwise it may lead to the ‘wrong last bit in every received byte’ problem.
Source§fn spi_bidi(
self,
pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Mosi>),
mode: impl Into<Mode>,
freq: Rate<u32, 1, 1>,
clocks: &Clocks,
) -> Spi<SPI, true>
fn spi_bidi( self, pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Mosi>), mode: impl Into<Mode>, freq: Rate<u32, 1, 1>, clocks: &Clocks, ) -> Spi<SPI, true>
Enables the SPI clock, resets the peripheral, sets Alternate
mode for pins
and initialize the peripheral as SPI Master BIDI mode.
§Note
Depending on freq
you may need to set GPIO speed for pins
(the Speed::Low
is default for GPIO) before create Spi
instance.
Otherwise it may lead to the ‘wrong last bit in every received byte’ problem.
Source§fn spi_slave(
self,
pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Miso>, impl Into<<SPI as SpiCommon>::Mosi>, Option<<SPI as SpiCommon>::Nss>),
mode: impl Into<Mode>,
) -> SpiSlave<SPI>
fn spi_slave( self, pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Miso>, impl Into<<SPI as SpiCommon>::Mosi>, Option<<SPI as SpiCommon>::Nss>), mode: impl Into<Mode>, ) -> SpiSlave<SPI>
Enables the SPI clock, resets the peripheral, sets Alternate
mode for pins
and initialize the peripheral as SPI Slave Normal mode.
§Note
Depending on freq
you may need to set GPIO speed for pins
(the Speed::Low
is default for GPIO) before create Spi
instance.
Otherwise it may lead to the ‘wrong last bit in every received byte’ problem.
Source§fn spi_bidi_slave(
self,
pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Miso>, Option<<SPI as SpiCommon>::Nss>),
mode: impl Into<Mode>,
) -> SpiSlave<SPI, true>
fn spi_bidi_slave( self, pins: (impl Into<<SPI as SpiCommon>::Sck>, impl Into<<SPI as SpiCommon>::Miso>, Option<<SPI as SpiCommon>::Nss>), mode: impl Into<Mode>, ) -> SpiSlave<SPI, true>
Enables the SPI clock, resets the peripheral, sets Alternate
mode for pins
and initialize the peripheral as SPI Slave BIDI mode.
§Note
Depending on freq
you may need to set GPIO speed for pins
(the Speed::Low
is default for GPIO) before create Spi
instance.
Otherwise it may lead to the ‘wrong last bit in every received byte’ problem.