forked from kofal.net/zmk
Refactor build/config/keymaps.
* Move all headers to `include/zmk` directory. * Update includes to reference them properly. * Add `keymap.c` file from keymap, if found. * Toplevel CONFIG_ZMK_BLE aggregate config setting.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user