nrfxlib API 0.1.0
Loading...
Searching...
No Matches
nrf_fuel_gauge.h File Reference

nRF Fuel Gauge library API. More...

#include <stdbool.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  battery_model
 Secondary cell (rechargeable) battery model parameters. More...
 
struct  nrf_fuel_gauge_state_info
 Library state information. Useful for debugging. More...
 
struct  nrf_fuel_gauge_config_parameters
 Optional static configuration parameters. More...
 
struct  nrf_fuel_gauge_runtime_parameters
 Optional runtime configuration parameters. More...
 
struct  nrf_fuel_gauge_init_parameters
 Library init parameter struct. More...
 

Functions

void nrf_fuel_gauge_opt_params_default_get (struct nrf_fuel_gauge_config_parameters *opt_params)
 Initialize optional configuration parameters to default values.
 
int nrf_fuel_gauge_init (const struct nrf_fuel_gauge_init_parameters *parameters, float *v0)
 Initialize the nRF Fuel Gauge library.
 
float nrf_fuel_gauge_process (float v, float i, float T, float t_delta, bool vbus_present, struct nrf_fuel_gauge_state_info *state)
 Process battery measurement values.
 
float nrf_fuel_gauge_tte_get (void)
 Get predicted "time-to-empty" discharge duration.
 
float nrf_fuel_gauge_ttf_get (bool cc_charging, float i_term)
 Get predicted "time-to-full" charging duration.
 
void nrf_fuel_gauge_idle_set (float v, float T, float i_avg)
 Put library into the idle state.
 
void nrf_fuel_gauge_param_adjust (const struct nrf_fuel_gauge_runtime_parameters *params)
 Update runtime parameters.
 
void nrf_fuel_gauge_opt_params_adjust (const struct nrf_fuel_gauge_config_parameters *opt_params)
 Update optional parameters.
 

Variables

const char * nrf_fuel_gauge_version
 Version number of nRF Fuel Gauge library in format "x.y.z".
 
const char * nrf_fuel_gauge_build_date
 Build date of nRF Fuel Gauge library.
 

Detailed Description

nRF Fuel Gauge library API.