From 952ef25177a0ff76406f98b44e1216334cfa0607 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 5 Oct 2017 09:36:47 +0200 Subject: [PATCH] Deprecate KEYMAP_SIZE too This was only ever used for `Kaleidoscope.setup()`, and while the variant that takes an argument is deprecated, and emits a warning already, we can do the same for `KEYMAP_SIZE` too. This does set the const to 0, so if used anywhere else than `Kaleidoscope.setup()`, it will have undesired side-effects. But as far as I saw, it was never used elsewhere, thus, this change should be safe. Signed-off-by: Gergely Nagy --- src/Kaleidoscope.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Kaleidoscope.h b/src/Kaleidoscope.h index 1da08a09..338fc8b2 100644 --- a/src/Kaleidoscope.h +++ b/src/Kaleidoscope.h @@ -33,7 +33,8 @@ extern HARDWARE_IMPLEMENTATION KeyboardHardware; #define VERSION "locally-built" #endif -#define KEYMAP_SIZE (sizeof(keymaps) / ROWS / COLS / sizeof(Key)) +const uint8_t KEYMAP_SIZE +__attribute__((deprecated("Kaleidoscope.setup() does not require KEYMAP_SIZE anymore."))) = 0; #define USE_PLUGINS(plugins...) Kaleidoscope.use(plugins)