nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ nrf_fuel_gauge_init()

int nrf_fuel_gauge_init ( const struct nrf_fuel_gauge_init_parameters * parameters,
float * v0 )

#include <nrf_fuel_gauge/include/nrf_fuel_gauge.h>

Initialize the nRF Fuel Gauge library.

The library can be initialized based on a previously stored state. This is useful when there are periods without RAM retention. To resume from a previously stored state, the battery model must be the same as when the library was first initialized.

Note
The battery model referenced in nrf_fuel_gauge_init_parameters must be kept valid as long as the library is in use.
Parameters
[in]parametersPointer to the parameter structure.
[out]v0Adjusted battery voltage (optional, for logging purposes).
Return values
0Initialization successful.
-22Initialization failed due to invalid parameters.