Interface to allow recording of the drawn current in a user defined resolution. More...
Interface to allow recording of the drawn current in a user defined resolution.
The LTC4150 driver will only track total charge transferred (separately for charging in discharging direction). However, there are use cases that required more precise data recording, e.g. a rolling average of the last minute. This interface allows application developers to implement the ideal trade-off between RAM, ROM and runtime overhead for the data recording and the level of information they require.
#include <ltc4150.h>
Data Fields | |
void(* | pulse )(ltc4150_dev_t *dev, ltc4150_dir_t dir, uint64_t now_usec, void *arg) |
Function to call on every pulse received from the LTC4150. | |
void(* | reset )(ltc4150_dev_t *dev, uint64_t now_usec, void *arg) |
Function to call upon driver initialization or reset. | |
void(* ltc4150_recorder_t::pulse) (ltc4150_dev_t *dev, ltc4150_dir_t dir, uint64_t now_usec, void *arg) |
Function to call on every pulse received from the LTC4150.
[in] | dev | The device the pulse was received from |
[in] | dir | Direction in which the charge is transferred |
[in] | now_usec | The system time the pulse was received in µs |
[in] | arg | (Optional) argument for this callback |
void(* ltc4150_recorder_t::reset) (ltc4150_dev_t *dev, uint64_t now_usec, void *arg) |
Function to call upon driver initialization or reset.
[in] | dev | The LTC4150 device to monitor |
[in] | now_usec | The system time the pulse was received in µs |
[in] | arg | (Optional) argument for this callback |