RUI3 (RAK Unified Interface 3) - RAK4631
service_battery.h
Go to the documentation of this file.
1 
9 #ifndef __SERVICE_BATTERY_H__
10 #define __SERVICE_BATTERY_H__
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include <stdint.h>
17 #include <stdbool.h>
18 
19 #define SERVICE_BATT_MIN (2.0f)
20 #define SERVICE_BATT_2V0 (2.0f)
21 #define SERVICE_BATT_2V1 (2.1f)
22 #define SERVICE_BATT_2V2 (2.2f)
23 #define SERVICE_BATT_2V3 (2.3f)
24 #define SERVICE_BATT_2V4 (2.4f)
25 #define SERVICE_BATT_2V5 (2.5f)
26 #define SERVICE_BATT_2V6 (2.6f)
27 #define SERVICE_BATT_2V7 (2.7f)
28 #define SERVICE_BATT_2V8 (2.8f)
29 #define SERVICE_BATT_2V9 (2.9f)
30 #define SERVICE_BATT_3V0 (3.0f)
31 #define SERVICE_BATT_3V1 (3.1f)
32 #define SERVICE_BATT_3V2 (3.2f)
33 #define SERVICE_BATT_3V3 (3.3f)
34 #define SERVICE_BATT_3V4 (3.4f)
35 #define SERVICE_BATT_3V5 (3.5f)
36 #define SERVICE_BATT_3V6 (3.6f)
37 #define SERVICE_BATT_3V7 (3.7f)
38 #define SERVICE_BATT_3V8 (3.8f)
39 #define SERVICE_BATT_3V9 (3.9f)
40 #define SERVICE_BATT_4V0 (4.0f)
41 #define SERVICE_BATT_4V1 (4.1f)
42 #define SERVICE_BATT_4V2 (4.2f)
43 #define SERVICE_BATT_4V3 (4.3f)
44 #define SERVICE_BATT_4V4 (4.4f)
45 #define SERVICE_BATT_4V5 (4.5f)
46 #define SERVICE_BATT_4V6 (4.6f)
47 #define SERVICE_BATT_4V7 (4.7f)
48 #define SERVICE_BATT_4V8 (4.8f)
49 #define SERVICE_BATT_4V9 (4.9f)
50 #define SERVICE_BATT_5V0 (5.0f)
51 #define SERVICE_BATT_5V1 (5.1f)
52 #define SERVICE_BATT_5V2 (5.2f)
53 #define SERVICE_BATT_5V3 (5.3f)
54 #define SERVICE_BATT_5V4 (5.4f)
55 #define SERVICE_BATT_5V5 (5.5f)
56 #define SERVICE_BATT_5V6 (5.6f)
57 #define SERVICE_BATT_5V7 (5.7f)
58 #define SERVICE_BATT_5V8 (5.8f)
59 #define SERVICE_BATT_5V9 (5.9f)
60 #define SERVICE_BATT_6V0 (6.0f)
61 #define SERVICE_BATT_MAX (6.0f)
62 
63 typedef struct _batt_level {
64  float batt_vol;
65  uint32_t adc_val;
66 } batt_level;
67 
68 void service_battery_get_batt_level(float *bat_lvl);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif // __SERVICE_BATTERY_H__
75 
Definition: service_battery.h:63
void service_battery_get_batt_level(float *bat_lvl)
struct _batt_level batt_level
float batt_vol
Definition: service_battery.h:64
uint32_t adc_val
Definition: service_battery.h:65