summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-08-22 07:49:42 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-08-22 07:57:24 -0400
commitd282424ef2a17d9c5c91a18284eb897365fc3fa0 (patch)
tree37c71d19d15764f7f9843e883664576cf5ff6f8c
parent4c745fe8ac2a74262fbea038f7056e2f376734f0 (diff)
xduoox3: Allow user to gracefully exit USB disk mode by pressing power
Change-Id: Ic0382059646b7169c275aebe88867b5c0b7dd672
-rw-r--r--bootloader/xduoox3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bootloader/xduoox3.c b/bootloader/xduoox3.c
index aa27f4ea86..7ed672affe 100644
--- a/bootloader/xduoox3.c
+++ b/bootloader/xduoox3.c
@@ -100,6 +100,9 @@ static void usb_mode(void)
if (button == SYS_USB_CONNECTED)
break; /* Hit */
+
+ if (button == BUTTON_POWER)
+ return;
}
if (button == SYS_USB_CONNECTED) {