summaryrefslogtreecommitdiffstats
path: root/firmware/export/powermgmt.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/powermgmt.h')
-rw-r--r--firmware/export/powermgmt.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h
index 3095d2c97b..a78386445e 100644
--- a/firmware/export/powermgmt.h
+++ b/firmware/export/powermgmt.h
@@ -70,6 +70,12 @@ extern unsigned int power_thread_inputs;
#endif /* CONFIG_CHARGING */
+enum shutdown_type
+{
+ SHUTDOWN_POWER_OFF,
+ SHUTDOWN_REBOOT,
+};
+
#if CONFIG_CHARGING == CHARGING_TARGET
/* Include target-specific definitions */
#include "powermgmt-target.h"
@@ -78,13 +84,6 @@ extern unsigned int power_thread_inputs;
/* Start up power management thread */
void powermgmt_init(void) INIT_ATTR;
-/* Generic current values that are intentionally meaningless - config header
- * should define proper numbers.*/
-
-#ifndef CURRENT_USB
-#define CURRENT_USB 2 /* usual current in mA in USB mode */
-#endif
-
#if CONFIG_CHARGING && !defined(CURRENT_MAX_CHG)
#define CURRENT_MAX_CHG 350 /* maximum charging current */
#endif
@@ -158,14 +157,16 @@ int get_battery_capacity(void); /* get local battery capacity value */
void set_battery_type(int type); /* set local battery type */
void set_sleeptimer_duration(int minutes);
+bool get_sleep_timer_active(void);
int get_sleep_timer(void);
void set_keypress_restarts_sleep_timer(bool enable);
void handle_auto_poweroff(void);
void set_car_adapter_mode(bool setting);
void reset_poweroff_timer(void);
void cancel_shutdown(void);
-void shutdown_hw(void);
+void shutdown_hw(enum shutdown_type sd_type);
void sys_poweroff(void);
+void sys_reboot(void);
/* Returns true if the system should force shutdown for some reason -
* eg. low battery */
bool query_force_shutdown(void);