diff options
| author | Joe Wasson <jwasson+github@gmail.com> | 2017-08-19 20:23:39 -0700 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-08-20 11:51:57 -0400 |
| commit | fc70c9ac9e725310144d7b8227fbc931e5b2d5a1 (patch) | |
| tree | fcbf9806dd81d958b03d347daedf3536ba4e6f17 | |
| parent | 937b86d030dd603581e5747818f9a8c08c2d35d3 (diff) | |
| download | qmk_firmware-fc70c9ac9e725310144d7b8227fbc931e5b2d5a1.tar.gz qmk_firmware-fc70c9ac9e725310144d7b8227fbc931e5b2d5a1.zip | |
Allow steno to build when NKRO is not defined.
Was missing eeprom.h, MAX(), and memset.
| -rw-r--r-- | quantum/process_keycode/process_steno.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 71e5e8ff1..16bbf154f 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "process_steno.h" | 16 | #include "process_steno.h" |
| 17 | #include "quantum_keycodes.h" | 17 | #include "quantum_keycodes.h" |
| 18 | #include "eeprom.h" | ||
| 18 | #include "keymap_steno.h" | 19 | #include "keymap_steno.h" |
| 19 | #include "virtser.h" | 20 | #include "virtser.h" |
| 20 | 21 | ||
| @@ -54,8 +55,9 @@ | |||
| 54 | 55 | ||
| 55 | #define BOLT_STATE_SIZE 4 | 56 | #define BOLT_STATE_SIZE 4 |
| 56 | #define GEMINI_STATE_SIZE 6 | 57 | #define GEMINI_STATE_SIZE 6 |
| 58 | #define MAX_STATE_SIZE GEMINI_STATE_SIZE | ||
| 57 | 59 | ||
| 58 | uint8_t state[MAX(BOLT_STATE_SIZE, GEMINI_STATE_SIZE)] = {0}; | 60 | uint8_t state[MAX_STATE_SIZE] = {0}; |
| 59 | uint8_t pressed = 0; | 61 | uint8_t pressed = 0; |
| 60 | steno_mode_t mode; | 62 | steno_mode_t mode; |
| 61 | 63 | ||
| @@ -68,11 +70,8 @@ uint8_t boltmap[64] = { | |||
| 68 | TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_Z_R | 70 | TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_Z_R |
| 69 | }; | 71 | }; |
| 70 | 72 | ||
| 71 | #define BOLTMAP_MASK (sizeof(boltmap) - 1) | ||
| 72 | |||
| 73 | |||
| 74 | void steno_clear_state(void) { | 73 | void steno_clear_state(void) { |
| 75 | memset(state, 0, sizeof(state)); | 74 | __builtin_memset(state, 0, sizeof(state)); |
| 76 | } | 75 | } |
| 77 | 76 | ||
| 78 | void steno_init() { | 77 | void steno_init() { |
