comparison src/cs/drivers/drv_app/fchg/fchg_struct.h @ 253:769cf6273fe4

FCHG: beginning of battery simulation mode
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 12 May 2021 11:14:51 +0000
parents 75067af48bfd
children
comparison
equal deleted inserted replaced
252:27f17fbf0657 253:769cf6273fe4
45 struct battery_config { 45 struct battery_config {
46 UINT8 bars_thresh[NB_BARS_THRESH]; 46 UINT8 bars_thresh[NB_BARS_THRESH];
47 T_PWR_THRESHOLDS percent_thresh[MAX_PERCENT_THRESH]; 47 T_PWR_THRESHOLDS percent_thresh[MAX_PERCENT_THRESH];
48 }; 48 };
49 49
50 struct bsim_config {
51 UINT8 init_percent;
52 UINT8 start_enable;
53 UINT8 pad[2];
54 };
55
50 #define ICHG_AVG_WINDOW 6 56 #define ICHG_AVG_WINDOW 6
51 57
52 typedef struct { 58 typedef struct {
53 /* RiViera boilerplate */ 59 /* RiViera boilerplate */
54 T_RVF_ADDR_ID addr_id; 60 T_RVF_ADDR_ID addr_id;
58 /* configuration */ 64 /* configuration */
59 struct charging_config config; 65 struct charging_config config;
60 BOOL config_present; 66 BOOL config_present;
61 struct battery_config batt; 67 struct battery_config batt;
62 UINT16 nb_percent_thresh; 68 UINT16 nb_percent_thresh;
69 struct bsim_config bsim;
70 BOOL bsim_mode;
63 /* state */ 71 /* state */
64 enum fchg_state state; 72 enum fchg_state state;
65 UINT16 batt_mv; 73 UINT16 batt_mv;
66 UINT16 curr_disch_thresh; 74 UINT16 curr_disch_thresh;
67 /* valid only during a charging cycle */ 75 /* valid only during a charging cycle */