FreeCalypso > hg > fc-magnetite
comparison src/cs/drivers/drv_app/fchg/fchg_struct.h @ 322:c4077830aeeb
FCHG implementation code started
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 04 Dec 2017 05:55:58 +0000 |
parents | |
children | 8166b0afcf8c |
comparison
equal
deleted
inserted
replaced
321:5dea7e937c37 | 322:c4077830aeeb |
---|---|
1 /* | |
2 * Internal structure definitions for the FCHG SWE reside here. | |
3 * abb_inth.c will also need to include this header in order to | |
4 * get our T_PWR_CTRL_BLOCK definition. | |
5 */ | |
6 | |
7 #ifndef __FCHG_STRUCT_H | |
8 #define __FCHG_STRUCT_H | |
9 | |
10 #include "rv/rv_general.h" | |
11 #include "rvf/rvf_api.h" | |
12 #include "fchg/fchg_common.h" | |
13 | |
14 struct charging_config { | |
15 UINT16 start_delay; | |
16 UINT16 start_thresh; | |
17 UINT16 restart_thresh; | |
18 UINT16 charge_to_mv; | |
19 UINT16 overvoltage; | |
20 UINT16 ci_current; | |
21 UINT16 end_current; | |
22 UINT16 bciconf; | |
23 }; | |
24 | |
25 /* from original PWR SWE */ | |
26 typedef struct { | |
27 UINT16 bat_voltage; | |
28 T_PWR_PERCENT remain_capa; | |
29 } T_PWR_THRESHOLDS; | |
30 | |
31 #define MAX_THRESHOLDS 101 | |
32 | |
33 typedef struct { | |
34 /* RiViera boilerplate */ | |
35 T_RVF_ADDR_ID addr_id; | |
36 T_RVF_MB_ID prim_id; | |
37 /* configuration */ | |
38 struct charging_config config; | |
39 BOOL config_present; | |
40 T_PWR_THRESHOLDS batt_thresholds[MAX_THRESHOLDS]; | |
41 UINT16 nb_thresholds; | |
42 /* state */ | |
43 enum fchg_state state; | |
44 UINT16 batt_mv; | |
45 T_PWR_PERCENT curr_percent; | |
46 } T_PWR_CTRL_BLOCK; | |
47 | |
48 #endif /* include guard */ |