Mercurial > public > ostc4
comparison Small_CPU/Inc/batteryGasGauge.h @ 330:2defc8cd93ce I2C_Improvment
Added check of configuration.
In case of a problem in I2C communication the initialization of the battery gauge may have failed. To detect this a check of configuration of I2C reinitialization have been added
author | ideenmodellierer |
---|---|
date | Wed, 17 Jul 2019 22:43:16 +0200 |
parents | 5f11787b4f42 |
children | 1b995079c045 |
comparison
equal
deleted
inserted
replaced
329:da5b91b1e20e | 330:2defc8cd93ce |
---|---|
27 extern "C" { | 27 extern "C" { |
28 #endif | 28 #endif |
29 | 29 |
30 /* Includes ------------------------------------------------------------------*/ | 30 /* Includes ------------------------------------------------------------------*/ |
31 | 31 |
32 #include <stdint.h> | |
33 | |
32 void init_battery_gas_gauge(void); | 34 void init_battery_gas_gauge(void); |
33 | 35 |
34 float get_voltage(void); | 36 float get_voltage(void); |
35 float get_charge(void); | 37 float get_charge(void); |
36 | 38 |
37 void battery_gas_gauge_get_data(void); | 39 void battery_gas_gauge_get_data(void); |
38 void battery_gas_gauge_set_charge_full(void); | 40 void battery_gas_gauge_set_charge_full(void); |
39 void battery_gas_gauge_set(float percentage); | 41 void battery_gas_gauge_set(float percentage); |
42 uint8_t battery_gas_gauge_CheckConfigOK(void); | |
40 | 43 |
41 #ifdef __cplusplus | 44 #ifdef __cplusplus |
42 } | 45 } |
43 #endif | 46 #endif |
44 | 47 |