[][src]Struct max170xx::Max17043

pub struct Max17043<I2C> { /* fields omitted */ }

Device driver

Implementations

impl<I2C, E> Max17043<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

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]

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]

pub fn voltage(&mut self) -> Result<f32, Error<E>>[src]

Get battery voltage

Trait Implementations

impl<I2C: Debug> Debug for Max17043<I2C>[src]

Auto Trait Implementations

impl<I2C> RefUnwindSafe for Max17043<I2C> where
    I2C: RefUnwindSafe

impl<I2C> Send for Max17043<I2C> where
    I2C: Send

impl<I2C> Sync for Max17043<I2C> where
    I2C: Sync

impl<I2C> Unpin for Max17043<I2C> where
    I2C: Unpin

impl<I2C> UnwindSafe for Max17043<I2C> where
    I2C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.