diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-07-07 10:20:23 -0400 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-07-07 10:20:23 -0400 |
commit | 7c5fb7adb5a505ab5f89754370567b2357aa322a (patch) | |
tree | cce9b7330539e5cec20648ca43c38301ef05e27a /app/src/usb_hid.c | |
parent | 48f3f86a835d7ec9c636948f42adbf2ef8d6a762 (diff) |
Use SYS_INIT for BLE and USB init.
Diffstat (limited to 'app/src/usb_hid.c')
-rw-r--r-- | app/src/usb_hid.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/usb_hid.c b/app/src/usb_hid.c index 2862d56..4c6dd4b 100644 --- a/app/src/usb_hid.c +++ b/app/src/usb_hid.c @@ -1,5 +1,6 @@ #include <device.h> +#include <init.h> #include <usb/usb_device.h> #include <usb/class/usb_hid.h> @@ -29,7 +30,7 @@ void usb_hid_status_cb(enum usb_dc_status_code status, const u8_t *params) usb_status = status; }; -int zmk_usb_hid_init() +static int zmk_usb_hid_init(struct device *_arg) { int usb_enable_ret; @@ -56,3 +57,7 @@ int zmk_usb_hid_init() return 0; } + +SYS_INIT(zmk_usb_hid_init, + APPLICATION, + CONFIG_ZMK_USB_INIT_PRIORITY); |