Merge pull request #4462 from jepler/disable-usb-cdc
storage: Correct when we check for USB mounts
This commit is contained in:
commit
d52662856b
@ -149,7 +149,7 @@ void common_hal_storage_remount(const char *mount_path, bool readonly, bool disa
|
||||
mp_raise_OSError(MP_EINVAL);
|
||||
}
|
||||
|
||||
#ifdef USB_AVAILABLE
|
||||
#if CIRCUITPY_USB_MSC
|
||||
if (!usb_msc_ejected()) {
|
||||
mp_raise_RuntimeError(translate("Cannot remount '/' when USB is active."));
|
||||
}
|
||||
|
@ -54,8 +54,10 @@ void usb_init(void);
|
||||
void usb_disconnect(void);
|
||||
|
||||
// Propagate plug/unplug events to the MSC logic.
|
||||
#if CIRCUITPY_USB_MSC
|
||||
void usb_msc_mount(void);
|
||||
void usb_msc_umount(void);
|
||||
bool usb_msc_ejected(void);
|
||||
#endif
|
||||
|
||||
#endif // MICROPY_INCLUDED_SUPERVISOR_USB_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user