rp2: Don't disable USB if going to DORMANT mode.
In this mode, XOSC is stopped so can't really keep the USB PLL enabled. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
@@ -138,7 +138,8 @@ static void mp_machine_lightsleep(size_t n_args, const mp_obj_t *args) {
|
||||
|
||||
#if MICROPY_HW_ENABLE_USBDEV
|
||||
// Only disable the USB clock if a USB host has not configured the device
|
||||
bool disable_usb = !tud_mounted();
|
||||
// or if going to DORMANT mode.
|
||||
bool disable_usb = !(tud_mounted() && n_args > 0);
|
||||
#else
|
||||
bool disable_usb = true;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user