diff options
author | Nick Brassel <[email protected]> | 2022-06-05 10:26:02 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2022-06-05 10:26:02 +1000 |
commit | 08c556b78b9dc672a2aa2388bbd3fdf408e3ce98 (patch) | |
tree | d469e5c5a8368a7132ad85ef0c594cd73eabc55c /quantum/keymap_introspection.h | |
parent | af84772a5f350c404bfad8f5b138f990828eac45 (diff) | |
download | qmk_firmware-08c556b78b9dc672a2aa2388bbd3fdf408e3ce98.tar.gz qmk_firmware-08c556b78b9dc672a2aa2388bbd3fdf408e3ce98.zip |
Add keymap wrappers for introspection into the keymap. (#17229)
* Introspection handlers for keymaps.
* Renaming.
Diffstat (limited to 'quantum/keymap_introspection.h')
-rw-r--r-- | quantum/keymap_introspection.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/quantum/keymap_introspection.h b/quantum/keymap_introspection.h new file mode 100644 index 0000000000..23f6f2016f --- /dev/null +++ b/quantum/keymap_introspection.h @@ -0,0 +1,15 @@ +// Copyright 2022 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include <stdint.h> + +// Get the number of layers defined in the keymap +uint8_t keymap_layer_count(void); + +#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) + +// Get the number of layers defined in the encoder map +uint8_t encodermap_layer_count(void); + +#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE) |