38
|
1 /**
|
|
2 ******************************************************************************
|
|
3 * @file batteryGasGauge.h
|
|
4 * @author heinrichs weikamp gmbh
|
|
5 * @version V0.0.1
|
|
6 * @date 09-Dec-2014
|
|
7 * @brief LTC2942
|
|
8 *
|
|
9 @verbatim
|
|
10 ==============================================================================
|
|
11 ##### How to use #####
|
|
12 ==============================================================================
|
|
13 @endverbatim
|
|
14 ******************************************************************************
|
|
15 * @attention
|
|
16 *
|
|
17 * <h2><center>© COPYRIGHT(c) 2014 heinrichs weikamp</center></h2>
|
|
18 *
|
|
19 ******************************************************************************
|
|
20 */
|
|
21
|
|
22 /* Define to prevent recursive inclusion -------------------------------------*/
|
|
23 #ifndef BATTERY_GAS_GAUGE_H
|
|
24 #define BATTERY_GAS_GAUGE_H
|
|
25
|
|
26 #ifdef __cplusplus
|
|
27 extern "C" {
|
|
28 #endif
|
|
29
|
|
30 /* Includes ------------------------------------------------------------------*/
|
|
31
|
330
|
32 #include <stdint.h>
|
|
33
|
662
|
34 #define BATTERY_DEFAULT_VOLTAGE (6.0f)
|
|
35 #define BATTERY_ENDOF_CHARGE_VOLTAGE (4.05f)
|
|
36 #define BATTERY_CHARGER_CONNECTED_VOLTAGE (4.2f)
|
|
37
|
669
|
38 #define BATTERY_CHARGE_UNKNOWN (-1.0f)
|
|
39
|
38
|
40 void init_battery_gas_gauge(void);
|
|
41
|
|
42 float get_voltage(void);
|
|
43 float get_charge(void);
|
|
44
|
|
45 void battery_gas_gauge_get_data(void);
|
|
46 void battery_gas_gauge_set_charge_full(void);
|
|
47 void battery_gas_gauge_set(float percentage);
|
330
|
48 uint8_t battery_gas_gauge_CheckConfigOK(void);
|
38
|
49
|
669
|
50 uint8_t battery_gas_gauge_isChargeValueValid(void);
|
|
51 void battery_gas_gauge_setChargeValueValid(void);
|
|
52
|
|
53
|
38
|
54 #ifdef __cplusplus
|
|
55 }
|
|
56 #endif
|
|
57
|
|
58 #endif /* BATTERY_GAS_GAUGE_H */
|
|
59
|
|
60 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/
|