diff options
Diffstat (limited to 'firmware/usbstack/usb_core.c')
-rw-r--r-- | firmware/usbstack/usb_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index aa96fff17f..60a81b84a1 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c | |||
@@ -828,8 +828,8 @@ static void usb_core_control_request_handler(struct usb_ctrlrequest* req) | |||
828 | #ifdef HAVE_USB_CHARGING_ENABLE | 828 | #ifdef HAVE_USB_CHARGING_ENABLE |
829 | timeout_cancel(&usb_no_host_timeout); | 829 | timeout_cancel(&usb_no_host_timeout); |
830 | if(usb_no_host) { | 830 | if(usb_no_host) { |
831 | usb_no_host = false; | 831 | usb_no_host = false; |
832 | usb_charging_maxcurrent_change(usb_charging_maxcurrent()); | 832 | usb_charging_maxcurrent_change(usb_charging_maxcurrent()); |
833 | } | 833 | } |
834 | #endif | 834 | #endif |
835 | if(usb_state == DEFAULT) { | 835 | if(usb_state == DEFAULT) { |
@@ -918,9 +918,9 @@ int usb_charging_maxcurrent() | |||
918 | if (!initialized || usb_charging_mode == USB_CHARGING_DISABLE) | 918 | if (!initialized || usb_charging_mode == USB_CHARGING_DISABLE) |
919 | return 100; | 919 | return 100; |
920 | if (usb_state == CONFIGURED) | 920 | if (usb_state == CONFIGURED) |
921 | return usb_charging_current_requested; | 921 | return usb_charging_current_requested; |
922 | if (usb_charging_mode == USB_CHARGING_FORCE && usb_no_host) | 922 | if (usb_charging_mode == USB_CHARGING_FORCE && usb_no_host) |
923 | return 500; | 923 | return 500; |
924 | return 100; | 924 | return 100; |
925 | } | 925 | } |
926 | #endif | 926 | #endif |