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:
parent
068d9bf2cf
commit
f60c71d131
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue