summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/helper.c')
-rw-r--r--apps/plugins/lib/helper.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c
index 5aa143a728..506903e808 100644
--- a/apps/plugins/lib/helper.c
+++ b/apps/plugins/lib/helper.c
@@ -66,6 +66,21 @@ void backlight_use_settings(void)
66#endif /* CONFIG_CHARGING */ 66#endif /* CONFIG_CHARGING */
67} 67}
68 68
69#ifdef HAVE_SW_POWEROFF
70static bool original_sw_poweroff_state = true;
71
72void sw_poweroff_disable(void)
73{
74 original_sw_poweroff_state = rb->button_get_sw_poweroff_state();
75 rb->button_set_sw_poweroff_state(false);
76}
77
78void sw_poweroff_restore(void)
79{
80 rb->button_set_sw_poweroff_state(original_sw_poweroff_state);
81}
82#endif
83
69#ifdef HAVE_REMOTE_LCD 84#ifdef HAVE_REMOTE_LCD
70/* Force the backlight on */ 85/* Force the backlight on */
71void remote_backlight_force_on(void) 86void remote_backlight_force_on(void)