Skip to content

Commit

Permalink
fix(usb): Ensure USB init is last
Browse files Browse the repository at this point in the history
* To avoid USB init issues due to other initialization disrupting
  USB setup, move USB setup to a lower priority.
  • Loading branch information
petejohanson committed Jun 21, 2024
1 parent a080b52 commit 7be955f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ if USB_DEVICE_STACK

config ZMK_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
endif
Expand Down
2 changes: 1 addition & 1 deletion app/src/usb_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,4 @@ static int zmk_usb_hid_init(void) {
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);

0 comments on commit 7be955f

Please sign in to comment.