summaryrefslogtreecommitdiffstats
path: root/firmware/export
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2020-06-26 20:53:15 -0400
committerFranklin Wei <franklin@rockbox.org>2020-06-27 13:27:40 -0400
commita65a341a0036737f161bfdd30adeab25faed3134 (patch)
treeba255c7d2ce392ca451c83f78a69caa50ba8e8a7 /firmware/export
parentf49442d7b739e13985e0d0054aa27865c0acff0c (diff)
downloadrockbox-a65a341a0036737f161bfdd30adeab25faed3134.tar.gz
rockbox-a65a341a0036737f161bfdd30adeab25faed3134.tar.bz2
rockbox-a65a341a0036737f161bfdd30adeab25faed3134.zip
button: allow disabling software poweroff
On some devices, the button driver allows a "software poweroff" by long- pressing a certain key. This behavior is inconvnient when that button needs to be held down for other purposes, such as moving the cursor in rockpaint or sgt-untangle. This patch allows selectively disabling the software poweroff (enabled by default) from both core and plugin code. Change-Id: I7580752888ae5c7c7c5eb1be5966e3d67f17d4b4
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/button.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/export/button.h b/firmware/export/button.h
index d9732ebe8b..36b615f216 100644
--- a/firmware/export/button.h
+++ b/firmware/export/button.h
@@ -130,4 +130,9 @@ int touchscreen_last_touch(void);
void button_enable_touch(bool en);
#endif
+#ifdef HAVE_SW_POWEROFF
+void button_set_sw_poweroff_state(bool en);
+bool button_get_sw_poweroff_state(void);
+#endif
+
#endif /* _BUTTON_H_ */