From 37f31ac23a3f243353f9bd2f5946ea0a66f404db Mon Sep 17 00:00:00 2001 From: Shellever Date: Tue, 17 Sep 2024 09:09:35 +0800 Subject: [PATCH] Fixed RGB LED remains off when the usb disconnected and reconnected (#1105) * Fixed RGB LED remains off when the usb disconnected and reconnected * Update usbdriver.cpp Fixing this one as both of these should be false on mount and unmount --------- Co-authored-by: Luke A --- src/usbdriver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/usbdriver.cpp b/src/usbdriver.cpp index c7c5d73c3..3710f1d3b 100644 --- a/src/usbdriver.cpp +++ b/src/usbdriver.cpp @@ -39,12 +39,14 @@ void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t rep void tud_mount_cb(void) { usb_mounted = true; + usb_suspended = false; } // Invoked when device is unmounted void tud_umount_cb(void) { usb_mounted = false; + usb_suspended = false; } // Invoked when usb bus is suspended @@ -97,4 +99,4 @@ uint8_t const* tud_descriptor_device_qualifier_cb() { return DriverManager::getInstance().getDriver()->get_descriptor_device_qualifier_cb(); } -#endif \ No newline at end of file +#endif