LTC4150 coulomb counter.
More...
#include <stdint.h>
#include "mutex.h"
#include "periph/gpio.h"
Go to the source code of this file.
|
int | ltc4150_init (ltc4150_dev_t *dev, const ltc4150_params_t *params) |
| Initialize the LTC4150 driver.
|
|
int | ltc4150_reset_counters (ltc4150_dev_t *dev) |
| Clear current counters of the given LTC4150 device.
|
|
int | ltc4150_shutdown (ltc4150_dev_t *dev) |
| Disable the interrupt handler and turn the chip off.
|
|
int | ltc4150_charge (ltc4150_dev_t *dev, uint32_t *charged, uint32_t *discharged) |
| Get the measured charge since boot or last reset in millicoulomb.
|
|
int | ltc4150_avg_current (ltc4150_dev_t *dev, int16_t *dest) |
| Get the average current drawn in E-01 milliampere.
|
|
int | ltc4150_last_minute_charge (ltc4150_dev_t *dev, ltc4150_last_minute_data_t *data, uint32_t *charged, uint32_t *discharged) |
| Get the measured charge in the last minute.
|
|
void | ltc4150_pulses2c (const ltc4150_dev_t *dev, uint32_t *charged, uint32_t *discharged, uint32_t raw_charged, uint32_t raw_discharged) |
| Convert the raw data (# pulses) acquired by the LTC4150 device to charge information in millicoulomb.
|
|
|
const ltc4150_recorder_t | ltc4150_last_minute |
| Records the charge transferred within the last minute using.
|
|