summaryrefslogtreecommitdiff
path: root/bootloader/x1000/x1000bootloader.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-05 09:38:13 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-03-12 18:25:10 +0000
commit7554a49309fe31e69747c64caa28b4303270481b (patch)
tree0712f67d4e7d3b7ae4b33709f4a1f7e426c5210b /bootloader/x1000/x1000bootloader.h
parent905591215fdad421f9985ad846b082b86a9ed0b7 (diff)
downloadrockbox-7554a49309fe31e69747c64caa28b4303270481b.tar.gz
rockbox-7554a49309fe31e69747c64caa28b4303270481b.zip
x1000: bootloader: refactor init_disk
Add check_disk() to query the disk insertion status and prompt the user if necessary. Use this in place of init_disk(). Perform an unconditional disk_mount_all() from the main function. Change-Id: I9a8cc42266edf99cd15ece3aee8fa25835df04ae
Diffstat (limited to 'bootloader/x1000/x1000bootloader.h')
-rw-r--r--bootloader/x1000/x1000bootloader.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/bootloader/x1000/x1000bootloader.h b/bootloader/x1000/x1000bootloader.h
index 05f421fc61..bb35cd3b78 100644
--- a/bootloader/x1000/x1000bootloader.h
+++ b/bootloader/x1000/x1000bootloader.h
@@ -23,6 +23,7 @@
23#define __X1000BOOTLOADER_H__ 23#define __X1000BOOTLOADER_H__
24 24
25#include "config.h" 25#include "config.h"
26#include <stdbool.h>
26 27
27#if defined(FIIO_M3K) 28#if defined(FIIO_M3K)
28# define BL_RECOVERY BUTTON_VOL_UP 29# define BL_RECOVERY BUTTON_VOL_UP
@@ -96,6 +97,14 @@ void reboot(void);
96 * Misc 97 * Misc
97 */ 98 */
98 99
100enum {
101 DISK_PRESENT = 0,
102 DISK_ABSENT = -1,
103 DISK_CANCELED = -2,
104};
105
106int check_disk(bool wait);
107
99void recovery_menu(void) __attribute__((noreturn)); 108void recovery_menu(void) __attribute__((noreturn));
100 109
101#endif /* __X1000BOOTLOADER_H__ */ 110#endif /* __X1000BOOTLOADER_H__ */