diff options
Diffstat (limited to 'firmware/usbstack/usb_core.c')
-rw-r--r-- | firmware/usbstack/usb_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index bf73c58abc..65bf7293c8 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c @@ -928,8 +928,14 @@ void usb_core_bus_reset(void) usb_address = 0; usb_state = DEFAULT; #ifdef HAVE_USB_CHARGING_ENABLE +#ifdef HAVE_USB_CHARGING_IN_THREAD + /* On some targets usb_charging_maxcurrent_change() cannot be called + * from an interrupt handler; get the USB thread to do it instead. */ + usb_charger_update(); +#else usb_charging_maxcurrent_change(usb_charging_maxcurrent()); #endif +#endif } /* called by usb_drv_transfer_completed() */ |