pub struct SpiBus<SPI, PINS> { /* private fields */ }
Expand description
SPI bus abstraction
Implementations§
source§impl<SPI, PINS> SpiBus<SPI, PINS>where
SPI: SpiX,
impl<SPI, PINS> SpiBus<SPI, PINS>where SPI: SpiX,
sourcepub fn new(spi: SPI, pins: PINS) -> Selfwhere
PINS: Pins<SPI>,
pub fn new(spi: SPI, pins: PINS) -> Selfwhere PINS: Pins<SPI>,
Construct the SpiBus for use with SpiSharedDevice or SpiExclusiveDevice
sourcepub fn release(self) -> (SPI, PINS)
pub fn release(self) -> (SPI, PINS)
Releases the SPI peripheral and associated pins
source§impl<SPI, PINS> SpiBus<SPI, PINS>where
SPI: SpiX,
PINS: Pins<SPI>,
impl<SPI, PINS> SpiBus<SPI, PINS>where SPI: SpiX, PINS: Pins<SPI>,
sourcepub fn new_device(self, config: &SpiConfig) -> SpiExclusiveDevice<SPI, PINS>
pub fn new_device(self, config: &SpiConfig) -> SpiExclusiveDevice<SPI, PINS>
Create a new SpiExclusiveDevice for exclusive use on this bus