Merge pull request #646 from CapeLeidokos/ng_weak_keymaps_linear

Added weak versions of keymaps_linear
pull/659/head
Jesse Vincent 6 years ago committed by GitHub
commit f46b4343d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,10 +21,19 @@
// that should be enough for almost any layout. // that should be enough for almost any layout.
#define MAX_LAYERS sizeof(uint32_t) * 8; #define MAX_LAYERS sizeof(uint32_t) * 8;
// The total number of defined layers in the firmware sketch keymaps_linear[] // The following definitions of layer_count and keymaps_linear
// array. If the keymap wasn't defined using KEYMAPS(), set it to the // are used if the user does not define a keymap within the sketch
// highest possible number of layers. // by means of the KEYMAP macro.
uint8_t layer_count __attribute__((weak)) = MAX_LAYERS; // This can e.g. be the case if some sort of plugin is used that features
// a different layer system and registeres it with the layer class.
// In that case the layer lookup through keymaps_linear is completely
// disabled but the weak versions must be there to make the linker happy.
//
__attribute__((weak))
uint8_t layer_count = 0;
__attribute__((weak))
extern const Key keymaps_linear[][ROWS * COLS] = {};
namespace kaleidoscope { namespace kaleidoscope {
uint32_t Layer_::layer_state_; uint32_t Layer_::layer_state_;

Loading…
Cancel
Save