[−][src]Struct max170xx::Max17043
Device driver
Implementations
impl<I2C, E> Max17043<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn new(i2c: I2C) -> Self
[src]
Create new instance of the device.
pub fn destroy(self) -> I2C
[src]
Destroy driver instance, return I2C bus.
pub fn quickstart(&mut self) -> Result<(), Error<E>>
[src]
Quick start
Restarts fuel-gauge calculations in the same manner as initial power-up of the IC. This is useful if an application's power-up sequence is exceedingly noisy
pub fn version(&mut self) -> Result<u16, Error<E>>
[src]
Get IC version
impl<I2C, E> Max17043<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn soc(&mut self) -> Result<f32, Error<E>>
[src]
Get state of charge of the cell as calculated by the ModelGauge algorithm as a percentage.
pub fn reset(&mut self) -> Result<(), Error<E>>
[src]
Software reset
impl<I2C, E> Max17043<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
Trait Implementations
Auto Trait Implementations
impl<I2C> RefUnwindSafe for Max17043<I2C> where
I2C: RefUnwindSafe,
I2C: RefUnwindSafe,
impl<I2C> Send for Max17043<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for Max17043<I2C> where
I2C: Sync,
I2C: Sync,
impl<I2C> Unpin for Max17043<I2C> where
I2C: Unpin,
I2C: Unpin,
impl<I2C> UnwindSafe for Max17043<I2C> where
I2C: UnwindSafe,
I2C: UnwindSafe,
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, 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>,