Disable usb status change and callback on SOF events

SOF events were introduced by the boot protocol changes, and required internally
by Zephyr's idle support, but are unused within ZMK itself. Ignore them in the
usb status callback.
This commit is contained in:
Chris Andreae 2022-09-28 23:00:54 +09:00
parent 2a0fd6c426
commit 32a7ff1556
No known key found for this signature in database
GPG key ID: 3AA9D181B3ABD33F

View file

@ -50,6 +50,12 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state() {
}
void usb_status_cb(enum usb_dc_status_code status, const uint8_t *params) {
// Start-of-frame events are too frequent and noisy to notify, and they're
// not used within ZMK
if (status == USB_DC_SOF) {
return;
}
#if IS_ENABLED(CONFIG_ZMK_USB_BOOT)
if (status == USB_DC_RESET) {
zmk_usb_hid_set_protocol(HID_PROTOCOL_REPORT);