Skip to content

Commit

Permalink
Fixed RGB LED remains off when the usb disconnected and reconnected (O…
Browse files Browse the repository at this point in the history
…penStickCommunity#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 <[email protected]>
  • Loading branch information
shellever and arntsonl authored Sep 17, 2024
1 parent 32be222 commit 37f31ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/usbdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -97,4 +99,4 @@ uint8_t const* tud_descriptor_device_qualifier_cb() {
return DriverManager::getInstance().getDriver()->get_descriptor_device_qualifier_cb();
}

#endif
#endif

0 comments on commit 37f31ac

Please sign in to comment.