]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Allow steno to build when NKRO is not defined.
authorJoe Wasson <jwasson+github@gmail.com>
Sun, 20 Aug 2017 03:23:39 +0000 (20:23 -0700)
committerJack Humbert <jack.humb@gmail.com>
Sun, 20 Aug 2017 15:51:57 +0000 (11:51 -0400)
Was missing eeprom.h, MAX(), and memset.

quantum/process_keycode/process_steno.c

index 71e5e8ff1c0165188bc59db7bcb2c021ebc5ba26..16bbf154fd0c1870d8dc23998920530566ed17c8 100644 (file)
@@ -15,6 +15,7 @@
  */
 #include "process_steno.h"
 #include "quantum_keycodes.h"
+#include "eeprom.h"
 #include "keymap_steno.h"
 #include "virtser.h"
 
@@ -54,8 +55,9 @@
 
 #define BOLT_STATE_SIZE 4
 #define GEMINI_STATE_SIZE 6
+#define MAX_STATE_SIZE GEMINI_STATE_SIZE
 
-uint8_t state[MAX(BOLT_STATE_SIZE, GEMINI_STATE_SIZE)] = {0};
+uint8_t state[MAX_STATE_SIZE] = {0};
 uint8_t pressed = 0;
 steno_mode_t mode;
 
@@ -68,11 +70,8 @@ uint8_t boltmap[64] = {
   TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_Z_R
 };
 
-#define BOLTMAP_MASK (sizeof(boltmap) - 1)
-
-
 void steno_clear_state(void) {
-  memset(state, 0, sizeof(state));
+  __builtin_memset(state, 0, sizeof(state));
 }
 
 void steno_init() {