diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-05-18 09:11:46 -0400 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2020-05-18 09:11:46 -0400 |
commit | c1905745b3578037d1791bd634a3d1607cafd525 (patch) | |
tree | 6c16a1fd7b1a7602470950cbf46e0dc353c4f329 /include/zmk/keymap.h | |
parent | b3babe2505fe4542e18967d90ccfc2783943243f (diff) |
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.
Diffstat (limited to 'include/zmk/keymap.h')
-rw-r--r-- | include/zmk/keymap.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/zmk/keymap.h b/include/zmk/keymap.h new file mode 100644 index 0000000..9b58cc0 --- /dev/null +++ b/include/zmk/keymap.h @@ -0,0 +1,18 @@ +#pragma once + +#include <devicetree.h> +#include <usb/usb_device.h> +#include <usb/class/usb_hid.h> +#include <dt-bindings/zmk/keys.h> + +#include <zmk/matrix.h> +#include <zmk/keys.h> + +#define ZMK_KEYMAP_NODE DT_CHOSEN(zmk_keymap) +#define ZMK_KEYMAP_LAYERS_LEN DT_PROP_LEN(ZMK_KEYMAP_NODE, layers) + +bool zmk_keymap_layer_activate(u8_t layer); +bool zmk_keymap_layer_deactivate(u8_t layer); + +zmk_key +zmk_keymap_keycode_from_position(u32_t row, u32_t column); |