Struct capsules::ltc294x::LTC294X [] [src]

pub struct LTC294X<'a> {
    i2c: &'a I2CDevice,
    interrupt_pin: Option<&'a Pin>,
    model: Cell<ChipModel>,
    state: Cell<State>,
    buffer: TakeCell<'static, [u8]>,
    client: Cell<Option<&'static LTC294XClient>>,
}

Implementation of a driver for the LTC294X coulomb counters.

Fields

Methods

impl<'a> LTC294X<'a>
[src]

[src]

[src]

[src]

[src]

[src]

Set the accumulated charge to 0

[src]

[src]

[src]

Get the cumulative charge as measured by the LTC2941.

[src]

Get the voltage at sense+

[src]

Get the current sensed by the resistor

[src]

Put the LTC294X in a low power state.

[src]

Set the LTC294X model actually on the board.

Trait Implementations

impl<'a> I2CClient for LTC294X<'a>
[src]

[src]

Called when an I2C command completed. The error denotes whether the command completed successfully or if an error occured. Read more

impl<'a> Client for LTC294X<'a>
[src]

[src]

Called when an interrupt occurs. The identifier will be the same value that was passed to enable_interrupt() when the interrupt was configured. Read more