summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 6f013dec98..49b9a51d40 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -76,6 +76,13 @@ static int wrcount;
76#endif 76#endif
77 77
78static int shutdown_timeout = 0; 78static int shutdown_timeout = 0;
79#if CONFIG_CHARGING >= CHARGING_MONITOR
80charge_state_type charge_state; /* charging mode */
81#endif
82
83#if CONFIG_CHARGING
84charger_input_state_type charger_input_state IDATA_ATTR;
85#endif
79 86
80#ifdef SIMULATOR /***********************************************************/ 87#ifdef SIMULATOR /***********************************************************/
81 88
@@ -153,10 +160,16 @@ void set_battery_capacity(int capacity)
153 (void)capacity; 160 (void)capacity;
154} 161}
155 162
156void reset_poweroff_timer(void) 163#if BATTERY_TYPES_COUNT > 1
164void set_battery_type(int type)
157{ 165{
166 (void)type;
158} 167}
168#endif
159 169
170void reset_poweroff_timer(void)
171{
172}
160 173
161#else /* not SIMULATOR ******************************************************/ 174#else /* not SIMULATOR ******************************************************/
162 175
@@ -269,9 +282,6 @@ static const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
269}; 282};
270 283
271#if CONFIG_CHARGING 284#if CONFIG_CHARGING
272charger_input_state_type charger_input_state IDATA_ATTR;
273
274
275/* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */ 285/* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */
276static const unsigned short percent_to_volt_charge[11] = 286static const unsigned short percent_to_volt_charge[11] =
277{ 287{
@@ -305,10 +315,6 @@ static const unsigned short percent_to_volt_charge[11] =
305}; 315};
306#endif /* CONFIG_CHARGING */ 316#endif /* CONFIG_CHARGING */
307 317
308#if CONFIG_CHARGING >= CHARGING_MONITOR
309charge_state_type charge_state; /* charging mode */
310#endif
311
312#if CONFIG_CHARGING == CHARGING_CONTROL 318#if CONFIG_CHARGING == CHARGING_CONTROL
313int long_delta; /* long term delta battery voltage */ 319int long_delta; /* long term delta battery voltage */
314int short_delta; /* short term delta battery voltage */ 320int short_delta; /* short term delta battery voltage */