Struct stm32f4xx_hal::pac::SPI2
source · pub struct SPI2 { /* private fields */ }
Expand description
Serial peripheral interface
Implementations§
Trait Implementations§
source§impl DualInstance for SPI2
impl DualInstance for SPI2
§type I2sExtPeripheral = I2S2EXT
type I2sExtPeripheral = I2S2EXT
source§impl Enable for SPI2
impl Enable for SPI2
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 SPI2
impl LPEnable for SPI2
source§fn enable_in_low_power(rcc: &RccRB)
fn enable_in_low_power(rcc: &RccRB)
source§fn disable_in_low_power(rcc: &RccRB)
fn disable_in_low_power(rcc: &RccRB)
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 SPI2
impl PeriAddress for SPI2
impl DMASet<StreamX<DMA1, 3>, 0, PeripheralToMemory> for SPI2
impl DMASet<StreamX<DMA1, 4>, 0, MemoryToPeripheral> for SPI2
impl Instance for SPI2
impl Instance for SPI2
impl Send for SPI2
Auto Trait Implementations§
impl Freeze for SPI2
impl RefUnwindSafe for SPI2
impl !Sync for SPI2
impl Unpin for SPI2
impl UnwindSafe for SPI2
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> DualI2sExt for SPIwhere
SPI: DualInstance,
impl<SPI> DualI2sExt for SPIwhere
SPI: DualInstance,
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.