summaryrefslogtreecommitdiff
path: root/src/endpoints.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/endpoints.c')
-rw-r--r--src/endpoints.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/endpoints.c b/src/endpoints.c
index 1f78cb7..6854370 100644
--- a/src/endpoints.c
+++ b/src/endpoints.c
@@ -1,8 +1,8 @@
-#include "endpoints.h"
-#include "hid.h"
-#include "usb_hid.h"
-#include "hog.h"
+#include <zmk/endpoints.h>
+#include <zmk/hid.h>
+#include <zmk/usb_hid.h>
+#include <zmk/hog.h>
int zmk_endpoints_init()
{
@@ -15,6 +15,7 @@ int zmk_endpoints_init()
return err;
}
+#ifdef CONFIG_ZMK_BLE
err = zmk_hog_init();
if (err)
{
@@ -22,6 +23,8 @@ int zmk_endpoints_init()
return err;
}
+#endif /* CONFIG_ZMK_BLE */
+
return 0;
}
@@ -46,12 +49,14 @@ int zmk_endpoints_send_key_event(struct zmk_key_event key_event)
// // LOG_DBG("USB Send Failed");
// }
+#ifdef CONFIG_ZMK_BLE
err = zmk_hog_send_report(report);
if (err)
{
printk("FAILED TO SEND OVER HOG: %d\n", err);
// LOG_DBG("HID Over GATTP Send Failed");
}
+#endif /* CONFIG_ZMK_BLE */
return 0;
-} \ No newline at end of file
+}