fix(usb): Ensure USB init is last

* To avoid USB init issues due to other initialization disrupting
  USB setup, move USB setup to a lower priority.
This commit is contained in:
Peter Johanson 2024-06-21 13:12:13 -06:00 committed by Pete Johanson
parent a080b5287f
commit 7be955ff72
2 changed files with 6 additions and 2 deletions

View file

@ -490,7 +490,11 @@ if USB_DEVICE_STACK
config ZMK_USB_INIT_PRIORITY config ZMK_USB_INIT_PRIORITY
int "USB Init Priority" int "USB Init Priority"
default 50 default 94
config ZMK_USB_HID_INIT_PRIORITY
int "USB HID Init Priority"
default 95
#USB #USB
endif endif

View file

@ -195,4 +195,4 @@ static int zmk_usb_hid_init(void) {
return 0; return 0;
} }
SYS_INIT(zmk_usb_hid_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); SYS_INIT(zmk_usb_hid_init, APPLICATION, CONFIG_ZMK_USB_HID_INIT_PRIORITY);