[−][src]Struct mpu9250::I2cDevice
An I2C device. Use I2CDevice when the MPU9250 is connected via I2C
Methods
impl<E, I2C> I2cDevice<I2C> where
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
[src]
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
Trait Implementations
impl<E, I2C> Device for I2cDevice<I2C> where
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
[src]
I2C: Read<Error = E> + Write<Error = E> + WriteRead<Error = E>,
type Error = E
The type of error for all results
fn read_many<N: ArrayLength<u8>>(
&mut self,
reg: Register
) -> Result<GenericArray<u8, N>, Self::Error>
[src]
&mut self,
reg: Register
) -> Result<GenericArray<u8, N>, Self::Error>
fn write(&mut self, reg: Register, val: u8) -> Result<(), Self::Error>
[src]
fn read(&mut self, reg: Register) -> Result<u8, Self::Error>
[src]
Read a single value from the register
fn modify<F>(&mut self, reg: Register, f: F) -> Result<(), Self::Error> where
F: FnOnce(u8) -> u8,
[src]
F: FnOnce(u8) -> u8,
Modify the value in the register using the provided closure. The closure accepts the current value of the register, permitting conditional checks before modification. Read more
Auto Trait Implementations
impl<I2C> Send for I2cDevice<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for I2cDevice<I2C> where
I2C: Sync,
I2C: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom 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 for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,