SpiBusWrapper

Type Alias SpiBusWrapper 

Source
pub type SpiBusWrapper = RefCell<SpiBusInner>;
Expand description

Shared SPI bus wrapper type, selected by the active bus-sharing feature.

This type wraps SpiBusInner in a concurrency-safe container so that both the display and the SD card can share the same SPI2 peripheral:

FeatureWrapperThread safety
RefCellBusRefCell<SpiBusInner>Single-core, no ISRs.
CriticalSectionBusMutex<RefCell<SpiBusInner>>Safe with ISRs.
AtomicBusAtomicCell<SpiBusInner>Lock-free (blocking only).
AsyncBusembassy_sync::Mutex<…>Async-safe.

The wrapper lives in a 'static [StaticCell]; you receive a &'static SpiBusWrapper from init_bus and pass it to [make_device] for each peripheral.

Aliased Type§

pub struct SpiBusWrapper { /* private fields */ }