diff --git a/src/layers.cpp b/src/layers.cpp index 1a266ff0..64960a4a 100644 --- a/src/layers.cpp +++ b/src/layers.cpp @@ -3,6 +3,11 @@ static uint8_t DefaultLayer; static uint32_t LayerState; +// The maximum number of layers allowed. `LayerState`, which stores +// the on/off status of the layers in a bitfield has only 32 bits, and +// that should be enough for almost any layout. +#define MAX_LAYERS sizeof(LayerState) * 8; + uint8_t Layer_::highestLayer; Key Layer_::liveCompositeKeymap[ROWS][COLS]; uint8_t Layer_::activeLayers[ROWS][COLS]; diff --git a/src/layers.h b/src/layers.h index 6d9583fb..55ce8516 100644 --- a/src/layers.h +++ b/src/layers.h @@ -11,11 +11,6 @@ const Key keymaps[][ROWS][COLS] PROGMEM = { layers }; \ uint8_t layer_count = sizeof(keymaps) / sizeof(*keymaps); -// The maximum number of layers allowed. `LayerState`, which stores -// the on/off status of the layers in a bitfield has only 32 bits, and -// that should be enough for almost any layout. -#define MAX_LAYERS 32 - class Layer_ { public: Layer_(void);