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
No related merge requests found
...@@ -82,7 +82,7 @@ def usb_mode(disp): ...@@ -82,7 +82,7 @@ def usb_mode(disp):
pass pass
# Wait for any button to be pressed and disable USB storage again # 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 pass
os.usbconfig(os.USB_SERIAL) 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