[−][src]Struct shared_bus::I2cProxy
Proxy type for I2C bus sharing.
The I2cProxy
implements all (blocking) I2C traits so it can be passed to drivers instead of
the bus instance. Internally, it holds reference to the bus via a mutex, ensuring that all
accesses are strictly synchronized.
An I2cProxy
is created by calling BusManager::acquire_i2c()
.
Trait Implementations
impl<'a, M: Debug + BusMutex> Debug for I2cProxy<'a, M>
[src]
impl<'a, M: BusMutex> Read for I2cProxy<'a, M> where
M::Bus: Read,
[src]
M::Bus: Read,
type Error = <M::Bus as Read>::Error
Error type
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Self::Error>
[src]
impl<'a, M: BusMutex> Write for I2cProxy<'a, M> where
M::Bus: Write,
[src]
M::Bus: Write,
type Error = <M::Bus as Write>::Error
Error type
fn write(&mut self, addr: u8, buffer: &[u8]) -> Result<(), Self::Error>
[src]
impl<'a, M: BusMutex> WriteRead for I2cProxy<'a, M> where
M::Bus: WriteRead,
[src]
M::Bus: WriteRead,
Auto Trait Implementations
impl<'a, M> RefUnwindSafe for I2cProxy<'a, M> where
M: RefUnwindSafe,
M: RefUnwindSafe,
impl<'a, M> Send for I2cProxy<'a, M> where
M: Sync,
M: Sync,
impl<'a, M> Sync for I2cProxy<'a, M> where
M: Sync,
M: Sync,
impl<'a, M> Unpin for I2cProxy<'a, M>
impl<'a, M> UnwindSafe for I2cProxy<'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,
fn borrow_mut(&mut self) -> &mut T
[src]
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, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,