Struct shared_bus::SpiProxy [−][src]
pub struct SpiProxy<'a, M> { /* fields omitted */ }
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
impl<'a, M: BusMutex> Clone for SpiProxy<'a, M>
[src][+]
impl<'a, M: Debug> Debug for SpiProxy<'a, M>
[src][+]
impl<'a, M: BusMutex> Transfer<u8> for SpiProxy<'a, M> where
M::Bus: Transfer<u8>,
[src][+]
M::Bus: Transfer<u8>,
impl<'a, M: BusMutex> Write<u8> for SpiProxy<'a, M> where
M::Bus: Write<u8>,
[src][+]
M::Bus: Write<u8>,
Auto Trait Implementations
impl<'a, M> RefUnwindSafe for SpiProxy<'a, M> where
M: RefUnwindSafe,
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,
M: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,