Driver for the Maxim MAX17205 fuel gauge.
https://www.maximintegrated.com/en/products/power/battery-management/MAX17205.html
The MAX1720x/MAX1721x are ultra-low power stand-alone fuel gauge ICs that
implement the Maxim ModelGauge™ m5 algorithm without requiring host
interaction for configuration. This feature makes the MAX1720x/MAX1721x
excellent pack-side fuel gauges. The MAX17201/MAX17211 monitor a single
cell pack. The MAX17205/MAX17215 monitor and balance a 2S or 3S pack or
monitor a multiple-series cell pack.
let max17205_i2c_lower = static_init!(
capsules::virtual_i2c::I2CDevice,
capsules::virtual_i2c::I2CDevice::new(i2c_bus, 0x36));
let max17205_i2c_upper = static_init!(
capsules::virtual_i2c::I2CDevice,
capsules::virtual_i2c::I2CDevice::new(i2c_bus, 0x0B));
let max17205 = static_init!(
capsules::max17205::MAX17205<'static>,
capsules::max17205::MAX17205::new(max17205_i2c_lower, max17205_i2c_upper,
&mut capsules::max17205::BUFFER));
max17205_i2c.set_client(max17205);
let max17205_driver = static_init!(
capsules::max17205::MAX17205Driver<'static>,
capsules::max17205::MAX17205Driver::new(max17205));
max17205.set_client(max17205_driver);