Struct capsules::ltc294x::LTC294XDriver [] [src]

pub struct LTC294XDriver<'a> {
    ltc294x: &'a LTC294X<'a>,
    callback: Cell<Option<Callback>>,
}

Default implementation of the LTC2941 driver that provides a Driver interface for providing access to applications.

Fields

Methods

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

[src]

Trait Implementations

impl<'a> LTC294XClient for LTC294XDriver<'a>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl<'a> Driver for LTC294XDriver<'a>
[src]

[src]

Setup callbacks.

subscribe_num

  • 0: Set the callback that that is triggered when events finish and when readings are ready. The first argument represents which callback was triggered.
    • 0: Interrupt occurred from the LTC294X.
    • 1: Got the status.
    • 2: Read the charge used.
    • 3: done() was called.
    • 4: Read the voltage.
    • 5: Read the current.

[src]

Request operations for the LTC294X chip.

command_num

  • 0: Driver check.
  • 1: Get status of the chip.
  • 2: Configure settings of the chip.
  • 3: Reset accumulated charge measurement to zero.
  • 4: Set the upper threshold for charge.
  • 5: Set the lower threshold for charge.
  • 6: Get the current charge accumulated.
  • 7: Shutdown the chip.
  • 8: Get the voltage reading. Only supported on the LTC2942 and LTC2943.
  • 9: Get the current reading. Only supported on the LTC2943.
  • 10: Set the model of the LTC294X actually being used. data is the value of the X.

[src]

allow lets an application give the driver access to a buffer in the application's memory. This returns ENOSUPPORT if not used. Read more