suppress hid events from host when device is disconnected
This commit is contained in:
+7
-3
@@ -360,11 +360,15 @@ void startADC() {
|
||||
|
||||
// forward HID report after processing
|
||||
bool forward_report(uint8_t instance, uint8_t const* report, uint16_t len) {
|
||||
if (instance == 0x01 && report[0] == 0x03 && report[1] == 0xE2) {
|
||||
mute = !mute;
|
||||
if (device_state == DEVICE_ACTIVE ) {
|
||||
if (instance == 0x01 && report[0] == 0x03 && report[1] == 0xE2) {
|
||||
mute = !mute;
|
||||
}
|
||||
|
||||
return tud_hid_n_report(instance, 0, report, len);
|
||||
}
|
||||
|
||||
return tud_hid_n_report(instance, 0, report, len);
|
||||
return true;
|
||||
}
|
||||
|
||||
// save RGB configuration to flash
|
||||
|
||||
Reference in New Issue
Block a user