annotate Small_CPU/Inc/batteryGasGauge.h @ 788:4abfb8a2a435

Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
author heinrichsweikamp
date Tue, 04 Jul 2023 14:39:06 +0200
parents c1e203ffb478
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file batteryGasGauge.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author heinrichs weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V0.0.1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 09-Dec-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief LTC2942
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 @verbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 ==============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 ##### How to use #####
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 ==============================================================================
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 @endverbatim
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * <h2><center>&copy; COPYRIGHT(c) 2014 heinrichs weikamp</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 #ifndef BATTERY_GAS_GAUGE_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 #define BATTERY_GAS_GAUGE_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31
330
2defc8cd93ce Added check of configuration.
ideenmodellierer
parents: 38
diff changeset
32 #include <stdint.h>
2defc8cd93ce Added check of configuration.
ideenmodellierer
parents: 38
diff changeset
33
662
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
34 #define BATTERY_DEFAULT_VOLTAGE (6.0f)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
35 #define BATTERY_ENDOF_CHARGE_VOLTAGE (4.05f)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
36 #define BATTERY_CHARGER_CONNECTED_VOLTAGE (4.2f)
1b995079c045 PSCR Mode
heinrichs weikamp
parents: 330
diff changeset
37
669
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
38 #define BATTERY_CHARGE_UNKNOWN (-1.0f)
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
39
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 void init_battery_gas_gauge(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 float get_voltage(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 float get_charge(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 void battery_gas_gauge_get_data(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 void battery_gas_gauge_set_charge_full(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 void battery_gas_gauge_set(float percentage);
330
2defc8cd93ce Added check of configuration.
ideenmodellierer
parents: 38
diff changeset
48 uint8_t battery_gas_gauge_CheckConfigOK(void);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49
669
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
50 uint8_t battery_gas_gauge_isChargeValueValid(void);
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
51 void battery_gas_gauge_setChargeValueValid(void);
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
52
c1e203ffb478 Rework charge cycle:
Ideenmodellierer
parents: 662
diff changeset
53
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 #endif /* BATTERY_GAS_GAUGE_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/