Struct shared_bus::SpiProxy
source · [−]pub struct SpiProxy<'a, M> { /* private fields */ }
Expand description
Proxy type for SPI bus sharing.
The SpiProxy
implements all (blocking) SPI traits so it can be passed to drivers instead of
the bus instance. An SpiProxy
is created by calling BusManager::acquire_spi()
.
Note: The SpiProxy
can only be used for sharing withing a single task/thread. This
is due to drivers usually managing the chip-select pin manually which would be inherently racy
in a concurrent environment (because the mutex is locked only after asserting CS). To ensure
safe usage, a SpiProxy
can only be created when using BusManagerSimple
and is !Send
.
Trait Implementations
Auto Trait Implementations
impl<'a, M> RefUnwindSafe for SpiProxy<'a, M> where
M: RefUnwindSafe,
impl<'a, M> !Send for SpiProxy<'a, M>
impl<'a, M> !Sync for SpiProxy<'a, M>
impl<'a, M> Unpin for SpiProxy<'a, M>
impl<'a, M> UnwindSafe for SpiProxy<'a, M> where
M: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more