From 47a87a92b1028e8ecd664b9b0c2ea61b1b6df91b Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Wed, 28 Sep 2022 23:00:54 +0900 Subject: [PATCH] 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. --- app/src/usb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/usb.c b/app/src/usb.c index 2b309216..278a5456 100644 --- a/app/src/usb.c +++ b/app/src/usb.c @@ -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);