Skip to content
Snippets Groups Projects
Commit cf49e627 authored by rahix's avatar rahix
Browse files

feat(menu): Return from USB once the host ejects the device

Automatically exit the "USB storage mode" once the connected USB host
ejects card10.
parent a8f5cb56
Branches
Tags
1 merge request!470Add epic_fs_is_attached(), os.fs_is_attached(), and make the menu automatically return from USB mode
Pipeline #5200 passed
......@@ -82,7 +82,7 @@ def usb_mode(disp):
pass
# Wait for any button to be pressed and disable USB storage again
while buttons.read() == 0:
while buttons.read() == 0 and not os.fs_is_attached():
pass
os.usbconfig(os.USB_SERIAL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment