summaryrefslogtreecommitdiffstats
path: root/firmware/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index c615e97d2b..31bf93e551 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -432,10 +432,23 @@ static void usb_thread(void)
try_reboot();
break;
#endif /* USB_FIREWIRE_HANDLING */
+
+#if defined(HAVE_USB_CHARGING_ENABLE) && defined(HAVE_USBSTACK)
+ case USB_CHARGER_UPDATE:
+ usb_charging_maxcurrent_change(usb_charging_maxcurrent());
+ break;
+#endif
}
}
}
+#if defined(HAVE_USB_CHARGING_ENABLE) && defined(HAVE_USBSTACK)
+void usb_charger_update(void)
+{
+ queue_post(&usb_queue, USB_CHARGER_UPDATE, 0);
+}
+#endif
+
#ifdef USB_STATUS_BY_EVENT
void usb_status_event(int current_status)
{