diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-04-16 14:25:49 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-04-16 14:36:39 +0100 |
commit | d55dceff371c4080d179fb26e6f175927cc48768 (patch) | |
tree | 65598ecdc8142d4178b1f8b13dce37e871cc7016 /apps/tagcache.c | |
parent | 90960adf56d4798a23b8fdc7e6a9bb25dd0bf530 (diff) | |
download | rockbox-d55dceff371c4080d179fb26e6f175927cc48768.tar.gz rockbox-d55dceff371c4080d179fb26e6f175927cc48768.zip |
apps: Add ability to do a clean reboot
Allow a clean shutdown to end in either power off or reboot. Add a
new event SYS_REBOOT to signal it and sys_reboot() to trigger the
event. SYS_REBOOT signals a reboot request and should be listened
for alongside SYS_POWEROFF events.
Change-Id: I99ba7fb5feed2bb5a0a40a274e8466ad74fe3a43
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 8bc742112b..c18380854e 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -3989,6 +3989,7 @@ static bool check_event_queue(void) | |||
3989 | { | 3989 | { |
3990 | case Q_STOP_SCAN: | 3990 | case Q_STOP_SCAN: |
3991 | case SYS_POWEROFF: | 3991 | case SYS_POWEROFF: |
3992 | case SYS_REBOOT: | ||
3992 | case SYS_USB_CONNECTED: | 3993 | case SYS_USB_CONNECTED: |
3993 | return true; | 3994 | return true; |
3994 | } | 3995 | } |
@@ -4944,6 +4945,7 @@ static void tagcache_thread(void) | |||
4944 | break ; | 4945 | break ; |
4945 | 4946 | ||
4946 | case SYS_POWEROFF: | 4947 | case SYS_POWEROFF: |
4948 | case SYS_REBOOT: | ||
4947 | break ; | 4949 | break ; |
4948 | 4950 | ||
4949 | case SYS_USB_CONNECTED: | 4951 | case SYS_USB_CONNECTED: |