Merge pull request #54 from algernon/f/keymap/auto-size

Introduce a helper macro to compute the keymap size
pull/55/head
Jesse Vincent 8 years ago committed by GitHub
commit 06d38a1bda

@ -19,7 +19,6 @@
uint8_t primary_keymap = 0;
uint8_t temporary_keymap = 0;
#define KEYMAPS 3
#define NUMPAD_KEYMAP 2
#define KEYMAP_LIST KEYMAP_QWERTY KEYMAP_GENERIC_FN2 KEYMAP_NUMPAD
@ -42,7 +41,7 @@ static LEDChaseEffect chaseEffect;
static LEDNumlock numLockEffect (NUMPAD_KEYMAP);
void setup() {
Keyboardio.setup(KEYMAPS);
Keyboardio.setup(KEYMAP_SIZE);
bootAnimation();
}

@ -33,6 +33,8 @@ extern uint8_t temporary_keymap;
#define VERSION "locally-built"
#endif
#define KEYMAP_SIZE (sizeof(keymaps) / ROWS / COLS / sizeof(Key))
class Keyboardio_ {
public:
Keyboardio_(void);

Loading…
Cancel
Save