pub struct SPI1 { /* private fields */ }
Expand description
Serial peripheral interface
Implementations§
Trait Implementations§
Source§impl Enable for SPI1
impl Enable for SPI1
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 SPI1
impl LPEnable for SPI1
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 SPI1
impl PeriAddress for SPI1
Source§impl Reset for SPI1
impl Reset for SPI1
Source§fn reset(rcc: &RegisterBlock)
fn reset(rcc: &RegisterBlock)
Source§unsafe fn reset_unchecked()
unsafe fn reset_unchecked()
impl DMASet<StreamX<DMA2, 0>, 3, PeripheralToMemory> for SPI1
impl DMASet<StreamX<DMA2, 2>, 3, PeripheralToMemory> for SPI1
impl DMASet<StreamX<DMA2, 3>, 3, MemoryToPeripheral> for SPI1
impl DMASet<StreamX<DMA2, 5>, 3, MemoryToPeripheral> for SPI1
impl Instance for SPI1
impl Send for SPI1
Auto Trait Implementations§
impl Freeze for SPI1
impl RefUnwindSafe for SPI1
impl !Sync for SPI1
impl Unpin for SPI1
impl UnwindSafe for SPI1
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.