Use SYS_INIT for BLE and USB init.

This commit is contained in:
Pete Johanson
2020-07-07 10:20:23 -04:00
parent 48f3f86a83
commit 7c5fb7adb5
7 changed files with 27 additions and 42 deletions

View File

@@ -8,34 +8,6 @@
#include <logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
int zmk_endpoints_init()
{
int err;
LOG_DBG("");
#ifdef CONFIG_ZMK_USB
err = zmk_usb_hid_init();
if (err)
{
LOG_ERR("USB HID Init Failed\n");
return err;
}
#endif /* CONFIG_ZMK_USB */
#ifdef CONFIG_ZMK_BLE
err = zmk_hog_init();
if (err)
{
LOG_ERR("HOG Init Failed\n");
return err;
}
#endif /* CONFIG_ZMK_BLE */
return 0;
}
int zmk_endpoints_send_report(u8_t usage_page)
{
int err;