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 7c09eb2 commit e98e380
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 e98e380

Please sign in to comment.