pub struct Spi<SPI, PINS> { /* private fields */ }Expand description
SPI peripheral operating in full duplex master mode
Implementations§
Source§impl<SCK, MISO, MOSI> Spi<SPI1, (SCK, MISO, MOSI)>
impl<SCK, MISO, MOSI> Spi<SPI1, (SCK, MISO, MOSI)>
Sourcepub fn spi1(
spi: SPI1,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: Hertz,
clocks: Clocks,
apb2: &mut <SPI1 as RccBus>::Bus,
) -> Self
pub fn spi1( spi: SPI1, pins: (SCK, MISO, MOSI), mode: Mode, freq: Hertz, clocks: Clocks, apb2: &mut <SPI1 as RccBus>::Bus, ) -> Self
Configures the SPI peripheral to operate in full duplex master mode
pub fn spi1_slave( spi: SPI1, pins: (SCK, MISO, MOSI), mode: Mode, apb2: &mut <SPI1 as RccBus>::Bus, ) -> Self
pub fn clear_overrun(&mut self)
Sourcepub fn free(self) -> (SPI1, (SCK, MISO, MOSI))
pub fn free(self) -> (SPI1, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
Source§impl<SCK, MISO, MOSI> Spi<SPI3, (SCK, MISO, MOSI)>
impl<SCK, MISO, MOSI> Spi<SPI3, (SCK, MISO, MOSI)>
Sourcepub fn spi3(
spi: SPI3,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: Hertz,
clocks: Clocks,
apb2: &mut <SPI3 as RccBus>::Bus,
) -> Self
pub fn spi3( spi: SPI3, pins: (SCK, MISO, MOSI), mode: Mode, freq: Hertz, clocks: Clocks, apb2: &mut <SPI3 as RccBus>::Bus, ) -> Self
Configures the SPI peripheral to operate in full duplex master mode
pub fn spi3_slave( spi: SPI3, pins: (SCK, MISO, MOSI), mode: Mode, apb2: &mut <SPI3 as RccBus>::Bus, ) -> Self
pub fn clear_overrun(&mut self)
Sourcepub fn free(self) -> (SPI3, (SCK, MISO, MOSI))
pub fn free(self) -> (SPI3, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
Source§impl<SCK, MISO, MOSI> Spi<SPI2, (SCK, MISO, MOSI)>
impl<SCK, MISO, MOSI> Spi<SPI2, (SCK, MISO, MOSI)>
Sourcepub fn spi2(
spi: SPI2,
pins: (SCK, MISO, MOSI),
mode: Mode,
freq: Hertz,
clocks: Clocks,
apb2: &mut <SPI2 as RccBus>::Bus,
) -> Self
pub fn spi2( spi: SPI2, pins: (SCK, MISO, MOSI), mode: Mode, freq: Hertz, clocks: Clocks, apb2: &mut <SPI2 as RccBus>::Bus, ) -> Self
Configures the SPI peripheral to operate in full duplex master mode
pub fn spi2_slave( spi: SPI2, pins: (SCK, MISO, MOSI), mode: Mode, apb2: &mut <SPI2 as RccBus>::Bus, ) -> Self
pub fn clear_overrun(&mut self)
Sourcepub fn free(self) -> (SPI2, (SCK, MISO, MOSI))
pub fn free(self) -> (SPI2, (SCK, MISO, MOSI))
Releases the SPI peripheral and associated pins
Trait Implementations§
impl<PINS> Default<u8> for Spi<SPI1, PINS>
impl<PINS> Default<u8> for Spi<SPI1, PINS>
impl<PINS> Default<u8> for Spi<SPI2, PINS>
impl<PINS> Default<u8> for Spi<SPI2, PINS>
impl<PINS> Default<u8> for Spi<SPI3, PINS>
impl<PINS> Default<u8> for Spi<SPI3, PINS>
Auto Trait Implementations§
impl<SPI, PINS> Freeze for Spi<SPI, PINS>
impl<SPI, PINS> RefUnwindSafe for Spi<SPI, PINS>where
SPI: RefUnwindSafe,
PINS: RefUnwindSafe,
impl<SPI, PINS> Send for Spi<SPI, PINS>
impl<SPI, PINS> Sync for Spi<SPI, PINS>
impl<SPI, PINS> Unpin for Spi<SPI, PINS>
impl<SPI, PINS> UnwindSafe for Spi<SPI, PINS>where
SPI: UnwindSafe,
PINS: UnwindSafe,
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