Struct capsules::max17205::MAX17205
[−]
[src]
pub struct MAX17205<'a> { i2c_lower: &'a I2CDevice, i2c_upper: &'a I2CDevice, state: Cell<State>, soc: Cell<u16>, soc_mah: Cell<u16>, voltage: Cell<u16>, buffer: TakeCell<'static, [u8]>, client: Cell<Option<&'static MAX17205Client>>, }
Fields
i2c_lower: &'a I2CDevice
i2c_upper: &'a I2CDevice
state: Cell<State>
soc: Cell<u16>
soc_mah: Cell<u16>
voltage: Cell<u16>
buffer: TakeCell<'static, [u8]>
client: Cell<Option<&'static MAX17205Client>>
Methods
impl<'a> MAX17205<'a>
[src]
pub fn new(
i2c_lower: &'a I2CDevice,
i2c_upper: &'a I2CDevice,
buffer: &'static mut [u8]
) -> MAX17205<'a>
[src]
i2c_lower: &'a I2CDevice,
i2c_upper: &'a I2CDevice,
buffer: &'static mut [u8]
) -> MAX17205<'a>
pub fn set_client<C: MAX17205Client>(&self, client: &'static C)
[src]
fn setup_read_status(&self) -> ReturnCode
[src]
fn setup_read_soc(&self) -> ReturnCode
[src]
fn setup_read_curvolt(&self) -> ReturnCode
[src]
fn setup_read_coulomb(&self) -> ReturnCode
[src]
fn setup_read_romid(&self) -> ReturnCode
[src]
Trait Implementations
impl<'a> I2CClient for MAX17205<'a>
[src]
fn command_complete(&self, buffer: &'static mut [u8], _error: Error)
[src]
Called when an I2C command completed. The error
denotes whether the command completed successfully or if an error occured. Read more