diff --git a/src/kaleidoscope/layers.cpp b/src/kaleidoscope/layers.cpp index ac59b49b..f3efb80e 100644 --- a/src/kaleidoscope/layers.cpp +++ b/src/kaleidoscope/layers.cpp @@ -33,7 +33,7 @@ __attribute__((weak)) uint8_t layer_count = 0; __attribute__((weak)) -extern const Key keymaps_linear[][kaleidoscope_internal::device.matrix_rows * kaleidoscope_internal::device.matrix_columns] = {}; +extern constexpr Key keymaps_linear[][kaleidoscope_internal::device.matrix_rows * kaleidoscope_internal::device.matrix_columns] = {}; namespace kaleidoscope { uint32_t Layer_::layer_state_; diff --git a/src/kaleidoscope/layers.h b/src/kaleidoscope/layers.h index 0cf7d196..aaa6762f 100644 --- a/src/kaleidoscope/layers.h +++ b/src/kaleidoscope/layers.h @@ -26,7 +26,7 @@ // file (*.ino) to define the keymap[] array that holds the user's // layers. It also computes the number of layers in that keymap. #define KEYMAPS(layers...) __NL__ \ - const Key keymaps_linear[][kaleidoscope_internal::device.matrix_rows * kaleidoscope_internal::device.matrix_columns] PROGMEM = { layers }; __NL__ \ + constexpr Key keymaps_linear[][kaleidoscope_internal::device.matrix_rows * kaleidoscope_internal::device.matrix_columns] PROGMEM = { layers }; __NL__ \ uint8_t layer_count __NL__ \ = sizeof(keymaps_linear) / sizeof(*keymaps_linear); __NL__ \ __NL__ \