diff options
167 files changed, 1514 insertions, 3169 deletions
diff --git a/common_features.mk b/common_features.mk index 640539fd6..92b24bb20 100644 --- a/common_features.mk +++ b/common_features.mk | |||
@@ -82,19 +82,19 @@ endif | |||
82 | 82 | ||
83 | ifeq ($(strip $(UCIS_ENABLE)), yes) | 83 | ifeq ($(strip $(UCIS_ENABLE)), yes) |
84 | OPT_DEFS += -DUCIS_ENABLE | 84 | OPT_DEFS += -DUCIS_ENABLE |
85 | UNICODE_COMMON = yes | 85 | UNICODE_COMMON := yes |
86 | SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c | 86 | SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c |
87 | endif | 87 | endif |
88 | 88 | ||
89 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) | 89 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) |
90 | OPT_DEFS += -DUNICODEMAP_ENABLE | 90 | OPT_DEFS += -DUNICODEMAP_ENABLE |
91 | UNICODE_COMMON = yes | 91 | UNICODE_COMMON := yes |
92 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c | 92 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c |
93 | endif | 93 | endif |
94 | 94 | ||
95 | ifeq ($(strip $(UNICODE_ENABLE)), yes) | 95 | ifeq ($(strip $(UNICODE_ENABLE)), yes) |
96 | OPT_DEFS += -DUNICODE_ENABLE | 96 | OPT_DEFS += -DUNICODE_ENABLE |
97 | UNICODE_COMMON = yes | 97 | UNICODE_COMMON := yes |
98 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c | 98 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c |
99 | endif | 99 | endif |
100 | 100 | ||
@@ -107,13 +107,13 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | |||
107 | OPT_DEFS += -DRGBLIGHT_ENABLE | 107 | OPT_DEFS += -DRGBLIGHT_ENABLE |
108 | SRC += $(QUANTUM_DIR)/color.c | 108 | SRC += $(QUANTUM_DIR)/color.c |
109 | SRC += $(QUANTUM_DIR)/rgblight.c | 109 | SRC += $(QUANTUM_DIR)/rgblight.c |
110 | CIE1931_CURVE = yes | 110 | CIE1931_CURVE := yes |
111 | LED_BREATHING_TABLE = yes | 111 | LED_BREATHING_TABLE := yes |
112 | RGB_KEYCODES_ENABLE = yes | 112 | RGB_KEYCODES_ENABLE := yes |
113 | ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) | 113 | ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) |
114 | OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER | 114 | OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER |
115 | else | 115 | else |
116 | WS2812_DRIVER_REQUIRED = yes | 116 | WS2812_DRIVER_REQUIRED := yes |
117 | endif | 117 | endif |
118 | endif | 118 | endif |
119 | 119 | ||
@@ -147,12 +147,12 @@ endif | |||
147 | SRC += $(QUANTUM_DIR)/color.c | 147 | SRC += $(QUANTUM_DIR)/color.c |
148 | SRC += $(QUANTUM_DIR)/rgb_matrix.c | 148 | SRC += $(QUANTUM_DIR)/rgb_matrix.c |
149 | SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c | 149 | SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c |
150 | CIE1931_CURVE = yes | 150 | CIE1931_CURVE := yes |
151 | RGB_KEYCODES_ENABLE = yes | 151 | RGB_KEYCODES_ENABLE := yes |
152 | endif | 152 | endif |
153 | 153 | ||
154 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) | 154 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) |
155 | RGB_MATRIX_ENABLE = IS31FL3731 | 155 | RGB_MATRIX_ENABLE := IS31FL3731 |
156 | endif | 156 | endif |
157 | 157 | ||
158 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731) | 158 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731) |
@@ -178,7 +178,7 @@ endif | |||
178 | 178 | ||
179 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) | 179 | ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) |
180 | OPT_DEFS += -DWS2812 | 180 | OPT_DEFS += -DWS2812 |
181 | WS2812_DRIVER_REQUIRED = yes | 181 | WS2812_DRIVER_REQUIRED := yes |
182 | endif | 182 | endif |
183 | 183 | ||
184 | ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) | 184 | ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) |
@@ -232,12 +232,12 @@ endif | |||
232 | endif | 232 | endif |
233 | 233 | ||
234 | ifeq ($(strip $(LCD_ENABLE)), yes) | 234 | ifeq ($(strip $(LCD_ENABLE)), yes) |
235 | CIE1931_CURVE = yes | 235 | CIE1931_CURVE := yes |
236 | endif | 236 | endif |
237 | 237 | ||
238 | # backward compat | 238 | # backward compat |
239 | ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) | 239 | ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) |
240 | BACKLIGHT_DRIVER = custom | 240 | BACKLIGHT_DRIVER := custom |
241 | endif | 241 | endif |
242 | 242 | ||
243 | VALID_BACKLIGHT_TYPES := pwm software custom | 243 | VALID_BACKLIGHT_TYPES := pwm software custom |
@@ -250,7 +250,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) | |||
250 | endif | 250 | endif |
251 | 251 | ||
252 | ifeq ($(strip $(VISUALIZER_ENABLE)), yes) | 252 | ifeq ($(strip $(VISUALIZER_ENABLE)), yes) |
253 | CIE1931_CURVE = yes | 253 | CIE1931_CURVE := yes |
254 | endif | 254 | endif |
255 | 255 | ||
256 | COMMON_VPATH += $(QUANTUM_DIR)/backlight | 256 | COMMON_VPATH += $(QUANTUM_DIR)/backlight |
@@ -294,12 +294,12 @@ endif | |||
294 | 294 | ||
295 | ifeq ($(strip $(CIE1931_CURVE)), yes) | 295 | ifeq ($(strip $(CIE1931_CURVE)), yes) |
296 | OPT_DEFS += -DUSE_CIE1931_CURVE | 296 | OPT_DEFS += -DUSE_CIE1931_CURVE |
297 | LED_TABLES = yes | 297 | LED_TABLES := yes |
298 | endif | 298 | endif |
299 | 299 | ||
300 | ifeq ($(strip $(LED_BREATHING_TABLE)), yes) | 300 | ifeq ($(strip $(LED_BREATHING_TABLE)), yes) |
301 | OPT_DEFS += -DUSE_LED_BREATHING_TABLE | 301 | OPT_DEFS += -DUSE_LED_BREATHING_TABLE |
302 | LED_TABLES = yes | 302 | LED_TABLES := yes |
303 | endif | 303 | endif |
304 | 304 | ||
305 | ifeq ($(strip $(LED_TABLES)), yes) | 305 | ifeq ($(strip $(LED_TABLES)), yes) |
@@ -349,6 +349,14 @@ ifeq ($(strip $(VELOCIKEY_ENABLE)), yes) | |||
349 | SRC += $(QUANTUM_DIR)/velocikey.c | 349 | SRC += $(QUANTUM_DIR)/velocikey.c |
350 | endif | 350 | endif |
351 | 351 | ||
352 | ifeq ($(strip $(VIA_ENABLE)), yes) | ||
353 | DYNAMIC_KEYMAP_ENABLE := yes | ||
354 | RAW_ENABLE := yes | ||
355 | BOOTMAGIC_ENABLE := lite | ||
356 | SRC += $(QUANTUM_DIR)/via.c | ||
357 | OPT_DEFS += -DVIA_ENABLE | ||
358 | endif | ||
359 | |||
352 | ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) | 360 | ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) |
353 | OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE | 361 | OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE |
354 | SRC += $(QUANTUM_DIR)/dynamic_keymap.c | 362 | SRC += $(QUANTUM_DIR)/dynamic_keymap.c |
diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h index 2a3589730..5836f02bc 100644 --- a/keyboards/aeboards/aegis/config.h +++ b/keyboards/aeboards/aegis/config.h | |||
@@ -46,23 +46,3 @@ | |||
46 | 46 | ||
47 | /* Locking resynchronize hack */ | 47 | /* Locking resynchronize hack */ |
48 | #define LOCKING_RESYNC_ENABLE | 48 | #define LOCKING_RESYNC_ENABLE |
49 | |||
50 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
51 | |||
52 | // EEPROM usage | ||
53 | |||
54 | // TODO: refactor with new user EEPROM code (coming soon) | ||
55 | #define EEPROM_MAGIC 0x451F | ||
56 | #define EEPROM_MAGIC_ADDR 34 | ||
57 | // Bump this every time we change what we store | ||
58 | // This will automatically reset the EEPROM with defaults | ||
59 | // and avoid loading invalid data from the EEPROM | ||
60 | #define EEPROM_VERSION 0x08 | ||
61 | #define EEPROM_VERSION_ADDR 36 | ||
62 | |||
63 | // Dynamic keymap starts after EEPROM version | ||
64 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
65 | // Dynamic macro starts after dynamic keymaps (37+(4*12*9*2)) = (37+864) | ||
66 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 901 | ||
67 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 123 | ||
68 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk index 70258b9ea..1e5b99807 100644 --- a/keyboards/aeboards/aegis/keymaps/via/rules.mk +++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk | |||
@@ -1,68 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c | ||
3 | |||
4 | # MCU name | ||
5 | MCU = atmega32u4 | ||
6 | |||
7 | # Processor frequency. | ||
8 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
9 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
11 | # automatically to create a 32-bit value in your source code. | ||
12 | # | ||
13 | # This will be an integer division of F_USB below, as it is sourced by | ||
14 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | ||
46 | |||
47 | |||
48 | # Build Options | ||
49 | # change yes to no to disable | ||
50 | # | ||
51 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
52 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
53 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
54 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
55 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
56 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
57 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
58 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
59 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
60 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
61 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
62 | UNICODE_ENABLE = no # Unicode | ||
63 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
64 | AUDIO_ENABLE = no # Audio output on port C6 | ||
65 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
66 | |||
67 | RAW_ENABLE = yes | ||
68 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk index 602da8678..2e39dae17 100644 --- a/keyboards/aeboards/aegis/rules.mk +++ b/keyboards/aeboards/aegis/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -30,5 +30,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
30 | AUDIO_ENABLE = no # Audio output on port C6 | 30 | AUDIO_ENABLE = no # Audio output on port C6 |
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
32 | 32 | ||
33 | # project specific files | ||
34 | SRC = keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/aeboards/ext65/config.h b/keyboards/aeboards/ext65/config.h index 7255b463f..c6e6ac890 100644 --- a/keyboards/aeboards/ext65/config.h +++ b/keyboards/aeboards/ext65/config.h | |||
@@ -46,24 +46,3 @@ | |||
46 | 46 | ||
47 | /* Locking resynchronize hack */ | 47 | /* Locking resynchronize hack */ |
48 | #define LOCKING_RESYNC_ENABLE | 48 | #define LOCKING_RESYNC_ENABLE |
49 | |||
50 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
51 | |||
52 | // EEPROM usage | ||
53 | |||
54 | // TODO: refactor with new user EEPROM code (coming soon) | ||
55 | #define EEPROM_MAGIC 0x451F | ||
56 | #define EEPROM_MAGIC_ADDR 34 | ||
57 | // Bump this every time we change what we store | ||
58 | // This will automatically reset the EEPROM with defaults | ||
59 | // and avoid loading invalid data from the EEPROM | ||
60 | #define EEPROM_VERSION 0x08 | ||
61 | #define EEPROM_VERSION_ADDR 36 | ||
62 | |||
63 | // Dynamic keymap starts after EEPROM version | ||
64 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
65 | // Dynamic macro starts after dynamic keymaps (37+(4*10*10*2)) = (37+800) | ||
66 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 837 | ||
67 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 187 | ||
68 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
69 | |||
diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/keymaps/default/keymap.c index 339fe2c48..54eab23ae 100644 --- a/keyboards/aeboards/ext65/keymaps/default/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/default/keymap.c | |||
@@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
38 | ), | 38 | ), |
39 | 39 | ||
40 | [1] = LAYOUT_ext65( | 40 | [1] = LAYOUT_ext65( |
41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , | 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
46 | ), | 46 | ), |
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
48 | [2] = LAYOUT_ext65( | 48 | [2] = LAYOUT_ext65( |
49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
53 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 53 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
54 | ), | 54 | ), |
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
56 | [3] = LAYOUT_ext65( | 56 | [3] = LAYOUT_ext65( |
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
61 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 61 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
62 | ) | 62 | ) |
diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c index efa11cd0f..ab6a93043 100644 --- a/keyboards/aeboards/ext65/keymaps/via/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c | |||
@@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
38 | ), | 38 | ), |
39 | 39 | ||
40 | [1] = LAYOUT_ext65( | 40 | [1] = LAYOUT_ext65( |
41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , | 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
46 | ), | 46 | ), |
@@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
48 | [2] = LAYOUT_ext65( | 48 | [2] = LAYOUT_ext65( |
49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 49 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
53 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 53 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
54 | ), | 54 | ), |
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
56 | [3] = LAYOUT_ext65( | 56 | [3] = LAYOUT_ext65( |
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 59 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 60 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
61 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | 61 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS |
62 | ) | 62 | ) |
diff --git a/keyboards/aeboards/ext65/keymaps/via/rules.mk b/keyboards/aeboards/ext65/keymaps/via/rules.mk index 70258b9ea..1e5b99807 100644 --- a/keyboards/aeboards/ext65/keymaps/via/rules.mk +++ b/keyboards/aeboards/ext65/keymaps/via/rules.mk | |||
@@ -1,68 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c | ||
3 | |||
4 | # MCU name | ||
5 | MCU = atmega32u4 | ||
6 | |||
7 | # Processor frequency. | ||
8 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
9 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
11 | # automatically to create a 32-bit value in your source code. | ||
12 | # | ||
13 | # This will be an integer division of F_USB below, as it is sourced by | ||
14 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | ||
46 | |||
47 | |||
48 | # Build Options | ||
49 | # change yes to no to disable | ||
50 | # | ||
51 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
52 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
53 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
54 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
55 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
56 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
57 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
58 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
59 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
60 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
61 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
62 | UNICODE_ENABLE = no # Unicode | ||
63 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
64 | AUDIO_ENABLE = no # Audio output on port C6 | ||
65 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
66 | |||
67 | RAW_ENABLE = yes | ||
68 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/aeboards/ext65/rules.mk b/keyboards/aeboards/ext65/rules.mk index bac979ad0..a5c98a1c6 100644 --- a/keyboards/aeboards/ext65/rules.mk +++ b/keyboards/aeboards/ext65/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -29,6 +29,3 @@ UNICODE_ENABLE = no # Unicode | |||
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
30 | AUDIO_ENABLE = no # Audio output on port C6 | 30 | AUDIO_ENABLE = no # Audio output on port C6 |
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
32 | |||
33 | # project specific files | ||
34 | SRC += keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index f7f3262ac..5bc0a0c49 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h | |||
@@ -242,25 +242,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
242 | /* Bootmagic Lite key configuration */ | 242 | /* Bootmagic Lite key configuration */ |
243 | // #define BOOTMAGIC_LITE_ROW 0 | 243 | // #define BOOTMAGIC_LITE_ROW 0 |
244 | // #define BOOTMAGIC_LITE_COLUMN 0 | 244 | // #define BOOTMAGIC_LITE_COLUMN 0 |
245 | |||
246 | /* VIA Configurator Compatibility */ | ||
247 | |||
248 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
249 | |||
250 | // EEPROM usage | ||
251 | |||
252 | #define EEPROM_MAGIC 0x451F | ||
253 | #define EEPROM_MAGIC_ADDR 34 | ||
254 | // Bump this every time we change what we store | ||
255 | // This will automatically reset the EEPROM with defaults | ||
256 | // and avoid loading invalid data from the EEPROM | ||
257 | #define EEPROM_VERSION 0x08 | ||
258 | #define EEPROM_VERSION_ADDR 36 | ||
259 | |||
260 | // Dynamic keymap starts after EEPROM version | ||
261 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
262 | // DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) | ||
263 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 | ||
264 | // DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
265 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 | ||
266 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/ai03/lunar/keymaps/via/rules.mk b/keyboards/ai03/lunar/keymaps/via/rules.mk index 01fcd55e8..1e5b99807 100644 --- a/keyboards/ai03/lunar/keymaps/via/rules.mk +++ b/keyboards/ai03/lunar/keymaps/via/rules.mk | |||
@@ -1,85 +1 @@ | |||
1 | # MCU name | VIA_ENABLE = yes | |
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Processor frequency. | ||
5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
8 | # automatically to create a 32-bit value in your source code. | ||
9 | # | ||
10 | # This will be an integer division of F_USB below, as it is sourced by | ||
11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
12 | # does not *change* the processor frequency - it should merely be updated to | ||
13 | # reflect the processor speed set externally so that the code can use accurate | ||
14 | # software delays. | ||
15 | F_CPU = 16000000 | ||
16 | |||
17 | |||
18 | # | ||
19 | # LUFA specific | ||
20 | # | ||
21 | # Target architecture (see library "Board Types" documentation). | ||
22 | ARCH = AVR8 | ||
23 | |||
24 | # Input clock frequency. | ||
25 | # This will define a symbol, F_USB, in all source code files equal to the | ||
26 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
27 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
28 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
29 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
30 | # at the end, this will be done automatically to create a 32-bit value in your | ||
31 | # source code. | ||
32 | # | ||
33 | # If no clock division is performed on the input clock inside the AVR (via the | ||
34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
35 | F_USB = $(F_CPU) | ||
36 | |||
37 | # Interrupt driven control endpoint task(+60) | ||
38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
39 | |||
40 | |||
41 | # Bootloader selection | ||
42 | # Teensy halfkay | ||
43 | # Pro Micro caterina | ||
44 | # Atmel DFU atmel-dfu | ||
45 | # LUFA DFU lufa-dfu | ||
46 | # QMK DFU qmk-dfu | ||
47 | # atmega32a bootloadHID | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # If you don't know the bootloader type, then you can specify the | ||
52 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
53 | # Teensy halfKay 512 | ||
54 | # Teensy++ halfKay 1024 | ||
55 | # Atmel DFU loader 4096 | ||
56 | # LUFA bootloader 4096 | ||
57 | # USBaspLoader 2048 | ||
58 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
59 | |||
60 | |||
61 | # Build Options | ||
62 | # change yes to no to disable | ||
63 | # | ||
64 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
65 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
66 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
67 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
68 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
71 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
72 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
73 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
74 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
75 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
76 | UNICODE_ENABLE = no # Unicode | ||
77 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
78 | AUDIO_ENABLE = no # Audio output on port C6 | ||
79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
81 | |||
82 | SRC += keyboards/wilba_tech/wt_main.c | ||
83 | |||
84 | RAW_ENABLE = yes | ||
85 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/cannonkeys/an_c/config.h b/keyboards/cannonkeys/an_c/config.h index ef480521b..55414ba50 100644 --- a/keyboards/cannonkeys/an_c/config.h +++ b/keyboards/cannonkeys/an_c/config.h | |||
@@ -58,26 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
58 | #define PIN_WS2812 15 | 58 | #define PIN_WS2812 15 |
59 | #define WS2812_SPI SPID2 | 59 | #define WS2812_SPI SPID2 |
60 | 60 | ||
61 | 61 | // Backlight config starts after VIA's EEPROM usage, | |
62 | // EEPROM usage | 62 | // dynamic keymaps start after this. |
63 | // TODO: refactor with new user EEPROM code (coming soon) | 63 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 |
64 | #define EEPROM_MAGIC 0x451F | ||
65 | #define EEPROM_MAGIC_ADDR 40 | ||
66 | // Bump this every time we change what we store | ||
67 | // This will automatically reset the EEPROM with defaults | ||
68 | // and avoid loading invalid data from the EEPROM | ||
69 | #define EEPROM_VERSION 0x03 | ||
70 | #define EEPROM_VERSION_ADDR 42 | ||
71 | |||
72 | |||
73 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
74 | // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 | ||
75 | // start + layer * rows * col * 2 | ||
76 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 43 | ||
77 | #define EEPROM_CUSTOM_BACKLIGHT 644 | ||
78 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 | ||
79 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 | ||
80 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
81 | 64 | ||
82 | /* | 65 | /* |
83 | * Feature disable options | 66 | * Feature disable options |
diff --git a/keyboards/cannonkeys/an_c/keymaps/via/rules.mk b/keyboards/cannonkeys/an_c/keymaps/via/rules.mk index d12497792..1e5b99807 100644 --- a/keyboards/cannonkeys/an_c/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/an_c/keymaps/via/rules.mk | |||
@@ -1,5 +1 @@ | |||
1 | # rules.mk overrides to enable VIA | VIA_ENABLE = yes | |
2 | |||
3 | RAW_ENABLE = yes | ||
4 | DYNAMIC_KEYMAP_ENABLE = yes | ||
5 | |||
diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index 2f30956e7..f99075d81 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk | |||
@@ -53,7 +53,4 @@ CUSTOM_MATRIX = no # Custom matrix file | |||
53 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 53 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
54 | RGBLIGHT_ENABLE = yes | 54 | RGBLIGHT_ENABLE = yes |
55 | 55 | ||
56 | # RAW_ENABLE = yes | ||
57 | # DYNAMIC_KEYMAP_ENABLE = yes | ||
58 | |||
59 | LAYOUTS = 60_ansi 60_tsangan_hhkb | 56 | LAYOUTS = 60_ansi 60_tsangan_hhkb |
diff --git a/keyboards/cannonkeys/chimera65/config.h b/keyboards/cannonkeys/chimera65/config.h index ace3565be..c76fd6c1c 100644 --- a/keyboards/cannonkeys/chimera65/config.h +++ b/keyboards/cannonkeys/chimera65/config.h | |||
@@ -50,26 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
50 | /* Locking resynchronize hack */ | 50 | /* Locking resynchronize hack */ |
51 | #define LOCKING_RESYNC_ENABLE | 51 | #define LOCKING_RESYNC_ENABLE |
52 | 52 | ||
53 | // EEPROM usage | ||
54 | // TODO: refactor with new user EEPROM code (coming soon) | ||
55 | #define EEPROM_MAGIC 0x451F | ||
56 | #define EEPROM_MAGIC_ADDR 34 | ||
57 | // Bump this every time we change what we store | ||
58 | // This will automatically reset the EEPROM with defaults | ||
59 | // and avoid loading invalid data from the EEPROM | ||
60 | #define EEPROM_VERSION 0x02 | ||
61 | #define EEPROM_VERSION_ADDR 36 | ||
62 | |||
63 | |||
64 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
65 | // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 | ||
66 | // start + layer * rows * col * 2 | ||
67 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
68 | #define EEPROM_CUSTOM_BACKLIGHT 678 | ||
69 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 679 | ||
70 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 202 | ||
71 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
72 | |||
73 | /* | 53 | /* |
74 | * Feature disable options | 54 | * Feature disable options |
75 | * These options are also useful to firmware size reduction. | 55 | * These options are also useful to firmware size reduction. |
diff --git a/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk b/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk index d12497792..1e5b99807 100644 --- a/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/chimera65/keymaps/via/rules.mk | |||
@@ -1,5 +1 @@ | |||
1 | # rules.mk overrides to enable VIA | VIA_ENABLE = yes | |
2 | |||
3 | RAW_ENABLE = yes | ||
4 | DYNAMIC_KEYMAP_ENABLE = yes | ||
5 | |||
diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk index 580a7712c..cd6734a31 100644 --- a/keyboards/cannonkeys/chimera65/rules.mk +++ b/keyboards/cannonkeys/chimera65/rules.mk | |||
@@ -52,6 +52,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover | |||
52 | CUSTOM_MATRIX = no # Custom matrix file | 52 | CUSTOM_MATRIX = no # Custom matrix file |
53 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 53 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
54 | RGBLIGHT_ENABLE = no | 54 | RGBLIGHT_ENABLE = no |
55 | |||
56 | # RAW_ENABLE = yes | ||
57 | # DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h index 9da2043d2..2d23d5f83 100644 --- a/keyboards/cannonkeys/instant60/config.h +++ b/keyboards/cannonkeys/instant60/config.h | |||
@@ -58,26 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
58 | #define PIN_WS2812 15 | 58 | #define PIN_WS2812 15 |
59 | #define WS2812_SPI SPID2 | 59 | #define WS2812_SPI SPID2 |
60 | 60 | ||
61 | 61 | // Backlight config starts after VIA's EEPROM usage, | |
62 | // EEPROM usage | 62 | // dynamic keymaps start after this. |
63 | // TODO: refactor with new user EEPROM code (coming soon) | 63 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 |
64 | #define EEPROM_MAGIC 0x451F | ||
65 | #define EEPROM_MAGIC_ADDR 40 | ||
66 | // Bump this every time we change what we store | ||
67 | // This will automatically reset the EEPROM with defaults | ||
68 | // and avoid loading invalid data from the EEPROM | ||
69 | #define EEPROM_VERSION 0x03 | ||
70 | #define EEPROM_VERSION_ADDR 42 | ||
71 | |||
72 | |||
73 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
74 | // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 | ||
75 | // start + layer * rows * col * 2 | ||
76 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 43 | ||
77 | #define EEPROM_CUSTOM_BACKLIGHT 644 | ||
78 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 645 | ||
79 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 | ||
80 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
81 | 64 | ||
82 | /* | 65 | /* |
83 | * Feature disable options | 66 | * Feature disable options |
diff --git a/keyboards/cannonkeys/instant60/keymaps/via/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk index d12497792..1e5b99807 100644 --- a/keyboards/cannonkeys/instant60/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk | |||
@@ -1,5 +1 @@ | |||
1 | # rules.mk overrides to enable VIA | VIA_ENABLE = yes | |
2 | |||
3 | RAW_ENABLE = yes | ||
4 | DYNAMIC_KEYMAP_ENABLE = yes | ||
5 | |||
diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk index d12497792..1e5b99807 100644 --- a/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk +++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk | |||
@@ -1,5 +1 @@ | |||
1 | # rules.mk overrides to enable VIA | VIA_ENABLE = yes | |
2 | |||
3 | RAW_ENABLE = yes | ||
4 | DYNAMIC_KEYMAP_ENABLE = yes | ||
5 | |||
diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index 1ce6fa3b2..d1dd3b289 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk | |||
@@ -55,7 +55,4 @@ CUSTOM_MATRIX = no # Custom matrix file | |||
55 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 55 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
56 | RGBLIGHT_ENABLE = yes | 56 | RGBLIGHT_ENABLE = yes |
57 | 57 | ||
58 | # RAW_ENABLE = yes | ||
59 | # DYNAMIC_KEYMAP_ENABLE = yes | ||
60 | |||
61 | LAYOUTS = 60_ansi 60_tsangan_hhkb | 58 | LAYOUTS = 60_ansi 60_tsangan_hhkb |
diff --git a/keyboards/cannonkeys/iron165/config.h b/keyboards/cannonkeys/iron165/config.h index c5fcd4518..640f6fb65 100644 --- a/keyboards/cannonkeys/iron165/config.h +++ b/keyboards/cannonkeys/iron165/config.h | |||
@@ -50,25 +50,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
50 | /* Locking resynchronize hack */ | 50 | /* Locking resynchronize hack */ |
51 | #define LOCKING_RESYNC_ENABLE | 51 | #define LOCKING_RESYNC_ENABLE |
52 | 52 | ||
53 | // EEPROM usage | 53 | // Backlight config starts after VIA's EEPROM usage, |
54 | // TODO: refactor with new user EEPROM code (coming soon) | 54 | // dynamic keymaps start after this. |
55 | #define EEPROM_MAGIC 0x451F | 55 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 |
56 | #define EEPROM_MAGIC_ADDR 40 | ||
57 | // Bump this every time we change what we store | ||
58 | // This will automatically reset the EEPROM with defaults | ||
59 | // and avoid loading invalid data from the EEPROM | ||
60 | #define EEPROM_VERSION 0x02 | ||
61 | #define EEPROM_VERSION_ADDR 42 | ||
62 | |||
63 | |||
64 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
65 | // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 | ||
66 | // start + layer * rows * col * 2 | ||
67 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 43 | ||
68 | #define EEPROM_CUSTOM_BACKLIGHT 684 | ||
69 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 | ||
70 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 | ||
71 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
72 | 56 | ||
73 | /* | 57 | /* |
74 | * Feature disable options | 58 | * Feature disable options |
diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index 8387289d8..7a4354c8a 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h | |||
@@ -64,41 +64,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
64 | 64 | ||
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | 67 | // Custom config starts after VIA's EEPROM usage, | |
68 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 68 | // dynamic keymaps start after this. |
69 | 69 | // Custom config Usage: | |
70 | // EEPROM usage | 70 | // 1 for enabled encoder modes (1 byte) |
71 | 71 | // 1 for custom backlighting controls (1 byte) | |
72 | // TODO: refactor with new user EEPROM code (coming soon) | 72 | // 1 for OLED default mode (1 byte) |
73 | #define EEPROM_MAGIC 0x451F | 73 | // 6 for 3x custom encoder settings, left, right, and press (18 bytes) |
74 | #define EEPROM_MAGIC_ADDR 40 | 74 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 21 |
75 | // Bump this every time we change what we store | ||
76 | // This will automatically reset the EEPROM with defaults | ||
77 | // and avoid loading invalid data from the EEPROM | ||
78 | #define EEPROM_VERSION 0x01 | ||
79 | #define EEPROM_VERSION_ADDR 42 | ||
80 | |||
81 | // Dynamic keymap starts after EEPROM version | ||
82 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 43 | ||
83 | |||
84 | // Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) = 803 | ||
85 | |||
86 | // I'm also putting my custom stuff after that | ||
87 | // 1 for enabled encoder modes | ||
88 | // 1 for custom backlighting controls | ||
89 | // 1 for OLED default mode | ||
90 | // 6 for 3x custom encoder settings, left, right, and press (18 total) | ||
91 | |||
92 | #define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 811 | ||
93 | #define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 812 | ||
94 | #define DYNAMIC_KEYMAP_DEFAULT_OLED 813 | ||
95 | #define DYNAMIC_KEYMAP_CUSTOM_ENCODER 814 | ||
96 | |||
97 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 832 | ||
98 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 | ||
99 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
100 | |||
101 | |||
102 | 75 | ||
103 | /* | 76 | /* |
104 | * Feature disable options | 77 | * Feature disable options |
diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk index 0dcaa7318..6f45dc73e 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/keymaps/boy_314/rules.mk | |||
@@ -1,4 +1,3 @@ | |||
1 | # rules.mk overrides to enable VIA | 1 | # rules.mk overrides to enable VIA |
2 | 2 | ||
3 | RAW_ENABLE = yes | 3 | VIA_ENABLE = yes \ No newline at end of file |
4 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk index d12497792..1e5b99807 100644 --- a/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk | |||
@@ -1,5 +1 @@ | |||
1 | # rules.mk overrides to enable VIA | VIA_ENABLE = yes | |
2 | |||
3 | RAW_ENABLE = yes | ||
4 | DYNAMIC_KEYMAP_ENABLE = yes | ||
5 | |||
diff --git a/keyboards/cannonkeys/satisfaction75/prototype/prototype.h b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h index 42e574f3e..ed4c7d793 100644 --- a/keyboards/cannonkeys/satisfaction75/prototype/prototype.h +++ b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h | |||
@@ -17,3 +17,20 @@ | |||
17 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ | 17 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ |
18 | { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ | 18 | { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ |
19 | } | 19 | } |
20 | |||
21 | // Expose All Keys - Split backspace - ISO Extra keys - Split space bottom row | ||
22 | #define LAYOUT_all( \ | ||
23 | K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ | ||
24 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ | ||
25 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ | ||
26 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ | ||
27 | K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ | ||
28 | K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \ | ||
29 | ) { \ | ||
30 | { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ | ||
31 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ | ||
32 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ | ||
33 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ | ||
34 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ | ||
35 | { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ | ||
36 | } | ||
diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index 3e2877200..e81448d62 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk | |||
@@ -51,7 +51,4 @@ ENCODER_ENABLE = yes | |||
51 | QWIIC_ENABLE += MICRO_OLED | 51 | QWIIC_ENABLE += MICRO_OLED |
52 | #BACKLIGHT_ENABLE = yes | 52 | #BACKLIGHT_ENABLE = yes |
53 | 53 | ||
54 | # RAW_ENABLE = yes | ||
55 | # DYNAMIC_KEYMAP_ENABLE = yes | ||
56 | |||
57 | DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 | 54 | DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 |
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 12d3660da..0fe09c384 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c | |||
@@ -15,11 +15,7 @@ | |||
15 | #include "raw_hid.h" | 15 | #include "raw_hid.h" |
16 | #include "dynamic_keymap.h" | 16 | #include "dynamic_keymap.h" |
17 | #include "tmk_core/common/eeprom.h" | 17 | #include "tmk_core/common/eeprom.h" |
18 | 18 | #include "version.h" // for QMK_BUILDDATE used in EEPROM magic | |
19 | // HACK | ||
20 | #include "keyboards/wilba_tech/via_api.h" // Temporary hack | ||
21 | #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack | ||
22 | |||
23 | 19 | ||
24 | /* Artificial delay added to get media keys to work in the encoder*/ | 20 | /* Artificial delay added to get media keys to work in the encoder*/ |
25 | #define MEDIA_KEY_DELAY 10 | 21 | #define MEDIA_KEY_DELAY 10 |
@@ -58,56 +54,20 @@ backlight_config_t kb_backlight_config = { | |||
58 | .level = BACKLIGHT_LEVELS | 54 | .level = BACKLIGHT_LEVELS |
59 | }; | 55 | }; |
60 | 56 | ||
61 | bool eeprom_is_valid(void) | 57 | #ifdef VIA_ENABLE |
62 | { | 58 | void raw_hid_receive_kb( uint8_t *data, uint8_t length ) |
63 | return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && | ||
64 | eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); | ||
65 | } | ||
66 | |||
67 | void eeprom_set_valid(bool valid) | ||
68 | { | 59 | { |
69 | eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); | 60 | uint8_t *command_id = &(data[0]); |
70 | eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); | 61 | uint8_t *command_data = &(data[1]); |
71 | } | 62 | switch ( *command_id ) |
72 | 63 | { | |
73 | void eeprom_reset(void) | 64 | case id_get_keyboard_value: |
74 | { | 65 | { |
75 | // Set the VIA specific EEPROM state as invalid. | ||
76 | eeprom_set_valid(false); | ||
77 | // Set the TMK/QMK EEPROM state as invalid. | ||
78 | eeconfig_disable(); | ||
79 | } | ||
80 | |||
81 | #ifdef RAW_ENABLE | ||
82 | |||
83 | void raw_hid_receive( uint8_t *data, uint8_t length ) | ||
84 | { | ||
85 | uint8_t *command_id = &(data[0]); | ||
86 | uint8_t *command_data = &(data[1]); | ||
87 | switch ( *command_id ) | ||
88 | { | ||
89 | case id_get_protocol_version: | ||
90 | { | ||
91 | command_data[0] = PROTOCOL_VERSION >> 8; | ||
92 | command_data[1] = PROTOCOL_VERSION & 0xFF; | ||
93 | break; | ||
94 | } | ||
95 | case id_get_keyboard_value: | ||
96 | { | ||
97 | switch( command_data[0]) | 66 | switch( command_data[0]) |
98 | { | 67 | { |
99 | case id_uptime: | ||
100 | { | ||
101 | uint32_t value = timer_read32(); | ||
102 | command_data[1] = (value >> 24 ) & 0xFF; | ||
103 | command_data[2] = (value >> 16 ) & 0xFF; | ||
104 | command_data[3] = (value >> 8 ) & 0xFF; | ||
105 | command_data[4] = value & 0xFF; | ||
106 | break; | ||
107 | } | ||
108 | case id_oled_default_mode: | 68 | case id_oled_default_mode: |
109 | { | 69 | { |
110 | uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); | 70 | uint8_t default_oled = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED); |
111 | command_data[1] = default_oled; | 71 | command_data[1] = default_oled; |
112 | break; | 72 | break; |
113 | } | 73 | } |
@@ -141,15 +101,14 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) | |||
141 | break; | 101 | break; |
142 | } | 102 | } |
143 | } | 103 | } |
144 | break; | 104 | break; |
145 | } | 105 | } |
146 | #ifdef DYNAMIC_KEYMAP_ENABLE | ||
147 | case id_set_keyboard_value: | 106 | case id_set_keyboard_value: |
148 | { | 107 | { |
149 | switch(command_data[0]){ | 108 | switch(command_data[0]){ |
150 | case id_oled_default_mode: | 109 | case id_oled_default_mode: |
151 | { | 110 | { |
152 | eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED, command_data[1]); | 111 | eeprom_update_byte((uint8_t*)EEPROM_DEFAULT_OLED, command_data[1]); |
153 | break; | 112 | break; |
154 | } | 113 | } |
155 | case id_oled_mode: | 114 | case id_oled_mode: |
@@ -161,7 +120,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) | |||
161 | case id_encoder_modes: | 120 | case id_encoder_modes: |
162 | { | 121 | { |
163 | enabled_encoder_modes = command_data[1]; | 122 | enabled_encoder_modes = command_data[1]; |
164 | eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, enabled_encoder_modes); | 123 | eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, enabled_encoder_modes); |
165 | break; | 124 | break; |
166 | } | 125 | } |
167 | case id_encoder_custom: | 126 | case id_encoder_custom: |
@@ -180,95 +139,15 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) | |||
180 | } | 139 | } |
181 | break; | 140 | break; |
182 | } | 141 | } |
183 | case id_dynamic_keymap_get_keycode: | 142 | default: |
184 | { | 143 | { |
185 | uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); | 144 | // Unhandled message. |
186 | command_data[3] = keycode >> 8; | 145 | *command_id = id_unhandled; |
187 | command_data[4] = keycode & 0xFF; | 146 | break; |
188 | break; | 147 | } |
189 | } | 148 | } |
190 | case id_dynamic_keymap_set_keycode: | 149 | // DO NOT call raw_hid_send(data,length) here, let caller do this |
191 | { | ||
192 | dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); | ||
193 | break; | ||
194 | } | ||
195 | case id_dynamic_keymap_reset: | ||
196 | { | ||
197 | dynamic_keymap_reset(); | ||
198 | break; | ||
199 | } | ||
200 | case id_dynamic_keymap_macro_get_count: | ||
201 | { | ||
202 | command_data[0] = dynamic_keymap_macro_get_count(); | ||
203 | break; | ||
204 | } | ||
205 | case id_dynamic_keymap_macro_get_buffer_size: | ||
206 | { | ||
207 | uint16_t size = dynamic_keymap_macro_get_buffer_size(); | ||
208 | command_data[0] = size >> 8; | ||
209 | command_data[1] = size & 0xFF; | ||
210 | break; | ||
211 | } | ||
212 | case id_dynamic_keymap_macro_get_buffer: | ||
213 | { | ||
214 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
215 | uint16_t size = command_data[2]; // size <= 28 | ||
216 | dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); | ||
217 | break; | ||
218 | } | ||
219 | case id_dynamic_keymap_macro_reset: | ||
220 | { | ||
221 | dynamic_keymap_macro_reset(); | ||
222 | break; | ||
223 | } | ||
224 | case id_dynamic_keymap_get_layer_count: | ||
225 | { | ||
226 | command_data[0] = dynamic_keymap_get_layer_count(); | ||
227 | break; | ||
228 | } | ||
229 | case id_dynamic_keymap_get_buffer: | ||
230 | { | ||
231 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
232 | uint16_t size = command_data[2]; // size <= 28 | ||
233 | dynamic_keymap_get_buffer( offset, size, &command_data[3] ); | ||
234 | break; | ||
235 | } | ||
236 | case id_dynamic_keymap_set_buffer: | ||
237 | { | ||
238 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
239 | uint16_t size = command_data[2]; // size <= 28 | ||
240 | dynamic_keymap_set_buffer( offset, size, &command_data[3] ); | ||
241 | break; | ||
242 | } | ||
243 | #endif // DYNAMIC_KEYMAP_ENABLE | ||
244 | case id_eeprom_reset: | ||
245 | { | ||
246 | eeprom_reset(); | ||
247 | break; | ||
248 | } | ||
249 | case id_bootloader_jump: | ||
250 | { | ||
251 | // Need to send data back before the jump | ||
252 | // Informs host that the command is handled | ||
253 | raw_hid_send( data, length ); | ||
254 | // Give host time to read it | ||
255 | wait_ms(100); | ||
256 | bootloader_jump(); | ||
257 | break; | ||
258 | } | ||
259 | default: | ||
260 | { | ||
261 | // Unhandled message. | ||
262 | *command_id = id_unhandled; | ||
263 | break; | ||
264 | } | ||
265 | } | ||
266 | |||
267 | // Return same buffer with values changed | ||
268 | raw_hid_send( data, length ); | ||
269 | |||
270 | } | 150 | } |
271 | |||
272 | #endif | 151 | #endif |
273 | 152 | ||
274 | 153 | ||
@@ -349,18 +228,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
349 | break; | 228 | break; |
350 | } | 229 | } |
351 | 230 | ||
352 | #ifdef DYNAMIC_KEYMAP_ENABLE | ||
353 | // Handle macros | ||
354 | if (record->event.pressed) { | ||
355 | if ( keycode >= MACRO00 && keycode <= MACRO15 ) | ||
356 | { | ||
357 | uint8_t id = keycode - MACRO00; | ||
358 | dynamic_keymap_macro_send(id); | ||
359 | return false; | ||
360 | } | ||
361 | } | ||
362 | #endif //DYNAMIC_KEYMAP_ENABLE | ||
363 | |||
364 | return process_record_user(keycode, record); | 231 | return process_record_user(keycode, record); |
365 | } | 232 | } |
366 | 233 | ||
@@ -392,59 +259,56 @@ void encoder_update_kb(uint8_t index, bool clockwise) { | |||
392 | } | 259 | } |
393 | } | 260 | } |
394 | 261 | ||
395 | void dynamic_keymap_custom_reset(void){ | 262 | void custom_config_reset(void){ |
396 | void *p = (void*)(DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); | 263 | void *p = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR); |
397 | void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); | 264 | void *end = (void*)(VIA_EEPROM_CUSTOM_CONFIG_ADDR+VIA_EEPROM_CUSTOM_CONFIG_SIZE); |
398 | while ( p != end ) { | 265 | while ( p != end ) { |
399 | eeprom_update_byte(p, 0); | 266 | eeprom_update_byte(p, 0); |
400 | ++p; | 267 | ++p; |
401 | } | 268 | } |
402 | eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, 0x1F); | 269 | eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, 0x1F); |
403 | } | 270 | } |
404 | 271 | ||
405 | void save_backlight_config_to_eeprom(){ | 272 | void backlight_config_save(){ |
406 | eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT, kb_backlight_config.raw); | 273 | eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); |
407 | } | 274 | } |
408 | 275 | ||
409 | void load_custom_config(){ | 276 | void custom_config_load(){ |
410 | kb_backlight_config.raw = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); | 277 | kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); |
411 | #ifdef DYNAMIC_KEYMAP_ENABLE | 278 | #ifdef DYNAMIC_KEYMAP_ENABLE |
412 | oled_mode = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); | 279 | oled_mode = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED); |
413 | enabled_encoder_modes = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES); | 280 | enabled_encoder_modes = eeprom_read_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES); |
414 | #endif | 281 | #endif |
415 | } | 282 | } |
416 | 283 | ||
417 | void eeprom_init_kb(void) | 284 | // Called from via_init() if VIA_ENABLE |
285 | // Called from matrix_init_kb() if not VIA_ENABLE | ||
286 | void via_init_kb(void) | ||
418 | { | 287 | { |
419 | // If the EEPROM has the magic, the data is good. | 288 | // If the EEPROM has the magic, the data is good. |
420 | // OK to load from EEPROM. | 289 | // OK to load from EEPROM. |
421 | if (eeprom_is_valid()) { | 290 | if (via_eeprom_is_valid()) { |
422 | load_custom_config(); | 291 | custom_config_load(); |
423 | } else { | 292 | } else { |
424 | // If the EEPROM has not been saved before, or is out of date, | ||
425 | // save the default values to the EEPROM. Default values | ||
426 | // come from construction of the zeal_backlight_config instance. | ||
427 | //backlight_config_save(); | ||
428 | #ifdef DYNAMIC_KEYMAP_ENABLE | 293 | #ifdef DYNAMIC_KEYMAP_ENABLE |
429 | // This resets the keymaps in EEPROM to what is in flash. | ||
430 | dynamic_keymap_reset(); | ||
431 | // This resets the macros in EEPROM to nothing. | ||
432 | dynamic_keymap_macro_reset(); | ||
433 | // Reset the custom stuff | 294 | // Reset the custom stuff |
434 | dynamic_keymap_custom_reset(); | 295 | custom_config_reset(); |
435 | #endif | 296 | #endif |
436 | // Save the magic number last, in case saving was interrupted | 297 | // DO NOT set EEPROM valid here, let caller do this |
437 | eeprom_set_valid(true); | 298 | } |
438 | } | ||
439 | } | 299 | } |
440 | 300 | ||
441 | void matrix_init_kb(void) | 301 | void matrix_init_kb(void) |
442 | { | 302 | { |
443 | eeprom_init_kb(); | 303 | #ifndef VIA_ENABLE |
304 | via_init_kb(); | ||
305 | via_eeprom_set_valid(true); | ||
306 | #endif // VIA_ENABLE | ||
307 | |||
444 | rtcGetTime(&RTCD1, &last_timespec); | 308 | rtcGetTime(&RTCD1, &last_timespec); |
445 | queue_for_send = true; | 309 | queue_for_send = true; |
446 | backlight_init_ports(); | 310 | backlight_init_ports(); |
447 | matrix_init_user(); | 311 | matrix_init_user(); |
448 | } | 312 | } |
449 | 313 | ||
450 | 314 | ||
@@ -472,3 +336,51 @@ void matrix_scan_kb(void) { | |||
472 | #endif | 336 | #endif |
473 | } | 337 | } |
474 | 338 | ||
339 | // | ||
340 | // In the case of VIA being disabled, we still need to check if | ||
341 | // keyboard level EEPROM memory is valid before loading. | ||
342 | // Thus these are copies of the same functions in VIA, since | ||
343 | // the backlight settings reuse VIA's EEPROM magic/version, | ||
344 | // and the ones in via.c won't be compiled in. | ||
345 | // | ||
346 | // Yes, this is sub-optimal, and is only here for completeness | ||
347 | // (i.e. catering to the 1% of people that want wilba.tech LED bling | ||
348 | // AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA). | ||
349 | // | ||
350 | #ifndef VIA_ENABLE | ||
351 | |||
352 | bool via_eeprom_is_valid(void) | ||
353 | { | ||
354 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
355 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
356 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
357 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
358 | |||
359 | return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 && | ||
360 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 && | ||
361 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 ); | ||
362 | } | ||
363 | |||
364 | // Sets VIA/keyboard level usage of EEPROM to valid/invalid | ||
365 | // Keyboard level code (eg. via_init_kb()) should not call this | ||
366 | void via_eeprom_set_valid(bool valid) | ||
367 | { | ||
368 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
369 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
370 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
371 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
372 | |||
373 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF); | ||
374 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF); | ||
375 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF); | ||
376 | } | ||
377 | |||
378 | void via_eeprom_reset(void) | ||
379 | { | ||
380 | // Set the VIA specific EEPROM state as invalid. | ||
381 | via_eeprom_set_valid(false); | ||
382 | // Set the TMK/QMK EEPROM state as invalid. | ||
383 | eeconfig_disable(); | ||
384 | } | ||
385 | |||
386 | #endif // VIA_ENABLE \ No newline at end of file | ||
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h index 188a1d497..13aaf6888 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h | |||
@@ -8,6 +8,12 @@ | |||
8 | #include "rev1.h" | 8 | #include "rev1.h" |
9 | #endif | 9 | #endif |
10 | 10 | ||
11 | #include "via.h" // only for EEPROM address | ||
12 | #define EEPROM_ENABLED_ENCODER_MODES (VIA_EEPROM_CUSTOM_CONFIG_ADDR) | ||
13 | #define EEPROM_CUSTOM_BACKLIGHT (VIA_EEPROM_CUSTOM_CONFIG_ADDR+1) | ||
14 | #define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2) | ||
15 | #define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+3) | ||
16 | |||
11 | /* screen off after this many milliseconds */ | 17 | /* screen off after this many milliseconds */ |
12 | #define ScreenOffInterval 60000 /* milliseconds */ | 18 | #define ScreenOffInterval 60000 /* milliseconds */ |
13 | 19 | ||
@@ -117,5 +123,5 @@ void backlight_set(uint8_t level); | |||
117 | bool is_breathing(void); | 123 | bool is_breathing(void); |
118 | void breathing_enable(void); | 124 | void breathing_enable(void); |
119 | void breathing_disable(void); | 125 | void breathing_disable(void); |
120 | void load_custom_config(void); | 126 | void custom_config_load(void); |
121 | void save_backlight_config_to_eeprom(void); | 127 | void backlight_config_save(void); |
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index e866d897c..8fcd720e2 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c | |||
@@ -12,7 +12,7 @@ void pre_encoder_mode_change(){ | |||
12 | timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; | 12 | timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; |
13 | rtcSetTime(&RTCD1, ×pec); | 13 | rtcSetTime(&RTCD1, ×pec); |
14 | } else if (encoder_mode == ENC_MODE_BACKLIGHT){ | 14 | } else if (encoder_mode == ENC_MODE_BACKLIGHT){ |
15 | save_backlight_config_to_eeprom(); | 15 | backlight_config_save(); |
16 | } | 16 | } |
17 | } | 17 | } |
18 | 18 | ||
@@ -221,7 +221,7 @@ uint16_t handle_encoder_press(){ | |||
221 | 221 | ||
222 | uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ | 222 | uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ |
223 | #ifdef DYNAMIC_KEYMAP_ENABLE | 223 | #ifdef DYNAMIC_KEYMAP_ENABLE |
224 | void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); | 224 | void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); |
225 | //big endian | 225 | //big endian |
226 | uint16_t keycode = eeprom_read_byte(addr) << 8; | 226 | uint16_t keycode = eeprom_read_byte(addr) << 8; |
227 | keycode |= eeprom_read_byte(addr + 1); | 227 | keycode |= eeprom_read_byte(addr + 1); |
@@ -233,7 +233,7 @@ uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior){ | |||
233 | 233 | ||
234 | void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){ | 234 | void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code){ |
235 | #ifdef DYNAMIC_KEYMAP_ENABLE | 235 | #ifdef DYNAMIC_KEYMAP_ENABLE |
236 | void* addr = (void*)(DYNAMIC_KEYMAP_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); | 236 | void* addr = (void*)(EEPROM_CUSTOM_ENCODER + (encoder_idx * 6) + (behavior * 2)); |
237 | eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); | 237 | eeprom_update_byte(addr, (uint8_t)(new_code >> 8)); |
238 | eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); | 238 | eeprom_update_byte(addr + 1, (uint8_t)(new_code & 0xFF)); |
239 | #endif | 239 | #endif |
diff --git a/keyboards/cannonkeys/savage65/config.h b/keyboards/cannonkeys/savage65/config.h index 996b93951..b69aba39e 100644 --- a/keyboards/cannonkeys/savage65/config.h +++ b/keyboards/cannonkeys/savage65/config.h | |||
@@ -58,25 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
58 | #define PIN_WS2812 15 | 58 | #define PIN_WS2812 15 |
59 | #define WS2812_SPI SPID2 | 59 | #define WS2812_SPI SPID2 |
60 | 60 | ||
61 | // EEPROM usage | 61 | // Backlight config starts after VIA's EEPROM usage, |
62 | // TODO: refactor with new user EEPROM code (coming soon) | 62 | // dynamic keymaps start after this. |
63 | #define EEPROM_MAGIC 0x451F | 63 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 |
64 | #define EEPROM_MAGIC_ADDR 40 | ||
65 | // Bump this every time we change what we store | ||
66 | // This will automatically reset the EEPROM with defaults | ||
67 | // and avoid loading invalid data from the EEPROM | ||
68 | #define EEPROM_VERSION 0x02 | ||
69 | #define EEPROM_VERSION_ADDR 42 | ||
70 | |||
71 | |||
72 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
73 | // Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 | ||
74 | // start + layer * rows * col * 2 | ||
75 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 43 | ||
76 | #define EEPROM_CUSTOM_BACKLIGHT 684 | ||
77 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 685 | ||
78 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 192 | ||
79 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
80 | 64 | ||
81 | /* | 65 | /* |
82 | * Feature disable options | 66 | * Feature disable options |
diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c index 5a9ccafff..32e30f334 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.c +++ b/keyboards/cannonkeys/stm32f072/keyboard.c | |||
@@ -10,11 +10,10 @@ | |||
10 | #include "raw_hid.h" | 10 | #include "raw_hid.h" |
11 | #include "dynamic_keymap.h" | 11 | #include "dynamic_keymap.h" |
12 | #include "tmk_core/common/eeprom.h" | 12 | #include "tmk_core/common/eeprom.h" |
13 | #include "version.h" // for QMK_BUILDDATE used in EEPROM magic | ||
13 | 14 | ||
14 | // HACK | 15 | #include "via.h" |
15 | #include "keyboards/wilba_tech/via_api.h" // Temporary hack | 16 | #define EEPROM_CUSTOM_BACKLIGHT (VIA_EEPROM_CUSTOM_CONFIG_ADDR) |
16 | #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack | ||
17 | |||
18 | 17 | ||
19 | backlight_config_t kb_backlight_config = { | 18 | backlight_config_t kb_backlight_config = { |
20 | .enable = true, | 19 | .enable = true, |
@@ -22,61 +21,29 @@ backlight_config_t kb_backlight_config = { | |||
22 | .level = BACKLIGHT_LEVELS | 21 | .level = BACKLIGHT_LEVELS |
23 | }; | 22 | }; |
24 | 23 | ||
25 | bool eeprom_is_valid(void) | 24 | void backlight_config_save(){ |
26 | { | ||
27 | return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && | ||
28 | eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); | ||
29 | } | ||
30 | |||
31 | void eeprom_set_valid(bool valid) | ||
32 | { | ||
33 | eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); | ||
34 | eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); | ||
35 | } | ||
36 | |||
37 | void eeprom_reset(void) | ||
38 | { | ||
39 | eeprom_set_valid(false); | ||
40 | eeconfig_disable(); | ||
41 | } | ||
42 | |||
43 | void save_backlight_config_to_eeprom(){ | ||
44 | eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); | 25 | eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); |
45 | } | 26 | } |
46 | 27 | ||
47 | void load_custom_config(){ | 28 | void backlight_config_load(){ |
48 | kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); | 29 | kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); |
49 | } | 30 | } |
50 | 31 | ||
51 | #ifdef DYNAMIC_KEYMAP_ENABLE | 32 | // Called from via_init() if VIA_ENABLE |
52 | void dynamic_keymap_custom_reset(void){ | 33 | // Called from matrix_init_kb() if not VIA_ENABLE |
53 | void *p = (void*)(EEPROM_CUSTOM_BACKLIGHT); | 34 | void via_init_kb(void) |
54 | void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); | ||
55 | while ( p != end ) { | ||
56 | eeprom_update_byte(p, 0); | ||
57 | ++p; | ||
58 | } | ||
59 | } | ||
60 | #endif | ||
61 | |||
62 | void eeprom_init_kb(void) | ||
63 | { | 35 | { |
64 | // If the EEPROM has the magic, the data is good. | 36 | // If the EEPROM has the magic, the data is good. |
65 | // OK to load from EEPROM. | 37 | // OK to load from EEPROM. |
66 | if (eeprom_is_valid()) { | 38 | if (via_eeprom_is_valid()) { |
67 | load_custom_config(); | 39 | backlight_config_load(); |
68 | } else { | 40 | } else { |
69 | #ifdef DYNAMIC_KEYMAP_ENABLE | 41 | // If the EEPROM has not been saved before, or is out of date, |
70 | // This resets the keymaps in EEPROM to what is in flash. | 42 | // save the default values to the EEPROM. Default values |
71 | dynamic_keymap_reset(); | 43 | // come from construction of the backlight_config instance. |
72 | // This resets the macros in EEPROM to nothing. | 44 | backlight_config_save(); |
73 | dynamic_keymap_macro_reset(); | 45 | |
74 | // Reset the custom stuff | 46 | // DO NOT set EEPROM valid here, let caller do this |
75 | dynamic_keymap_custom_reset(); | ||
76 | #endif | ||
77 | // Save the magic number last, in case saving was interrupted | ||
78 | save_backlight_config_to_eeprom(); | ||
79 | eeprom_set_valid(true); | ||
80 | } | 47 | } |
81 | } | 48 | } |
82 | 49 | ||
@@ -84,7 +51,13 @@ __attribute__ ((weak)) | |||
84 | void matrix_init_board(void); | 51 | void matrix_init_board(void); |
85 | 52 | ||
86 | void matrix_init_kb(void){ | 53 | void matrix_init_kb(void){ |
87 | eeprom_init_kb(); | 54 | // If VIA is disabled, we still need to load backlight settings. |
55 | // Call via_init_kb() the same way as via_init(), with setting | ||
56 | // EEPROM valid afterwards. | ||
57 | #ifndef VIA_ENABLE | ||
58 | via_init_kb(); | ||
59 | via_eeprom_set_valid(true); | ||
60 | #endif // VIA_ENABLE | ||
88 | /* MOSI pin*/ | 61 | /* MOSI pin*/ |
89 | #ifdef RGBLIGHT_ENABLE | 62 | #ifdef RGBLIGHT_ENABLE |
90 | palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); | 63 | palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); |
@@ -112,7 +85,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
112 | kb_backlight_config.level = BACKLIGHT_LEVELS; | 85 | kb_backlight_config.level = BACKLIGHT_LEVELS; |
113 | } | 86 | } |
114 | backlight_set(kb_backlight_config.level); | 87 | backlight_set(kb_backlight_config.level); |
115 | save_backlight_config_to_eeprom(); | 88 | backlight_config_save(); |
116 | } | 89 | } |
117 | return false; | 90 | return false; |
118 | case BL_TOGG: | 91 | case BL_TOGG: |
@@ -123,7 +96,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
123 | } else { | 96 | } else { |
124 | backlight_set(0); | 97 | backlight_set(0); |
125 | } | 98 | } |
126 | save_backlight_config_to_eeprom(); | 99 | backlight_config_save(); |
127 | } | 100 | } |
128 | return false; | 101 | return false; |
129 | 102 | ||
@@ -135,168 +108,71 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
135 | kb_backlight_config.level = kb_backlight_config.level - 1; | 108 | kb_backlight_config.level = kb_backlight_config.level - 1; |
136 | } | 109 | } |
137 | backlight_set(kb_backlight_config.level); | 110 | backlight_set(kb_backlight_config.level); |
138 | save_backlight_config_to_eeprom(); | 111 | backlight_config_save(); |
139 | } | 112 | } |
140 | return false; | 113 | return false; |
141 | case BL_BRTG: | 114 | case BL_BRTG: |
142 | if (record->event.pressed) { | 115 | if (record->event.pressed) { |
143 | kb_backlight_config.breathing = !kb_backlight_config.breathing; | 116 | kb_backlight_config.breathing = !kb_backlight_config.breathing; |
144 | breathing_toggle(); | 117 | breathing_toggle(); |
145 | save_backlight_config_to_eeprom(); | 118 | backlight_config_save(); |
146 | } | 119 | } |
147 | return false; | 120 | return false; |
148 | default: | 121 | default: |
149 | break; | 122 | break; |
150 | } | 123 | } |
151 | 124 | ||
152 | #ifdef DYNAMIC_KEYMAP_ENABLE | ||
153 | // Handle macros | ||
154 | if (record->event.pressed) { | ||
155 | if ( keycode >= MACRO00 && keycode <= MACRO15 ) | ||
156 | { | ||
157 | uint8_t id = keycode - MACRO00; | ||
158 | dynamic_keymap_macro_send(id); | ||
159 | return false; | ||
160 | } | ||
161 | } | ||
162 | #endif //DYNAMIC_KEYMAP_ENABLE | ||
163 | |||
164 | return process_record_user(keycode, record);; | 125 | return process_record_user(keycode, record);; |
165 | } | 126 | } |
166 | 127 | ||
167 | 128 | ||
168 | // Start Dynamic Keymap code | ||
169 | #ifdef RAW_ENABLE | ||
170 | 129 | ||
171 | void raw_hid_receive( uint8_t *data, uint8_t length ) | ||
172 | { | ||
173 | uint8_t *command_id = &(data[0]); | ||
174 | uint8_t *command_data = &(data[1]); | ||
175 | switch ( *command_id ) | ||
176 | { | ||
177 | case id_get_protocol_version: | ||
178 | { | ||
179 | command_data[0] = PROTOCOL_VERSION >> 8; | ||
180 | command_data[1] = PROTOCOL_VERSION & 0xFF; | ||
181 | break; | ||
182 | } | ||
183 | case id_get_keyboard_value: | ||
184 | { | ||
185 | switch( command_data[0]) | ||
186 | { | ||
187 | case id_uptime: | ||
188 | { | ||
189 | uint32_t value = timer_read32(); | ||
190 | command_data[1] = (value >> 24 ) & 0xFF; | ||
191 | command_data[2] = (value >> 16 ) & 0xFF; | ||
192 | command_data[3] = (value >> 8 ) & 0xFF; | ||
193 | command_data[4] = value & 0xFF; | ||
194 | break; | ||
195 | } | ||
196 | default: | ||
197 | { | ||
198 | *command_id = id_unhandled; | ||
199 | break; | ||
200 | } | ||
201 | } | ||
202 | break; | ||
203 | } | ||
204 | #ifdef DYNAMIC_KEYMAP_ENABLE | ||
205 | 130 | ||
206 | case id_dynamic_keymap_get_keycode: | 131 | // |
207 | { | 132 | // In the case of VIA being disabled, we still need to check if |
208 | uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); | 133 | // keyboard level EEPROM memory is valid before loading. |
209 | command_data[3] = keycode >> 8; | 134 | // Thus these are copies of the same functions in VIA, since |
210 | command_data[4] = keycode & 0xFF; | 135 | // the backlight settings reuse VIA's EEPROM magic/version, |
211 | break; | 136 | // and the ones in via.c won't be compiled in. |
212 | } | 137 | // |
213 | case id_dynamic_keymap_set_keycode: | 138 | // Yes, this is sub-optimal, and is only here for completeness |
214 | { | 139 | // (i.e. catering to the 1% of people that want wilba.tech LED bling |
215 | dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); | 140 | // AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA). |
216 | break; | 141 | // |
217 | } | 142 | #ifndef VIA_ENABLE |
218 | case id_dynamic_keymap_reset: | ||
219 | { | ||
220 | dynamic_keymap_reset(); | ||
221 | break; | ||
222 | } | ||
223 | case id_dynamic_keymap_macro_get_count: | ||
224 | { | ||
225 | command_data[0] = dynamic_keymap_macro_get_count(); | ||
226 | break; | ||
227 | } | ||
228 | case id_dynamic_keymap_macro_get_buffer_size: | ||
229 | { | ||
230 | uint16_t size = dynamic_keymap_macro_get_buffer_size(); | ||
231 | command_data[0] = size >> 8; | ||
232 | command_data[1] = size & 0xFF; | ||
233 | break; | ||
234 | } | ||
235 | case id_dynamic_keymap_macro_get_buffer: | ||
236 | { | ||
237 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
238 | uint16_t size = command_data[2]; // size <= 28 | ||
239 | dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); | ||
240 | break; | ||
241 | } | ||
242 | case id_dynamic_keymap_macro_set_buffer: | ||
243 | { | ||
244 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
245 | uint16_t size = command_data[2]; // size <= 28 | ||
246 | dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); | ||
247 | break; | ||
248 | } | ||
249 | case id_dynamic_keymap_macro_reset: | ||
250 | { | ||
251 | dynamic_keymap_macro_reset(); | ||
252 | break; | ||
253 | } | ||
254 | case id_dynamic_keymap_get_layer_count: | ||
255 | { | ||
256 | command_data[0] = dynamic_keymap_get_layer_count(); | ||
257 | break; | ||
258 | } | ||
259 | case id_dynamic_keymap_get_buffer: | ||
260 | { | ||
261 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
262 | uint16_t size = command_data[2]; // size <= 28 | ||
263 | dynamic_keymap_get_buffer( offset, size, &command_data[3] ); | ||
264 | break; | ||
265 | } | ||
266 | case id_dynamic_keymap_set_buffer: | ||
267 | { | ||
268 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
269 | uint16_t size = command_data[2]; // size <= 28 | ||
270 | dynamic_keymap_set_buffer( offset, size, &command_data[3] ); | ||
271 | break; | ||
272 | } | ||
273 | #endif // DYNAMIC_KEYMAP_ENABLE | ||
274 | case id_eeprom_reset: | ||
275 | { | ||
276 | eeprom_reset(); | ||
277 | break; | ||
278 | } | ||
279 | case id_bootloader_jump: | ||
280 | { | ||
281 | // Need to send data back before the jump | ||
282 | // Informs host that the command is handled | ||
283 | raw_hid_send( data, length ); | ||
284 | // Give host time to read it | ||
285 | wait_ms(100); | ||
286 | bootloader_jump(); | ||
287 | break; | ||
288 | } | ||
289 | default: | ||
290 | { | ||
291 | // Unhandled message. | ||
292 | *command_id = id_unhandled; | ||
293 | break; | ||
294 | } | ||
295 | } | ||
296 | 143 | ||
297 | // Return same buffer with values changed | 144 | bool via_eeprom_is_valid(void) |
298 | raw_hid_send( data, length ); | 145 | { |
146 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
147 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
148 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
149 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
150 | |||
151 | return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 && | ||
152 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 && | ||
153 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 ); | ||
154 | } | ||
299 | 155 | ||
156 | // Sets VIA/keyboard level usage of EEPROM to valid/invalid | ||
157 | // Keyboard level code (eg. via_init_kb()) should not call this | ||
158 | void via_eeprom_set_valid(bool valid) | ||
159 | { | ||
160 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
161 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
162 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
163 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
164 | |||
165 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF); | ||
166 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF); | ||
167 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF); | ||
300 | } | 168 | } |
301 | 169 | ||
302 | #endif | 170 | void via_eeprom_reset(void) |
171 | { | ||
172 | // Set the VIA specific EEPROM state as invalid. | ||
173 | via_eeprom_set_valid(false); | ||
174 | // Set the TMK/QMK EEPROM state as invalid. | ||
175 | eeconfig_disable(); | ||
176 | } | ||
177 | |||
178 | #endif // VIA_ENABLE \ No newline at end of file | ||
diff --git a/keyboards/cannonkeys/stm32f072/keyboard.h b/keyboards/cannonkeys/stm32f072/keyboard.h index 94c973d61..81dd1b704 100644 --- a/keyboards/cannonkeys/stm32f072/keyboard.h +++ b/keyboards/cannonkeys/stm32f072/keyboard.h | |||
@@ -19,5 +19,5 @@ void backlight_set(uint8_t level); | |||
19 | bool is_breathing(void); | 19 | bool is_breathing(void); |
20 | void breathing_enable(void); | 20 | void breathing_enable(void); |
21 | void breathing_disable(void); | 21 | void breathing_disable(void); |
22 | void load_custom_config(void); | 22 | void backlight_config_load(void); |
23 | void save_backlight_config_to_eeprom(void); | 23 | void backlight_config_save(void); |
diff --git a/keyboards/cannonkeys/tmov2/config.h b/keyboards/cannonkeys/tmov2/config.h index 0c586de9e..d5f1d0788 100644 --- a/keyboards/cannonkeys/tmov2/config.h +++ b/keyboards/cannonkeys/tmov2/config.h | |||
@@ -58,25 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
58 | #define PIN_WS2812 15 | 58 | #define PIN_WS2812 15 |
59 | #define WS2812_SPI SPID2 | 59 | #define WS2812_SPI SPID2 |
60 | 60 | ||
61 | // EEPROM usage | 61 | // Backlight config starts after VIA's EEPROM usage, |
62 | // TODO: refactor with new user EEPROM code (coming soon) | 62 | // dynamic keymaps start after this. |
63 | #define EEPROM_MAGIC 0x451F | 63 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 |
64 | #define EEPROM_MAGIC_ADDR 40 | ||
65 | // Bump this every time we change what we store | ||
66 | // This will automatically reset the EEPROM with defaults | ||
67 | // and avoid loading invalid data from the EEPROM | ||
68 | #define EEPROM_VERSION 0x02 | ||
69 | #define EEPROM_VERSION_ADDR 42 | ||
70 | |||
71 | |||
72 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
73 | // Dynamic macro starts after dynamic keymaps (43+(4*4*15*2)) = (43+480) = 523 | ||
74 | // start + layer * rows * col * 2c | ||
75 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 43 | ||
76 | #define EEPROM_CUSTOM_BACKLIGHT 523 | ||
77 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 524 | ||
78 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 | ||
79 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
80 | 64 | ||
81 | /* | 65 | /* |
82 | * Feature disable options | 66 | * Feature disable options |
diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 87eebbe19..29d5e3c2a 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h | |||
@@ -50,24 +50,6 @@ | |||
50 | #define DRIVER_2_LED_TOTAL 36 | 50 | #define DRIVER_2_LED_TOTAL 36 |
51 | #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | 51 | #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
52 | 52 | ||
53 | #if defined(RAW_ENABLE) | 53 | #if defined(VIA_ENABLE) |
54 | //VIA | 54 | # define DYNAMIC_KEYMAP_LAYER_COUNT 2 |
55 | #define DYNAMIC_KEYMAP_LAYER_COUNT 2 | ||
56 | // EEPROM usage | ||
57 | |||
58 | // TODO: refactor with new user EEPROM code (coming soon) | ||
59 | #define EEPROM_MAGIC 0x451F | ||
60 | #define EEPROM_MAGIC_ADDR 34 | ||
61 | // Bump this every time we change what we store | ||
62 | // This will automatically reset the EEPROM with defaults | ||
63 | // and avoid loading invalid data from the EEPROM | ||
64 | #define EEPROM_VERSION 0x08 | ||
65 | #define EEPROM_VERSION_ADDR 36 | ||
66 | |||
67 | // Dynamic keymap starts after EEPROM version | ||
68 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
69 | // Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) | ||
70 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 | ||
71 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 391 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
72 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
73 | #endif | 55 | #endif |
diff --git a/keyboards/dp60/keymaps/via/rules.mk b/keyboards/dp60/keymaps/via/rules.mk index 6d2a73864..036bd6d1c 100644 --- a/keyboards/dp60/keymaps/via/rules.mk +++ b/keyboards/dp60/keymaps/via/rules.mk | |||
@@ -1,39 +1 @@ | |||
1 | # MCU name | VIA_ENABLE = yes \ No newline at end of file | |
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | # Teensy halfkay | ||
6 | # Pro Micro caterina | ||
7 | # Atmel DFU atmel-dfu | ||
8 | # LUFA DFU lufa-dfu | ||
9 | # QMK DFU qmk-dfu | ||
10 | # ATmega32A bootloadHID | ||
11 | # ATmega328P USBasp | ||
12 | BOOTLOADER = atmel-dfu | ||
13 | |||
14 | # Build Options | ||
15 | # change yes to no to disable | ||
16 | # | ||
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
18 | MOUSEKEY_ENABLE = no # Mouse keys | ||
19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
20 | CONSOLE_ENABLE = no # Console for debug | ||
21 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
25 | NKRO_ENABLE = no # USB Nkey Rollover | ||
26 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
27 | MIDI_ENABLE = no # MIDI support | ||
28 | UNICODE_ENABLE = no # Unicode | ||
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
30 | AUDIO_ENABLE = no # Audio output on port C6 | ||
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
32 | RGBLIGHT_ENABLE = yes # Use RGB bottom light | ||
33 | RGB_MATRIX_ENABLE = yes # Use RGB matrix | ||
34 | |||
35 | RAW_ENABLE = yes | ||
36 | DYNAMIC_KEYMAP_ENABLE = yes | ||
37 | |||
38 | CUSTOM_MATRIX = yes | ||
39 | SRC += matrix.c keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index ef6e204ec..8e5692fa8 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h | |||
@@ -49,23 +49,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | #define LOCKING_SUPPORT_ENABLE | 49 | #define LOCKING_SUPPORT_ENABLE |
50 | /* Locking resynchronize hack */ | 50 | /* Locking resynchronize hack */ |
51 | #define LOCKING_RESYNC_ENABLE | 51 | #define LOCKING_RESYNC_ENABLE |
52 | |||
53 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
54 | |||
55 | // EEPROM usage | ||
56 | |||
57 | // TODO: refactor with new user EEPROM code (coming soon) | ||
58 | #define EEPROM_MAGIC 0x451F | ||
59 | #define EEPROM_MAGIC_ADDR 34 | ||
60 | // Bump this every time we change what we store | ||
61 | // This will automatically reset the EEPROM with defaults | ||
62 | // and avoid loading invalid data from the EEPROM | ||
63 | #define EEPROM_VERSION 0x08 | ||
64 | #define EEPROM_VERSION_ADDR 36 | ||
65 | |||
66 | // Dynamic keymap starts after EEPROM version | ||
67 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
68 | // Dynamic macro starts after dynamic keymaps (37+(4*10*9*2)) = (37+720) | ||
69 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757 | ||
70 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
71 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file | ||
diff --git a/keyboards/handwired/prime_exl/keymaps/via/rules.mk b/keyboards/handwired/prime_exl/keymaps/via/rules.mk index e726a8a0e..1e5b99807 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/rules.mk +++ b/keyboards/handwired/prime_exl/keymaps/via/rules.mk | |||
@@ -1,86 +1 @@ | |||
1 | # MCU name | VIA_ENABLE = yes | |
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Processor frequency. | ||
5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
8 | # automatically to create a 32-bit value in your source code. | ||
9 | # | ||
10 | # This will be an integer division of F_USB below, as it is sourced by | ||
11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
12 | # does not *change* the processor frequency - it should merely be updated to | ||
13 | # reflect the processor speed set externally so that the code can use accurate | ||
14 | # software delays. | ||
15 | F_CPU = 16000000 | ||
16 | |||
17 | |||
18 | # | ||
19 | # LUFA specific | ||
20 | # | ||
21 | # Target architecture (see library "Board Types" documentation). | ||
22 | ARCH = AVR8 | ||
23 | |||
24 | # Input clock frequency. | ||
25 | # This will define a symbol, F_USB, in all source code files equal to the | ||
26 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
27 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
28 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
29 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
30 | # at the end, this will be done automatically to create a 32-bit value in your | ||
31 | # source code. | ||
32 | # | ||
33 | # If no clock division is performed on the input clock inside the AVR (via the | ||
34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
35 | F_USB = $(F_CPU) | ||
36 | |||
37 | # Interrupt driven control endpoint task(+60) | ||
38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
39 | |||
40 | |||
41 | # Bootloader selection | ||
42 | # Teensy halfkay | ||
43 | # Pro Micro caterina | ||
44 | # Atmel DFU atmel-dfu | ||
45 | # LUFA DFU lufa-dfu | ||
46 | # QMK DFU qmk-dfu | ||
47 | # atmega32a bootloadHID | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # If you don't know the bootloader type, then you can specify the | ||
52 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
53 | # Teensy halfKay 512 | ||
54 | # Teensy++ halfKay 1024 | ||
55 | # Atmel DFU loader 4096 | ||
56 | # LUFA bootloader 4096 | ||
57 | # USBaspLoader 2048 | ||
58 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
59 | |||
60 | |||
61 | # Build Options | ||
62 | # change yes to no to disable | ||
63 | # | ||
64 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
65 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
66 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
67 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
68 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
71 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
72 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
73 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
74 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
75 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
76 | UNICODE_ENABLE = no # Unicode | ||
77 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
78 | AUDIO_ENABLE = no # Audio output on port C6 | ||
79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
81 | |||
82 | # This is the VIA magic | ||
83 | RAW_ENABLE = yes | ||
84 | DYNAMIC_KEYMAP_ENABLE = yes | ||
85 | SRC += keyboards/wilba_tech/wt_main.c | ||
86 | |||
diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 02df0074c..91fdf6080 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h | |||
@@ -134,21 +134,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
134 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 134 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
135 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 135 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
136 | 136 | ||
137 | // TODO: refactor with new user EEPROM code (coming soon) | 137 | // Backlight config starts after VIA's EEPROM usage, |
138 | #define EEPROM_MAGIC 0x451F | 138 | // dynamic keymaps start after this. |
139 | #define EEPROM_MAGIC_ADDR 34 | 139 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 |
140 | // Bump this every time we change what we store | 140 | |
141 | // This will automatically reset the EEPROM with defaults | ||
142 | // and avoid loading invalid data from the EEPROM | ||
143 | #define EEPROM_VERSION 0x08 | ||
144 | #define EEPROM_VERSION_ADDR 36 | ||
145 | |||
146 | // Backlight config starts after EEPROM version | ||
147 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
148 | // Dynamic keymap starts after backlight config (37+32) | ||
149 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 69 | ||
150 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
151 | // Dynamic macro starts after dynamic keymaps (69+(4*5*14*2)) = (69+560) | ||
152 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 629 | ||
153 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 | ||
154 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk index b8311f5e7..1e5b99807 100644 --- a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/hs60/v2/keymaps/default_via/rules.mk b/keyboards/hs60/v2/keymaps/default_via/rules.mk index b8311f5e7..1e5b99807 100644 --- a/keyboards/hs60/v2/keymaps/default_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/default_via/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk index b8311f5e7..1e5b99807 100644 --- a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk +++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk index b8311f5e7..1e5b99807 100644 --- a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk +++ b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk index b8311f5e7..1e5b99807 100644 --- a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk +++ b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk index 69592d06c..1e5b99807 100644 --- a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk index 1dc96d04b..1e5b99807 100644 --- a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk index 6c3234258..37deb63be 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/rules.mk | |||
@@ -21,8 +21,6 @@ AUDIO_ENABLE = no # Audio output on port C6 | |||
21 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | 21 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in |
22 | #SERIAL_LINK_ENABLE = yes | 22 | #SERIAL_LINK_ENABLE = yes |
23 | 23 | ||
24 | RAW_ENABLE = no | ||
25 | DYNAMIC_KEYMAP_ENABLE = no | ||
26 | CIE1931_CURVE = yes | 24 | CIE1931_CURVE = yes |
27 | 25 | ||
28 | LAYOUTS = 60_ansi 60_iso | 26 | LAYOUTS = 60_ansi 60_iso |
diff --git a/keyboards/hs60/v2/v2.h b/keyboards/hs60/v2/v2.h index da32c3026..e77076486 100644 --- a/keyboards/hs60/v2/v2.h +++ b/keyboards/hs60/v2/v2.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #include "quantum.h" | 20 | #include "quantum.h" |
21 | #include "../../wilba_tech/wt_rgb_backlight_keycodes.h" | 21 | #include "../../wilba_tech/wt_rgb_backlight_keycodes.h" |
22 | #include "../../wilba_tech/via_keycodes.h" | 22 | #include "via.h" |
23 | 23 | ||
24 | // This a shortcut to help you visually see your layout. | 24 | // This a shortcut to help you visually see your layout. |
25 | 25 | ||
diff --git a/keyboards/idb_60/config.h b/keyboards/idb_60/config.h index 0120e470e..f5538c291 100644 --- a/keyboards/idb_60/config.h +++ b/keyboards/idb_60/config.h | |||
@@ -148,23 +148,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
148 | //#define NO_ACTION_ONESHOT | 148 | //#define NO_ACTION_ONESHOT |
149 | //#define NO_ACTION_MACRO | 149 | //#define NO_ACTION_MACRO |
150 | //#define NO_ACTION_FUNCTION | 150 | //#define NO_ACTION_FUNCTION |
151 | |||
152 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
153 | |||
154 | // EEPROM usage | ||
155 | |||
156 | // TODO: refactor with new user EEPROM code (coming soon) | ||
157 | #define EEPROM_MAGIC 0x451F | ||
158 | #define EEPROM_MAGIC_ADDR 34 | ||
159 | // Bump this every time we change what we store | ||
160 | // This will automatically reset the EEPROM with defaults | ||
161 | // and avoid loading invalid data from the EEPROM | ||
162 | #define EEPROM_VERSION 0x08 | ||
163 | #define EEPROM_VERSION_ADDR 36 | ||
164 | |||
165 | // Dynamic keymap starts after EEPROM version | ||
166 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
167 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
168 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** | ||
169 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** | ||
170 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/illuminati/is0/keymaps/via/keymap.c b/keyboards/illuminati/is0/keymaps/via/keymap.c new file mode 100644 index 000000000..6b8df505e --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/via/keymap.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* Copyright 2019 Ryota Goto | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT( | ||
20 | KC_ENT | ||
21 | ), | ||
22 | [1] = LAYOUT( | ||
23 | KC_TRNS | ||
24 | ), | ||
25 | [2] = LAYOUT( | ||
26 | KC_TRNS | ||
27 | ), | ||
28 | [3] = LAYOUT( | ||
29 | KC_TRNS | ||
30 | ), | ||
31 | }; | ||
diff --git a/keyboards/illuminati/is0/keymaps/via/readme.md b/keyboards/illuminati/is0/keymaps/via/readme.md new file mode 100644 index 000000000..1c12e4530 --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/via/readme.md | |||
@@ -0,0 +1 @@ | |||
# The VIA keymap for is0 | |||
diff --git a/keyboards/illuminati/is0/keymaps/via/rules.mk b/keyboards/illuminati/is0/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/illuminati/is0/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/keebio/iris/iris.h b/keyboards/keebio/iris/iris.h index 5e6bc5b58..878d57897 100644 --- a/keyboards/keebio/iris/iris.h +++ b/keyboards/keebio/iris/iris.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #include "quantum.h" | 15 | #include "quantum.h" |
16 | #include "../../wilba_tech/via_keycodes.h" | 16 | #include "via.h" |
17 | 17 | ||
18 | // Used to create a keymap using only KC_ prefixed keys | 18 | // Used to create a keymap using only KC_ prefixed keys |
19 | #define LAYOUT_kc( \ | 19 | #define LAYOUT_kc( \ |
diff --git a/keyboards/keebio/iris/keymaps/osiris/rules.mk b/keyboards/keebio/iris/keymaps/osiris/rules.mk index f2788b5f7..45c570a3b 100644 --- a/keyboards/keebio/iris/keymaps/osiris/rules.mk +++ b/keyboards/keebio/iris/keymaps/osiris/rules.mk | |||
@@ -1,8 +1,3 @@ | |||
1 | RGBLIGHT_ENABLE = yes | 1 | RGBLIGHT_ENABLE = yes |
2 | BACKLIGHT_ENABLE = yes | 2 | BACKLIGHT_ENABLE = yes |
3 | MOUSEKEY_ENABLE = yes | 3 | MOUSEKEY_ENABLE = yes |
4 | |||
5 | # VIA Support - Comment these 3 lines out to disable | ||
6 | # RAW_ENABLE = yes | ||
7 | # DYNAMIC_KEYMAP_ENABLE = yes | ||
8 | # SRC += keyboards/wilba_tech/wt_main.c \ No newline at end of file | ||
diff --git a/keyboards/keebio/iris/keymaps/via/config.h b/keyboards/keebio/iris/keymaps/via/config.h deleted file mode 100644 index f2498e592..000000000 --- a/keyboards/keebio/iris/keymaps/via/config.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | Copyright 2017 Danny Nguyen <danny@keeb.io> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #define RGBLIGHT_ANIMATIONS | ||
diff --git a/keyboards/keebio/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk index ca2680325..1e5b99807 100644 --- a/keyboards/keebio/iris/keymaps/via/rules.mk +++ b/keyboards/keebio/iris/keymaps/via/rules.mk | |||
@@ -1,7 +1 @@ | |||
1 | RGBLIGHT_ENABLE = yes | VIA_ENABLE = yes | |
2 | BACKLIGHT_ENABLE = yes | ||
3 | |||
4 | # VIA Support - Comment these 3 lines out to disable | ||
5 | RAW_ENABLE = yes | ||
6 | DYNAMIC_KEYMAP_ENABLE = yes | ||
7 | SRC += keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/keebio/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h index 7b88fe5de..a6b14138e 100644 --- a/keyboards/keebio/iris/rev1/config.h +++ b/keyboards/keebio/iris/rev1/config.h | |||
@@ -60,23 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
60 | /* ws2812 RGB LED */ | 60 | /* ws2812 RGB LED */ |
61 | #define RGB_DI_PIN D3 | 61 | #define RGB_DI_PIN D3 |
62 | #define RGBLED_NUM 12 // Number of LEDs | 62 | #define RGBLED_NUM 12 // Number of LEDs |
63 | |||
64 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
65 | |||
66 | // EEPROM usage | ||
67 | |||
68 | // TODO: refactor with new user EEPROM code (coming soon) | ||
69 | #define EEPROM_MAGIC 0x451F | ||
70 | #define EEPROM_MAGIC_ADDR 34 | ||
71 | // Bump this every time we change what we store | ||
72 | // This will automatically reset the EEPROM with defaults | ||
73 | // and avoid loading invalid data from the EEPROM | ||
74 | #define EEPROM_VERSION 0x08 | ||
75 | #define EEPROM_VERSION_ADDR 36 | ||
76 | |||
77 | // Dynamic keymap starts after EEPROM version | ||
78 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
79 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
80 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 | ||
81 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
82 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/keebio/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h index ec78ef67f..5f93a61df 100644 --- a/keyboards/keebio/iris/rev1_led/config.h +++ b/keyboards/keebio/iris/rev1_led/config.h | |||
@@ -60,23 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
60 | /* ws2812 RGB LED */ | 60 | /* ws2812 RGB LED */ |
61 | #define RGB_DI_PIN D3 | 61 | #define RGB_DI_PIN D3 |
62 | #define RGBLED_NUM 12 // Number of LEDs | 62 | #define RGBLED_NUM 12 // Number of LEDs |
63 | |||
64 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
65 | |||
66 | // EEPROM usage | ||
67 | |||
68 | // TODO: refactor with new user EEPROM code (coming soon) | ||
69 | #define EEPROM_MAGIC 0x451F | ||
70 | #define EEPROM_MAGIC_ADDR 34 | ||
71 | // Bump this every time we change what we store | ||
72 | // This will automatically reset the EEPROM with defaults | ||
73 | // and avoid loading invalid data from the EEPROM | ||
74 | #define EEPROM_VERSION 0x08 | ||
75 | #define EEPROM_VERSION_ADDR 36 | ||
76 | |||
77 | // Dynamic keymap starts after EEPROM version | ||
78 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
79 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
80 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 | ||
81 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
82 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index 500b0fcbd..ab55bf77b 100644 --- a/keyboards/keebio/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h | |||
@@ -60,23 +60,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
60 | /* ws2812 RGB LED */ | 60 | /* ws2812 RGB LED */ |
61 | #define RGB_DI_PIN D3 | 61 | #define RGB_DI_PIN D3 |
62 | #define RGBLED_NUM 12 // Number of LEDs | 62 | #define RGBLED_NUM 12 // Number of LEDs |
63 | |||
64 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
65 | |||
66 | // EEPROM usage | ||
67 | |||
68 | // TODO: refactor with new user EEPROM code (coming soon) | ||
69 | #define EEPROM_MAGIC 0x451F | ||
70 | #define EEPROM_MAGIC_ADDR 34 | ||
71 | // Bump this every time we change what we store | ||
72 | // This will automatically reset the EEPROM with defaults | ||
73 | // and avoid loading invalid data from the EEPROM | ||
74 | #define EEPROM_VERSION 0x08 | ||
75 | #define EEPROM_VERSION_ADDR 36 | ||
76 | |||
77 | // Dynamic keymap starts after EEPROM version | ||
78 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
79 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
80 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 | ||
81 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
82 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/keebio/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index eeb999ad4..8c6f4ad08 100644 --- a/keyboards/keebio/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h | |||
@@ -69,23 +69,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
69 | #define RGB_DI_PIN F7 | 69 | #define RGB_DI_PIN F7 |
70 | #define RGBLED_NUM 12 // Number of LEDs | 70 | #define RGBLED_NUM 12 // Number of LEDs |
71 | #define RGBLED_SPLIT { 6, 6 } | 71 | #define RGBLED_SPLIT { 6, 6 } |
72 | |||
73 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
74 | |||
75 | // EEPROM usage | ||
76 | |||
77 | // TODO: refactor with new user EEPROM code (coming soon) | ||
78 | #define EEPROM_MAGIC 0x451F | ||
79 | #define EEPROM_MAGIC_ADDR 34 | ||
80 | // Bump this every time we change what we store | ||
81 | // This will automatically reset the EEPROM with defaults | ||
82 | // and avoid loading invalid data from the EEPROM | ||
83 | #define EEPROM_VERSION 0x08 | ||
84 | #define EEPROM_VERSION_ADDR 36 | ||
85 | |||
86 | // Dynamic keymap starts after EEPROM version | ||
87 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
88 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
89 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 | ||
90 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
91 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/keebio/iris/rev4/config.h b/keyboards/keebio/iris/rev4/config.h index b4bcd6139..87fdafcd5 100644 --- a/keyboards/keebio/iris/rev4/config.h +++ b/keyboards/keebio/iris/rev4/config.h | |||
@@ -73,23 +73,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
73 | #define RGB_DI_PIN D6 | 73 | #define RGB_DI_PIN D6 |
74 | #define RGBLED_NUM 12 // Number of LEDs | 74 | #define RGBLED_NUM 12 // Number of LEDs |
75 | #define RGBLED_SPLIT { 6, 6 } | 75 | #define RGBLED_SPLIT { 6, 6 } |
76 | |||
77 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
78 | |||
79 | // EEPROM usage | ||
80 | |||
81 | // TODO: refactor with new user EEPROM code (coming soon) | ||
82 | #define EEPROM_MAGIC 0x451F | ||
83 | #define EEPROM_MAGIC_ADDR 34 | ||
84 | // Bump this every time we change what we store | ||
85 | // This will automatically reset the EEPROM with defaults | ||
86 | // and avoid loading invalid data from the EEPROM | ||
87 | #define EEPROM_VERSION 0x08 | ||
88 | #define EEPROM_VERSION_ADDR 36 | ||
89 | |||
90 | // Dynamic keymap starts after EEPROM version | ||
91 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
92 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
93 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517 | ||
94 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
95 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/kingly_keys/romac/config.h b/keyboards/kingly_keys/romac/config.h index da236c500..59b084e8c 100644 --- a/keyboards/kingly_keys/romac/config.h +++ b/keyboards/kingly_keys/romac/config.h | |||
@@ -3,8 +3,8 @@ | |||
3 | #include "config_common.h" | 3 | #include "config_common.h" |
4 | 4 | ||
5 | /* USB Device descriptor parameter */ | 5 | /* USB Device descriptor parameter */ |
6 | #define VENDOR_ID 0xFEED | 6 | #define VENDOR_ID 0x4b4b // "KK" |
7 | #define PRODUCT_ID 0x6060 | 7 | #define PRODUCT_ID 0x0001 |
8 | #define DEVICE_VER 0x0001 | 8 | #define DEVICE_VER 0x0001 |
9 | #define MANUFACTURER TheRoyalSweatshirt | 9 | #define MANUFACTURER TheRoyalSweatshirt |
10 | #define PRODUCT romac | 10 | #define PRODUCT romac |
diff --git a/keyboards/kingly_keys/romac/keymaps/via/keymap.c b/keyboards/kingly_keys/romac/keymaps/via/keymap.c new file mode 100644 index 000000000..833336b53 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/via/keymap.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* Copyright 2018 Jack Humbert | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
20 | [0] = LAYOUT( | ||
21 | KC_KP_7, KC_KP_8, KC_KP_9, \ | ||
22 | KC_KP_4, KC_KP_5, KC_KP_6, \ | ||
23 | KC_KP_1, KC_KP_2, KC_KP_3, \ | ||
24 | MO(1), KC_KP_0, KC_KP_DOT \ | ||
25 | ), | ||
26 | [1] = LAYOUT( | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
29 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS \ | ||
31 | ), | ||
32 | [2] = LAYOUT( | ||
33 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS \ | ||
37 | ), | ||
38 | [3] = LAYOUT( | ||
39 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
40 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
41 | KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
42 | KC_TRNS, KC_TRNS, KC_TRNS \ | ||
43 | ) | ||
44 | }; | ||
diff --git a/keyboards/kingly_keys/romac/keymaps/via/rules.mk b/keyboards/kingly_keys/romac/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/maartenwut/plain60/config.h b/keyboards/maartenwut/plain60/config.h index d17481617..af4fb6231 100644 --- a/keyboards/maartenwut/plain60/config.h +++ b/keyboards/maartenwut/plain60/config.h | |||
@@ -47,24 +47,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
47 | 47 | ||
48 | #define QMK_ESC_OUTPUT D2 // usually COL | 48 | #define QMK_ESC_OUTPUT D2 // usually COL |
49 | #define QMK_ESC_INPUT B4 // usually ROW | 49 | #define QMK_ESC_INPUT B4 // usually ROW |
50 | |||
51 | //VIA | ||
52 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
53 | |||
54 | // EEPROM usage | ||
55 | |||
56 | // TODO: refactor with new user EEPROM code (coming soon) | ||
57 | #define EEPROM_MAGIC 0x451F | ||
58 | #define EEPROM_MAGIC_ADDR 34 | ||
59 | // Bump this every time we change what we store | ||
60 | // This will automatically reset the EEPROM with defaults | ||
61 | // and avoid loading invalid data from the EEPROM | ||
62 | #define EEPROM_VERSION 0x08 | ||
63 | #define EEPROM_VERSION_ADDR 36 | ||
64 | |||
65 | // Dynamic keymap starts after EEPROM version | ||
66 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
67 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
68 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 | ||
69 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
70 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk b/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk index 793bd869a..facc9dc7e 100644 --- a/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk +++ b/keyboards/maartenwut/plain60/keymaps/kwerdenker/rules.mk | |||
@@ -16,8 +16,7 @@ | |||
16 | # Build Options | 16 | # Build Options |
17 | # comment out to disable the options. | 17 | # comment out to disable the options. |
18 | # | 18 | # |
19 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 19 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
20 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 20 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
21 | RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) | 21 | RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) |
22 | RAW_ENABLE = no | 22 | |
23 | DYNAMIC_KEYMAP_ENABLE = no | ||
diff --git a/keyboards/maartenwut/plain60/keymaps/via/rules.mk b/keyboards/maartenwut/plain60/keymaps/via/rules.mk index 2b23b188b..1e5b99807 100644 --- a/keyboards/maartenwut/plain60/keymaps/via/rules.mk +++ b/keyboards/maartenwut/plain60/keymaps/via/rules.mk | |||
@@ -1,5 +1 @@ | |||
1 | # rules.mk overrides to enable VIA | VIA_ENABLE = yes | |
2 | SRC += keyboards/wilba_tech/wt_main.c | ||
3 | |||
4 | RAW_ENABLE = yes | ||
5 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index 51e101cde..423714c54 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h | |||
@@ -134,21 +134,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
134 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 134 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
135 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 135 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
136 | 136 | ||
137 | // TODO: refactor with new user EEPROM code (coming soon) | 137 | // Backlight config starts after VIA's EEPROM usage, |
138 | #define EEPROM_MAGIC 0x451F | 138 | // dynamic keymaps start after this. |
139 | #define EEPROM_MAGIC_ADDR 34 | 139 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 |
140 | // Bump this every time we change what we store | ||
141 | // This will automatically reset the EEPROM with defaults | ||
142 | // and avoid loading invalid data from the EEPROM | ||
143 | #define EEPROM_VERSION 0x08 | ||
144 | #define EEPROM_VERSION_ADDR 36 | ||
145 | |||
146 | // Backlight config starts after EEPROM version | ||
147 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
148 | // Dynamic keymap starts after backlight config (37+32) | ||
149 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 69 | ||
150 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
151 | // Dynamic macro starts after dynamic keymaps (69+(4*5*15*2)) = (69+600) | ||
152 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 669 | ||
153 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 | ||
154 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/nk65/keymaps/default_via/rules.mk b/keyboards/nk65/keymaps/default_via/rules.mk index b8311f5e7..1e5b99807 100755 --- a/keyboards/nk65/keymaps/default_via/rules.mk +++ b/keyboards/nk65/keymaps/default_via/rules.mk | |||
@@ -1,67 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c \ | ||
3 | keyboards/wilba_tech/wt_rgb_backlight.c \ | ||
4 | drivers/issi/is31fl3733.c \ | ||
5 | quantum/color.c \ | ||
6 | drivers/arm/i2c_master.c | ||
7 | |||
8 | ## chip/board settings | ||
9 | # the next two should match the directories in | ||
10 | # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) | ||
11 | MCU_FAMILY = STM32 | ||
12 | MCU_SERIES = STM32F3xx | ||
13 | |||
14 | # Linker script to use | ||
15 | # it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ | ||
16 | # or <this_dir>/ld/ | ||
17 | MCU_LDSCRIPT = STM32F303xC | ||
18 | |||
19 | # Startup code to use | ||
20 | # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ | ||
21 | MCU_STARTUP = stm32f3xx | ||
22 | |||
23 | # Board: it should exist either in <chibios>/os/hal/boards/ | ||
24 | # or <this_dir>/boards | ||
25 | BOARD = GENERIC_STM32_F303XC | ||
26 | |||
27 | # Cortex version | ||
28 | MCU = cortex-m4 | ||
29 | |||
30 | # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 | ||
31 | ARMV = 7 | ||
32 | |||
33 | USE_FPU = yes | ||
34 | |||
35 | # Vector table for application | ||
36 | # 0x00000000-0x00001000 area is occupied by bootlaoder.*/ | ||
37 | # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB | ||
38 | # OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 | ||
39 | OPT_DEFS = | ||
40 | |||
41 | # Do not put the microcontroller into power saving mode | ||
42 | # when we get USB suspend event. We want it to keep updating | ||
43 | # backlight effects. | ||
44 | OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | ||
45 | |||
46 | # Options to pass to dfu-util when flashing | ||
47 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | ||
48 | DFU_SUFFIX_ARGS = -p DF11 -v 0483 | ||
49 | |||
50 | # Build Options | ||
51 | # comment out to disable the options. | ||
52 | # | ||
53 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
54 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
55 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
56 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
57 | CONSOLE_ENABLE = no # Console for debug | ||
58 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
62 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | ||
63 | #SERIAL_LINK_ENABLE = yes | ||
64 | |||
65 | RAW_ENABLE = yes | ||
66 | DYNAMIC_KEYMAP_ENABLE = yes | ||
67 | CIE1931_CURVE = yes | ||
diff --git a/keyboards/nk65/nk65.h b/keyboards/nk65/nk65.h index 49725a7e6..35aca2a64 100755 --- a/keyboards/nk65/nk65.h +++ b/keyboards/nk65/nk65.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #include "quantum.h" | 20 | #include "quantum.h" |
21 | #include "../wilba_tech/wt_rgb_backlight_keycodes.h" | 21 | #include "../wilba_tech/wt_rgb_backlight_keycodes.h" |
22 | #include "../wilba_tech/via_keycodes.h" | 22 | #include "via.h" |
23 | 23 | ||
24 | // This a shortcut to help you visually see your layout. | 24 | // This a shortcut to help you visually see your layout. |
25 | 25 | ||
diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk index 0840daf37..01765538a 100755 --- a/keyboards/nk65/rules.mk +++ b/keyboards/nk65/rules.mk | |||
@@ -21,8 +21,6 @@ AUDIO_ENABLE = no # Audio output on port C6 | |||
21 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in | 21 | NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in |
22 | #SERIAL_LINK_ENABLE = yes | 22 | #SERIAL_LINK_ENABLE = yes |
23 | 23 | ||
24 | RAW_ENABLE = no | ||
25 | DYNAMIC_KEYMAP_ENABLE = no | ||
26 | CIE1931_CURVE = yes | 24 | CIE1931_CURVE = yes |
27 | 25 | ||
28 | LAYOUTS = 65_ansi | 26 | LAYOUTS = 65_ansi |
diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h index 46124973d..bf5061b1a 100644 --- a/keyboards/primekb/prime_e/config.h +++ b/keyboards/primekb/prime_e/config.h | |||
@@ -50,23 +50,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
50 | #define LOCKING_SUPPORT_ENABLE | 50 | #define LOCKING_SUPPORT_ENABLE |
51 | /* Locking resynchronize hack */ | 51 | /* Locking resynchronize hack */ |
52 | #define LOCKING_RESYNC_ENABLE | 52 | #define LOCKING_RESYNC_ENABLE |
53 | |||
54 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
55 | |||
56 | // EEPROM usage | ||
57 | |||
58 | // TODO: refactor with new user EEPROM code (coming soon) | ||
59 | #define EEPROM_MAGIC 0x451F | ||
60 | #define EEPROM_MAGIC_ADDR 34 | ||
61 | // Bump this every time we change what we store | ||
62 | // This will automatically reset the EEPROM with defaults | ||
63 | // and avoid loading invalid data from the EEPROM | ||
64 | #define EEPROM_VERSION 0x08 | ||
65 | #define EEPROM_VERSION_ADDR 36 | ||
66 | |||
67 | // Dynamic keymap starts after EEPROM version | ||
68 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
69 | // Dynamic macro starts after dynamic keymaps (37+(4*13*4*2)) = (37+416) | ||
70 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 453 | ||
71 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 571 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
72 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/primekb/prime_e/keymaps/via/rules.mk b/keyboards/primekb/prime_e/keymaps/via/rules.mk index c981a2f26..1e5b99807 100644 --- a/keyboards/primekb/prime_e/keymaps/via/rules.mk +++ b/keyboards/primekb/prime_e/keymaps/via/rules.mk | |||
@@ -1,85 +1 @@ | |||
1 | # MCU name | VIA_ENABLE = yes | |
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Processor frequency. | ||
5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
8 | # automatically to create a 32-bit value in your source code. | ||
9 | # | ||
10 | # This will be an integer division of F_USB below, as it is sourced by | ||
11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
12 | # does not *change* the processor frequency - it should merely be updated to | ||
13 | # reflect the processor speed set externally so that the code can use accurate | ||
14 | # software delays. | ||
15 | F_CPU = 16000000 | ||
16 | |||
17 | |||
18 | # | ||
19 | # LUFA specific | ||
20 | # | ||
21 | # Target architecture (see library "Board Types" documentation). | ||
22 | ARCH = AVR8 | ||
23 | |||
24 | # Input clock frequency. | ||
25 | # This will define a symbol, F_USB, in all source code files equal to the | ||
26 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
27 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
28 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
29 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
30 | # at the end, this will be done automatically to create a 32-bit value in your | ||
31 | # source code. | ||
32 | # | ||
33 | # If no clock division is performed on the input clock inside the AVR (via the | ||
34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
35 | F_USB = $(F_CPU) | ||
36 | |||
37 | # Interrupt driven control endpoint task(+60) | ||
38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
39 | |||
40 | |||
41 | # Bootloader selection | ||
42 | # Teensy halfkay | ||
43 | # Pro Micro caterina | ||
44 | # Atmel DFU atmel-dfu | ||
45 | # LUFA DFU lufa-dfu | ||
46 | # QMK DFU qmk-dfu | ||
47 | # atmega32a bootloadHID | ||
48 | BOOTLOADER = atmel-dfu | ||
49 | |||
50 | |||
51 | # If you don't know the bootloader type, then you can specify the | ||
52 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
53 | # Teensy halfKay 512 | ||
54 | # Teensy++ halfKay 1024 | ||
55 | # Atmel DFU loader 4096 | ||
56 | # LUFA bootloader 4096 | ||
57 | # USBaspLoader 2048 | ||
58 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
59 | |||
60 | |||
61 | # Build Options | ||
62 | # change yes to no to disable | ||
63 | # | ||
64 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
65 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
66 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
67 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
68 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
70 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
71 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
72 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
73 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
74 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
75 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
76 | UNICODE_ENABLE = no # Unicode | ||
77 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
78 | AUDIO_ENABLE = no # Audio output on port C6 | ||
79 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
80 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
81 | |||
82 | # This is the VIA magic | ||
83 | RAW_ENABLE = yes | ||
84 | DYNAMIC_KEYMAP_ENABLE = yes | ||
85 | SRC += keyboards/wilba_tech/wt_main.c \ No newline at end of file | ||
diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h index cc0386ae6..4a068a889 100644 --- a/keyboards/projectkb/alice/config.h +++ b/keyboards/projectkb/alice/config.h | |||
@@ -58,29 +58,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
58 | #define PIN_WS2812 15 | 58 | #define PIN_WS2812 15 |
59 | #define WS2812_SPI SPID2 | 59 | #define WS2812_SPI SPID2 |
60 | 60 | ||
61 | 61 | // Backlight config starts after VIA's EEPROM usage, | |
62 | // EEPROM usage | 62 | // dynamic keymaps start after this. |
63 | // TODO: refactor with new user EEPROM code (coming soon) | 63 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 1 |
64 | #define EEPROM_MAGIC 0x451F | ||
65 | #define EEPROM_MAGIC_ADDR 32 | ||
66 | // Bump this every time we change what we store | ||
67 | // This will automatically reset the EEPROM with defaults | ||
68 | // and avoid loading invalid data from the EEPROM | ||
69 | #define EEPROM_VERSION 0x01 | ||
70 | #define EEPROM_VERSION_ADDR 34 | ||
71 | |||
72 | #define EEPROM_CUSTOM_BACKLIGHT 804 | ||
73 | |||
74 | #undef EEPROM_MAGIC_ADDR | ||
75 | #define EEPROM_MAGIC_ADDR 34 | ||
76 | #undef EEPROM_VERSION_ADDR | ||
77 | #define EEPROM_VERSION_ADDR 36 | ||
78 | #undef RGB_BACKLIGHT_CONFIG_EEPROM_ADDR | ||
79 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
80 | #undef DYNAMIC_KEYMAP_EEPROM_ADDR | ||
81 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 68 | ||
82 | #undef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | ||
83 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 66 | ||
84 | 64 | ||
85 | /* | 65 | /* |
86 | * Feature disable options | 66 | * Feature disable options |
diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk index 606ffda18..928878335 100644 --- a/keyboards/projectkb/alice/rules.mk +++ b/keyboards/projectkb/alice/rules.mk | |||
@@ -51,7 +51,4 @@ CUSTOM_MATRIX = no # Custom matrix file | |||
51 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason | 51 | # BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason |
52 | RGBLIGHT_ENABLE = yes | 52 | RGBLIGHT_ENABLE = yes |
53 | 53 | ||
54 | # RAW_ENABLE = yes | ||
55 | # DYNAMIC_KEYMAP_ENABLE = yes | ||
56 | |||
57 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave | 54 | DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave |
diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h index 1b574a099..671013440 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/config.h | |||
@@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
20 | #include "config_common.h" | 20 | #include "config_common.h" |
21 | 21 | ||
22 | /* USB Device descriptor parameter */ | 22 | /* USB Device descriptor parameter */ |
23 | #define VENDOR_ID 0xFEED | 23 | #define VENDOR_ID 0x5343 // "SC" |
24 | #define PRODUCT_ID 0x0000 | 24 | #define PRODUCT_ID 0x0001 |
25 | #define DEVICE_VER 0x0001 | 25 | #define DEVICE_VER 0x0001 |
26 | #define MANUFACTURER Space City Keyboards | 26 | #define MANUFACTURER Space City Keyboards |
27 | #define PRODUCT OSA | 27 | #define PRODUCT OSA |
diff --git a/keyboards/sck/osa/keymaps/via/keymap.c b/keyboards/sck/osa/keymaps/via/keymap.c new file mode 100644 index 000000000..2c1af0731 --- /dev/null +++ b/keyboards/sck/osa/keymaps/via/keymap.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* Copyright 2019 jrfhoutx | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_all( | ||
20 | KC_DEL, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, | ||
21 | KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | ||
22 | KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
23 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, | ||
24 | KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL | ||
25 | ), | ||
26 | [1] = LAYOUT_all( | ||
27 | KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
29 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
32 | ), | ||
33 | |||
34 | [2] = LAYOUT_all( | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
40 | ), | ||
41 | |||
42 | [3] = LAYOUT_all( | ||
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
47 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
48 | ), | ||
49 | }; | ||
diff --git a/keyboards/sck/osa/keymaps/via/readme.md b/keyboards/sck/osa/keymaps/via/readme.md new file mode 100644 index 000000000..3f8300bb1 --- /dev/null +++ b/keyboards/sck/osa/keymaps/via/readme.md | |||
@@ -0,0 +1 @@ | |||
# The VIA keymap for OSA | |||
diff --git a/keyboards/sck/osa/keymaps/via/rules.mk b/keyboards/sck/osa/keymaps/via/rules.mk new file mode 100644 index 000000000..bee21da52 --- /dev/null +++ b/keyboards/sck/osa/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | MOUSEKEY_ENABLE = no \ No newline at end of file | ||
diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index a4ab9d5e2..339bdd1be 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h | |||
@@ -47,23 +47,3 @@ | |||
47 | #define RGBLIGHT_SAT_STEP 8 | 47 | #define RGBLIGHT_SAT_STEP 8 |
48 | #define RGBLIGHT_VAL_STEP 8 | 48 | #define RGBLIGHT_VAL_STEP 8 |
49 | #endif | 49 | #endif |
50 | |||
51 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
52 | |||
53 | // EEPROM usage | ||
54 | |||
55 | // TODO: refactor with new user EEPROM code (coming soon) | ||
56 | #define EEPROM_MAGIC 0x451F | ||
57 | #define EEPROM_MAGIC_ADDR 34 | ||
58 | // Bump this every time we change what we store | ||
59 | // This will automatically reset the EEPROM with defaults | ||
60 | // and avoid loading invalid data from the EEPROM | ||
61 | #define EEPROM_VERSION 0x08 | ||
62 | #define EEPROM_VERSION_ADDR 36 | ||
63 | |||
64 | // Dynamic keymap starts after EEPROM version | ||
65 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
66 | // Dynamic macro starts after dynamic keymaps (37+(4*5*4*2)) = (37+160) | ||
67 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 197 | ||
68 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 827 | ||
69 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file | ||
diff --git a/keyboards/snagpad/keymaps/via/rules.mk b/keyboards/snagpad/keymaps/via/rules.mk index 032d68c5e..1e5b99807 100644 --- a/keyboards/snagpad/keymaps/via/rules.mk +++ b/keyboards/snagpad/keymaps/via/rules.mk | |||
@@ -1,76 +1 @@ | |||
1 | # MCU name | VIA_ENABLE = yes | |
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Processor frequency. | ||
5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
8 | # automatically to create a 32-bit value in your source code. | ||
9 | # | ||
10 | # This will be an integer division of F_USB below, as it is sourced by | ||
11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
12 | # does not *change* the processor frequency - it should merely be updated to | ||
13 | # reflect the processor speed set externally so that the code can use accurate | ||
14 | # software delays. | ||
15 | F_CPU = 16000000 | ||
16 | |||
17 | # | ||
18 | # LUFA specific | ||
19 | # | ||
20 | # Target architecture (see library "Board Types" documentation). | ||
21 | ARCH = AVR8 | ||
22 | |||
23 | # Input clock frequency. | ||
24 | # This will define a symbol, F_USB, in all source code files equal to the | ||
25 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
26 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
27 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
28 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
29 | # at the end, this will be done automatically to create a 32-bit value in your | ||
30 | # source code. | ||
31 | # | ||
32 | # If no clock division is performed on the input clock inside the AVR (via the | ||
33 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
34 | F_USB = $(F_CPU) | ||
35 | |||
36 | # Interrupt driven control endpoint task(+60) | ||
37 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
38 | |||
39 | # Bootloader selection | ||
40 | # Teensy halfkay | ||
41 | # Pro Micro caterina | ||
42 | # Atmel DFU atmel-dfu | ||
43 | # LUFA DFU lufa-dfu | ||
44 | # QMK DFU qmk-dfu | ||
45 | # atmega32a bootloadHID | ||
46 | BOOTLOADER = caterina | ||
47 | |||
48 | # Boot Section Size in *bytes* | ||
49 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
50 | |||
51 | |||
52 | # Build Options | ||
53 | # change yes to no to disable | ||
54 | # | ||
55 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
56 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
57 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
58 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
59 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
60 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
61 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
62 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
63 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
64 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
65 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
66 | UNICODE_ENABLE = no # Unicode | ||
67 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
68 | AUDIO_ENABLE = no # Audio output on port C6 | ||
69 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
70 | |||
71 | # This is the VIA magic | ||
72 | RAW_ENABLE = yes | ||
73 | DYNAMIC_KEYMAP_ENABLE = yes | ||
74 | SRC += keyboards/wilba_tech/wt_main.c | ||
75 | |||
76 | LAYOUTS = ortho_5x4 numpad_5x4 | ||
diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h index 4a5b65c58..69fc61387 100644 --- a/keyboards/westfoxtrot/aanzee/config.h +++ b/keyboards/westfoxtrot/aanzee/config.h | |||
@@ -117,26 +117,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
117 | * useful if your keyboard/keypad is missing keys and you want magic key support. | 117 | * useful if your keyboard/keypad is missing keys and you want magic key support. |
118 | * | 118 | * |
119 | */ | 119 | */ |
120 | |||
121 | |||
122 | //dynamic keymap and via support | ||
123 | |||
124 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
125 | |||
126 | // EEPROM usage | ||
127 | |||
128 | // TODO: refactor with new user EEPROM code (coming soon) | ||
129 | #define EEPROM_MAGIC 0x451F | ||
130 | #define EEPROM_MAGIC_ADDR 34 | ||
131 | // Bump this every time we change what we store | ||
132 | // This will automatically reset the EEPROM with defaults | ||
133 | // and avoid loading invalid data from the EEPROM | ||
134 | #define EEPROM_VERSION 0x08 | ||
135 | #define EEPROM_VERSION_ADDR 36 | ||
136 | |||
137 | // Dynamic keymap starts after EEPROM version | ||
138 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
139 | // Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480) | ||
140 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** | ||
141 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** | ||
142 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk index bcc5dc530..1e5b99807 100644 --- a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk | |||
@@ -1,69 +1 @@ | |||
1 | # MCU name | VIA_ENABLE = yes | |
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Processor frequency. | ||
5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
8 | # automatically to create a 32-bit value in your source code. | ||
9 | # | ||
10 | # This will be an integer division of F_USB below, as it is sourced by | ||
11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
12 | # does not *change* the processor frequency - it should merely be updated to | ||
13 | # reflect the processor speed set externally so that the code can use accurate | ||
14 | # software delays. | ||
15 | F_CPU = 16000000 | ||
16 | |||
17 | |||
18 | # | ||
19 | # LUFA specific | ||
20 | # | ||
21 | # Target architecture (see library "Board Types" documentation). | ||
22 | ARCH = AVR8 | ||
23 | |||
24 | # Input clock frequency. | ||
25 | # This will define a symbol, F_USB, in all source code files equal to the | ||
26 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
27 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
28 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
29 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
30 | # at the end, this will be done automatically to create a 32-bit value in your | ||
31 | # source code. | ||
32 | # | ||
33 | # If no clock division is performed on the input clock inside the AVR (via the | ||
34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
35 | F_USB = $(F_CPU) | ||
36 | |||
37 | # Interrupt driven control endpoint task(+60) | ||
38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
39 | |||
40 | # Bootloader selection | ||
41 | # Teensy halfkay | ||
42 | # Pro Micro caterina | ||
43 | # Atmel DFU atmel-dfu | ||
44 | # LUFA DFU lufa-dfu | ||
45 | # QMK DFU qmk-dfu | ||
46 | # atmega32a bootloadHID | ||
47 | BOOTLOADER = atmel-dfu | ||
48 | |||
49 | # Build Options | ||
50 | # comment out to disable the options. | ||
51 | # | ||
52 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
53 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
54 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
55 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
56 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
57 | NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
58 | RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) | ||
59 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) | ||
60 | MIDI_ENABLE = no # MIDI controls | ||
61 | AUDIO_ENABLE = no | ||
62 | UNICODE_ENABLE = no # Unicode | ||
63 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
64 | |||
65 | #add files needed for via | ||
66 | |||
67 | RAW_ENABLE = yes | ||
68 | DYNAMIC_KEYMAP_ENABLE = yes | ||
69 | SRC += keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/wilba_tech/rama_works_koyu/config.h b/keyboards/wilba_tech/rama_works_koyu/config.h index f3e21aa15..9cbbd6620 100644 --- a/keyboards/wilba_tech/rama_works_koyu/config.h +++ b/keyboards/wilba_tech/rama_works_koyu/config.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include "config_common.h" | 18 | #include "config_common.h" |
19 | 19 | ||
20 | // USB Device descriptor parameter | 20 | // USB Device descriptor parameter |
21 | #define VENDOR_ID 0x5241 // "RW" | 21 | #define VENDOR_ID 0x5241 // "RA" |
22 | #define PRODUCT_ID 0x4B59 // "KY" | 22 | #define PRODUCT_ID 0x4B59 // "KY" |
23 | #define DEVICE_VER 0x0001 | 23 | #define DEVICE_VER 0x0001 |
24 | #define MANUFACTURER RAMA WORKS | 24 | #define MANUFACTURER RAMA WORKS |
@@ -119,24 +119,6 @@ | |||
119 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 119 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
120 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 120 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
121 | 121 | ||
122 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 122 | // Backlight config starts after VIA's EEPROM usage, |
123 | 123 | // dynamic keymaps start after this. | |
124 | // EEPROM usage | 124 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 \ No newline at end of file |
125 | |||
126 | // TODO: refactor with new user EEPROM code (coming soon) | ||
127 | #define EEPROM_MAGIC 0x451F | ||
128 | #define EEPROM_MAGIC_ADDR 34 | ||
129 | // Bump this every time we change what we store | ||
130 | // This will automatically reset the EEPROM with defaults | ||
131 | // and avoid loading invalid data from the EEPROM | ||
132 | #define EEPROM_VERSION 0x08 | ||
133 | #define EEPROM_VERSION_ADDR 36 | ||
134 | |||
135 | // Backlight config starts after EEPROM version | ||
136 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
137 | // Dynamic keymap starts after backlight config (37+31) | ||
138 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 68 | ||
139 | // Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) | ||
140 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 | ||
141 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 | ||
142 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c new file mode 100644 index 000000000..f6bc94fbd --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c | |||
@@ -0,0 +1,36 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | |||
5 | // Default layer | ||
6 | [0] = LAYOUT_all( | ||
7 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME, | ||
8 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, | ||
9 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
10 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, | ||
11 | MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT), | ||
12 | |||
13 | // Fn1 Layer | ||
14 | [1] = LAYOUT_all( | ||
15 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS, | ||
16 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
17 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
18 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
19 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
20 | |||
21 | // Fn2 Layer | ||
22 | [2] = LAYOUT_all( | ||
23 | KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, | ||
24 | KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
28 | |||
29 | // Fn3 Layer | ||
30 | [3] = LAYOUT_all( | ||
31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
33 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
36 | }; | ||
diff --git a/keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h index f51bc5c61..b9c033e09 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h +++ b/keyboards/wilba_tech/rama_works_koyu/rama_works_koyu.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #include "quantum.h" | 19 | #include "quantum.h" |
20 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" | 20 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" |
21 | #include "keyboards/wilba_tech/via_keycodes.h" | 21 | #include "via.h" |
22 | 22 | ||
23 | #define ____ KC_NO | 23 | #define ____ KC_NO |
24 | 24 | ||
diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index cf6a8a96a..80a3b32b2 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk | |||
@@ -20,7 +20,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | |||
20 | # change to "no" to disable the options, or define them in the Makefile in | 20 | # change to "no" to disable the options, or define them in the Makefile in |
21 | # the appropriate keymap folder that will get included automatically | 21 | # the appropriate keymap folder that will get included automatically |
22 | # | 22 | # |
23 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 23 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
26 | CONSOLE_ENABLE = no # Console for debug(+400) | 26 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | |||
36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
37 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 37 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
38 | 38 | ||
39 | RAW_ENABLE = yes | ||
40 | DYNAMIC_KEYMAP_ENABLE = yes | ||
41 | CIE1931_CURVE = yes | 39 | CIE1931_CURVE = yes |
42 | 40 | ||
43 | # project specific files | 41 | # project specific files |
diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h index f72ecae85..d2e67e0c9 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h | |||
@@ -15,13 +15,12 @@ You should have received a copy of the GNU General Public License | |||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef CONFIG_H | 18 | #pragma once |
19 | #define CONFIG_H | ||
20 | 19 | ||
21 | #include "config_common.h" | 20 | #include "config_common.h" |
22 | 21 | ||
23 | /* USB Device descriptor parameter */ | 22 | /* USB Device descriptor parameter */ |
24 | #define VENDOR_ID 0x5241 // "RW" | 23 | #define VENDOR_ID 0x5241 // "RA" |
25 | #define PRODUCT_ID 0x00AB // 10-B | 24 | #define PRODUCT_ID 0x00AB // 10-B |
26 | #define DEVICE_VER 0x0001 | 25 | #define DEVICE_VER 0x0001 |
27 | #define MANUFACTURER RAMA WORKS | 26 | #define MANUFACTURER RAMA WORKS |
@@ -180,25 +179,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
180 | 179 | ||
181 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 180 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
182 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 181 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
183 | |||
184 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
185 | |||
186 | // EEPROM usage | ||
187 | |||
188 | // TODO: refactor with new user EEPROM code (coming soon) | ||
189 | #define EEPROM_MAGIC 0x451F | ||
190 | #define EEPROM_MAGIC_ADDR 34 | ||
191 | // Bump this every time we change what we store | ||
192 | // This will automatically reset the EEPROM with defaults | ||
193 | // and avoid loading invalid data from the EEPROM | ||
194 | #define EEPROM_VERSION 0x08 | ||
195 | #define EEPROM_VERSION_ADDR 36 | ||
196 | |||
197 | // Dynamic keymap starts after EEPROM version | ||
198 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
199 | // Dynamic macro starts after dynamic keymaps (37+(4*10*2)) = (37+80) | ||
200 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 117 | ||
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 907 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
203 | |||
204 | #endif | ||
diff --git a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h index 7c3ec9601..511dc9537 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/config.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include "../../config.h" | 20 | #include "../../config.h" |
21 | 21 | ||
22 | #undef VIA_ENABLE | ||
22 | #undef RAW_ENABLE | 23 | #undef RAW_ENABLE |
23 | #undef DYNAMIC_KEYMAP_ENABLE | 24 | #undef DYNAMIC_KEYMAP_ENABLE |
24 | 25 | ||
diff --git a/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c new file mode 100644 index 000000000..8c97a5cfb --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | |||
5 | LAYOUT( | ||
6 | KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_0 ), | ||
7 | LAYOUT( | ||
8 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), | ||
9 | LAYOUT( | ||
10 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), | ||
11 | LAYOUT( | ||
12 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) | ||
13 | }; | ||
diff --git a/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index 07372d0ac..e970f6c7a 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -29,9 +29,3 @@ UNICODE_ENABLE = no # Unicode | |||
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
30 | AUDIO_ENABLE = no # Audio output on port C6 | 30 | AUDIO_ENABLE = no # Audio output on port C6 |
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
32 | |||
33 | RAW_ENABLE = yes | ||
34 | DYNAMIC_KEYMAP_ENABLE = yes | ||
35 | |||
36 | # project specific files | ||
37 | SRC = keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/wilba_tech/rama_works_m60_a/config.h b/keyboards/wilba_tech/rama_works_m60_a/config.h index 1ee76750c..8381a4db0 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/config.h +++ b/keyboards/wilba_tech/rama_works_m60_a/config.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include "config_common.h" | 18 | #include "config_common.h" |
19 | 19 | ||
20 | // USB Device descriptor parameter | 20 | // USB Device descriptor parameter |
21 | #define VENDOR_ID 0x5241 // "RW" | 21 | #define VENDOR_ID 0x5241 // "RA" |
22 | #define PRODUCT_ID 0x060A // 60-A | 22 | #define PRODUCT_ID 0x060A // 60-A |
23 | #define DEVICE_VER 0x0001 | 23 | #define DEVICE_VER 0x0001 |
24 | #define MANUFACTURER RAMA WORKS | 24 | #define MANUFACTURER RAMA WORKS |
@@ -116,24 +116,6 @@ | |||
116 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 116 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
117 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 117 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
118 | 118 | ||
119 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 119 | // Backlight config starts after VIA's EEPROM usage, |
120 | 120 | // dynamic keymaps start after this. | |
121 | // EEPROM usage | 121 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 |
122 | |||
123 | // TODO: refactor with new user EEPROM code (coming soon) | ||
124 | #define EEPROM_MAGIC 0x451F | ||
125 | #define EEPROM_MAGIC_ADDR 34 | ||
126 | // Bump this every time we change what we store | ||
127 | // This will automatically reset the EEPROM with defaults | ||
128 | // and avoid loading invalid data from the EEPROM | ||
129 | #define EEPROM_VERSION 0x08 | ||
130 | #define EEPROM_VERSION_ADDR 36 | ||
131 | |||
132 | // Backlight config starts after EEPROM version | ||
133 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
134 | // Dynamic keymap starts after backlight config (37+31) | ||
135 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 68 | ||
136 | // Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) | ||
137 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 | ||
138 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 | ||
139 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c new file mode 100644 index 000000000..7b6d9b756 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c | |||
@@ -0,0 +1,40 @@ | |||
1 | // M60-A layout | ||
2 | #include QMK_KEYBOARD_H | ||
3 | |||
4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
5 | |||
6 | // Default layer | ||
7 | [0] = LAYOUT_60_hhkb( | ||
8 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, | ||
9 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, | ||
10 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
11 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_MO13, | ||
12 | KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23), | ||
13 | |||
14 | // Fn1 Layer | ||
15 | [1] = LAYOUT_60_hhkb( | ||
16 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, | ||
17 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, | ||
18 | KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, | ||
19 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, | ||
20 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
21 | |||
22 | // Fn2 Layer | ||
23 | [2] = LAYOUT_60_hhkb( | ||
24 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
29 | |||
30 | // Fn3 Layer (zeal60 Configuration) | ||
31 | [3] = LAYOUT_60_hhkb( | ||
32 | KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, | ||
33 | KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
37 | |||
38 | }; | ||
39 | |||
40 | |||
diff --git a/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h index 01e096fee..2c690122b 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h +++ b/keyboards/wilba_tech/rama_works_m60_a/rama_works_m60_a.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include "quantum.h" | 18 | #include "quantum.h" |
19 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" | 19 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" |
20 | #include "keyboards/wilba_tech/via_keycodes.h" | 20 | #include "via.h" |
21 | 21 | ||
22 | #define XXX KC_NO | 22 | #define XXX KC_NO |
23 | 23 | ||
diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index 1dec6c074..e4e934bdb 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk | |||
@@ -20,7 +20,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | |||
20 | # change to "no" to disable the options, or define them in the Makefile in | 20 | # change to "no" to disable the options, or define them in the Makefile in |
21 | # the appropriate keymap folder that will get included automatically | 21 | # the appropriate keymap folder that will get included automatically |
22 | # | 22 | # |
23 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 23 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
26 | CONSOLE_ENABLE = no # Console for debug(+400) | 26 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | |||
36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
37 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 37 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
38 | 38 | ||
39 | RAW_ENABLE = yes | ||
40 | DYNAMIC_KEYMAP_ENABLE = yes | ||
41 | CIE1931_CURVE = yes | 39 | CIE1931_CURVE = yes |
42 | 40 | ||
43 | LAYOUTS = 60_hhkb | 41 | LAYOUTS = 60_hhkb |
diff --git a/keyboards/wilba_tech/rama_works_m6_a/config.h b/keyboards/wilba_tech/rama_works_m6_a/config.h index 07396450d..1a61604bb 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/config.h +++ b/keyboards/wilba_tech/rama_works_m6_a/config.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include "config_common.h" | 18 | #include "config_common.h" |
19 | 19 | ||
20 | /* USB Device descriptor parameter */ | 20 | /* USB Device descriptor parameter */ |
21 | #define VENDOR_ID 0x5241 // "RW" | 21 | #define VENDOR_ID 0x5241 // "RA" |
22 | #define PRODUCT_ID 0x006A // 6-A | 22 | #define PRODUCT_ID 0x006A // 6-A |
23 | #define DEVICE_VER 0x0001 | 23 | #define DEVICE_VER 0x0001 |
24 | #define MANUFACTURER RAMA WORKS | 24 | #define MANUFACTURER RAMA WORKS |
@@ -103,27 +103,9 @@ | |||
103 | 103 | ||
104 | #define RGB_BACKLIGHT_ENABLED 0 | 104 | #define RGB_BACKLIGHT_ENABLED 0 |
105 | 105 | ||
106 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
107 | |||
108 | // EEPROM usage | ||
109 | |||
110 | // TODO: refactor with new user EEPROM code (coming soon) | ||
111 | #define EEPROM_MAGIC 0x451F | ||
112 | #define EEPROM_MAGIC_ADDR 34 | ||
113 | // Bump this every time we change what we store | ||
114 | // This will automatically reset the EEPROM with defaults | ||
115 | // and avoid loading invalid data from the EEPROM | ||
116 | #define EEPROM_VERSION 0x08 | ||
117 | #define EEPROM_VERSION_ADDR 36 | ||
118 | |||
119 | // NOTE: M6-A doesn't use RGB backlight, but we keep this | 106 | // NOTE: M6-A doesn't use RGB backlight, but we keep this |
120 | // consistent with M6-B which does. | 107 | // consistent with M6-B which does. |
121 | 108 | ||
122 | // Backlight config starts after EEPROM version | 109 | // Backlight config starts after VIA's EEPROM usage, |
123 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | 110 | // dynamic keymaps start after this. |
124 | // Dynamic keymap starts after backlight config (37+43) | 111 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 |
125 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 80 | ||
126 | // Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) | ||
127 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 | ||
128 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 | ||
129 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c new file mode 100644 index 000000000..7a408fa8a --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c | |||
@@ -0,0 +1,16 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | |||
5 | LAYOUT( | ||
6 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6), | ||
7 | |||
8 | LAYOUT( | ||
9 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), | ||
10 | |||
11 | LAYOUT( | ||
12 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), | ||
13 | |||
14 | LAYOUT( | ||
15 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; | ||
16 | |||
diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 5feee3112..26185cb38 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk | |||
@@ -19,7 +19,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | |||
19 | # Build Options | 19 | # Build Options |
20 | # change yes to no to disable | 20 | # change yes to no to disable |
21 | # | 21 | # |
22 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 22 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
23 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 23 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
24 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 24 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
25 | CONSOLE_ENABLE = no # Console for debug(+400) | 25 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -34,10 +34,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this | |||
34 | 34 | ||
35 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 35 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
36 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 36 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
37 | |||
38 | RAW_ENABLE = yes | ||
39 | DYNAMIC_KEYMAP_ENABLE = yes | ||
40 | CIE1931_CURVE = no | ||
41 | |||
42 | # project specific files | ||
43 | SRC = keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/wilba_tech/rama_works_m6_b/config.h b/keyboards/wilba_tech/rama_works_m6_b/config.h index 535c64b80..3ebfd80da 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/config.h +++ b/keyboards/wilba_tech/rama_works_m6_b/config.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include "config_common.h" | 18 | #include "config_common.h" |
19 | 19 | ||
20 | /* USB Device descriptor parameter */ | 20 | /* USB Device descriptor parameter */ |
21 | #define VENDOR_ID 0x5241 // "RW" | 21 | #define VENDOR_ID 0x5241 // "RA" |
22 | #define PRODUCT_ID 0x006B // 6-B | 22 | #define PRODUCT_ID 0x006B // 6-B |
23 | #define DEVICE_VER 0x0001 | 23 | #define DEVICE_VER 0x0001 |
24 | #define MANUFACTURER RAMA WORKS | 24 | #define MANUFACTURER RAMA WORKS |
@@ -149,24 +149,6 @@ | |||
149 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 149 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
150 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 150 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
151 | 151 | ||
152 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 152 | // Backlight config starts after VIA's EEPROM usage, |
153 | 153 | // dynamic keymaps start after this. | |
154 | // EEPROM usage | 154 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 |
155 | |||
156 | // TODO: refactor with new user EEPROM code (coming soon) | ||
157 | #define EEPROM_MAGIC 0x451F | ||
158 | #define EEPROM_MAGIC_ADDR 34 | ||
159 | // Bump this every time we change what we store | ||
160 | // This will automatically reset the EEPROM with defaults | ||
161 | // and avoid loading invalid data from the EEPROM | ||
162 | #define EEPROM_VERSION 0x08 | ||
163 | #define EEPROM_VERSION_ADDR 36 | ||
164 | |||
165 | // Backlight config starts after EEPROM version | ||
166 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
167 | // Dynamic keymap starts after backlight config (37+43) | ||
168 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 80 | ||
169 | // Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) | ||
170 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 | ||
171 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 | ||
172 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c new file mode 100644 index 000000000..7a408fa8a --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c | |||
@@ -0,0 +1,16 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | |||
5 | LAYOUT( | ||
6 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6), | ||
7 | |||
8 | LAYOUT( | ||
9 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), | ||
10 | |||
11 | LAYOUT( | ||
12 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), | ||
13 | |||
14 | LAYOUT( | ||
15 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; | ||
16 | |||
diff --git a/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index 4c14af06c..05212a3be 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk | |||
@@ -19,7 +19,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | |||
19 | # Build Options | 19 | # Build Options |
20 | # change yes to no to disable | 20 | # change yes to no to disable |
21 | # | 21 | # |
22 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 22 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
23 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 23 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
24 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 24 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
25 | CONSOLE_ENABLE = no # Console for debug(+400) | 25 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -35,8 +35,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this | |||
35 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 35 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
36 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 36 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
37 | 37 | ||
38 | RAW_ENABLE = yes | ||
39 | DYNAMIC_KEYMAP_ENABLE = yes | ||
40 | CIE1931_CURVE = yes | 38 | CIE1931_CURVE = yes |
41 | 39 | ||
42 | # project specific files | 40 | # project specific files |
diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index d0bf0ed1e..748b2cb29 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #include "config_common.h" | 19 | #include "config_common.h" |
20 | 20 | ||
21 | /* USB Device descriptor parameter */ | 21 | /* USB Device descriptor parameter */ |
22 | #define VENDOR_ID 0x5241 // "RW" | 22 | #define VENDOR_ID 0x5241 // "RA" |
23 | #define PRODUCT_ID 0x080A // 80-A | 23 | #define PRODUCT_ID 0x080A // 80-A |
24 | #define DEVICE_VER 0x0001 | 24 | #define DEVICE_VER 0x0001 |
25 | #define MANUFACTURER RAMA WORKS | 25 | #define MANUFACTURER RAMA WORKS |
@@ -232,25 +232,6 @@ | |||
232 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 232 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
233 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 233 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
234 | 234 | ||
235 | 235 | // Backlight config starts after VIA's EEPROM usage, | |
236 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 236 | // dynamic keymaps start after this. |
237 | 237 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 | |
238 | // EEPROM usage | ||
239 | |||
240 | // TODO: refactor with new user EEPROM code (coming soon) | ||
241 | #define EEPROM_MAGIC 0x451F | ||
242 | #define EEPROM_MAGIC_ADDR 34 | ||
243 | // Bump this every time we change what we store | ||
244 | // This will automatically reset the EEPROM with defaults | ||
245 | // and avoid loading invalid data from the EEPROM | ||
246 | #define EEPROM_VERSION 0x07 | ||
247 | #define EEPROM_VERSION_ADDR 36 | ||
248 | |||
249 | // Backlight config starts after EEPROM version | ||
250 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
251 | // Dynamic keymap starts after backlight config (37+31) | ||
252 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 68 | ||
253 | // Dynamic macro starts after dynamic keymaps (68+(4*6*17*2)) = (68+816) | ||
254 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 884 | ||
255 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 140 | ||
256 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c new file mode 100644 index 000000000..548843427 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c | |||
@@ -0,0 +1,37 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | |||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
4 | |||
5 | [0] = LAYOUT_all( | ||
6 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, | ||
7 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | ||
8 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
9 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
10 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
11 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), | ||
12 | |||
13 | [1] = LAYOUT_all( | ||
14 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
15 | KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
16 | KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
17 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
18 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
19 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
20 | |||
21 | [2] = LAYOUT_all( | ||
22 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
23 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
24 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
28 | |||
29 | [3] = LAYOUT_all( | ||
30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
33 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) | ||
36 | }; | ||
37 | |||
diff --git a/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h index c057db4cc..c5380e4a6 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h +++ b/keyboards/wilba_tech/rama_works_u80_a/rama_works_u80_a.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | #include "quantum.h" | 19 | #include "quantum.h" |
20 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" | 20 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" |
21 | #include "keyboards/wilba_tech/via_keycodes.h" | 21 | #include "via.h" |
22 | 22 | ||
23 | #define ____ KC_NO | 23 | #define ____ KC_NO |
24 | 24 | ||
diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index 0f02cd04f..443776d4a 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -29,9 +29,6 @@ UNICODE_ENABLE = no # Unicode | |||
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
30 | AUDIO_ENABLE = no # Audio output on port C6 | 30 | AUDIO_ENABLE = no # Audio output on port C6 |
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
32 | |||
33 | RAW_ENABLE = yes | ||
34 | DYNAMIC_KEYMAP_ENABLE = yes | ||
35 | CIE1931_CURVE = yes | 32 | CIE1931_CURVE = yes |
36 | 33 | ||
37 | # project specific files | 34 | # project specific files |
diff --git a/keyboards/wilba_tech/via_api.h b/keyboards/wilba_tech/via_api.h deleted file mode 100644 index f04bb1b46..000000000 --- a/keyboards/wilba_tech/via_api.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* Copyright 2017 Jason Williams (Wilba) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | #define PROTOCOL_VERSION 0x0008 | ||
19 | |||
20 | enum via_command_id | ||
21 | { | ||
22 | id_get_protocol_version = 0x01, // always 0x01 | ||
23 | id_get_keyboard_value, | ||
24 | id_set_keyboard_value, | ||
25 | id_dynamic_keymap_get_keycode, | ||
26 | id_dynamic_keymap_set_keycode, | ||
27 | id_dynamic_keymap_reset, | ||
28 | id_backlight_config_set_value, | ||
29 | id_backlight_config_get_value, | ||
30 | id_backlight_config_save, | ||
31 | id_eeprom_reset, | ||
32 | id_bootloader_jump, | ||
33 | id_dynamic_keymap_macro_get_count, | ||
34 | id_dynamic_keymap_macro_get_buffer_size, | ||
35 | id_dynamic_keymap_macro_get_buffer, | ||
36 | id_dynamic_keymap_macro_set_buffer, | ||
37 | id_dynamic_keymap_macro_reset, | ||
38 | id_dynamic_keymap_get_layer_count, | ||
39 | id_dynamic_keymap_get_buffer, | ||
40 | id_dynamic_keymap_set_buffer, | ||
41 | id_unhandled = 0xFF, | ||
42 | }; | ||
43 | |||
44 | enum via_keyboard_value_id | ||
45 | { | ||
46 | id_uptime = 0x01, | ||
47 | id_firmware_version | ||
48 | }; | ||
49 | |||
diff --git a/keyboards/wilba_tech/via_keycodes.h b/keyboards/wilba_tech/via_keycodes.h deleted file mode 100644 index bed48d64b..000000000 --- a/keyboards/wilba_tech/via_keycodes.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | /* Copyright 2017 Jason Williams (Wilba) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #pragma once | ||
17 | |||
18 | // Can't use SAFE_RANGE here, it might change if someone adds | ||
19 | // new values to enum quantum_keycodes. | ||
20 | // Need to keep checking 0x5F10 is still in the safe range. | ||
21 | // TODO: merge this into quantum_keycodes | ||
22 | // Backlight keycodes are in range 0x5F00-0x5F0F | ||
23 | enum via_keycodes { | ||
24 | FN_MO13 = 0x5F10, | ||
25 | FN_MO23, | ||
26 | MACRO00, | ||
27 | MACRO01, | ||
28 | MACRO02, | ||
29 | MACRO03, | ||
30 | MACRO04, | ||
31 | MACRO05, | ||
32 | MACRO06, | ||
33 | MACRO07, | ||
34 | MACRO08, | ||
35 | MACRO09, | ||
36 | MACRO10, | ||
37 | MACRO11, | ||
38 | MACRO12, | ||
39 | MACRO13, | ||
40 | MACRO14, | ||
41 | MACRO15, | ||
42 | }; | ||
43 | |||
44 | enum user_keycodes { | ||
45 | USER00 = 0x5F80, | ||
46 | USER01, | ||
47 | USER02, | ||
48 | USER03, | ||
49 | USER04, | ||
50 | USER05, | ||
51 | USER06, | ||
52 | USER07, | ||
53 | USER08, | ||
54 | USER09, | ||
55 | USER10, | ||
56 | USER11, | ||
57 | USER12, | ||
58 | USER13, | ||
59 | USER14, | ||
60 | USER15, | ||
61 | }; | ||
62 | |||
63 | // VIA specific "action functions", introduced with Zeal60 | ||
64 | // These are only valid IDs in action_function() | ||
65 | // Use FN_TT13, FN_TT23, etc. in keymaps | ||
66 | enum via_action_functions { | ||
67 | TRIPLE_TAP_1_3 = 0x31, | ||
68 | TRIPLE_TAP_2_3 = 0x32 | ||
69 | }; | ||
70 | |||
71 | // Bitwise OR the above with 0x0F00 to use in F(x) macro | ||
72 | // This reserves the top 256 of the 4096 range of F(x) keycodes, | ||
73 | // leaving the rest for use in fn_actions[] or actions in EEPROM. | ||
74 | #define FN_TT13 F((0x0F00|TRIPLE_TAP_1_3)) | ||
75 | #define FN_TT23 F((0x0F00|TRIPLE_TAP_2_3)) | ||
76 | |||
77 | #define TG_NKRO MAGIC_TOGGLE_NKRO | ||
diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 6e1e0e81c..269afbcb8 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h | |||
@@ -200,24 +200,7 @@ | |||
200 | // the default effect speed (0-3) | 200 | // the default effect speed (0-3) |
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | 201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 |
202 | 202 | ||
203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 203 | // Backlight config starts after VIA's EEPROM usage, |
204 | 204 | // dynamic keymaps start after this. | |
205 | // EEPROM usage | 205 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 |
206 | 206 | ||
207 | // TODO: refactor with new user EEPROM code (coming soon) | ||
208 | #define EEPROM_MAGIC 0x4520 | ||
209 | #define EEPROM_MAGIC_ADDR 34 | ||
210 | // Bump this every time we change what we store | ||
211 | // This will automatically reset the EEPROM with defaults | ||
212 | // and avoid loading invalid data from the EEPROM | ||
213 | #define EEPROM_VERSION 0x08 | ||
214 | #define EEPROM_VERSION_ADDR 36 | ||
215 | |||
216 | // Backlight config starts after EEPROM version | ||
217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
218 | // Dynamic keymap starts after backlight config (37+7) | ||
219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
220 | // Dynamic macro starts after dynamic keymaps (44+(4*5*14*2)) = (44+560) | ||
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 604 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 420 | ||
223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 111c94ee8..c59e94e83 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt60_d/config.h b/keyboards/wilba_tech/wt60_d/config.h index 066465d42..acb69ba04 100644 --- a/keyboards/wilba_tech/wt60_d/config.h +++ b/keyboards/wilba_tech/wt60_d/config.h | |||
@@ -178,23 +178,3 @@ | |||
178 | 178 | ||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | |||
182 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
183 | |||
184 | // EEPROM usage | ||
185 | |||
186 | // TODO: refactor with new user EEPROM code (coming soon) | ||
187 | #define EEPROM_MAGIC 0x451F | ||
188 | #define EEPROM_MAGIC_ADDR 34 | ||
189 | // Bump this every time we change what we store | ||
190 | // This will automatically reset the EEPROM with defaults | ||
191 | // and avoid loading invalid data from the EEPROM | ||
192 | #define EEPROM_VERSION 0x08 | ||
193 | #define EEPROM_VERSION_ADDR 36 | ||
194 | |||
195 | // Dynamic keymap starts after EEPROM version | ||
196 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
197 | // Dynamic macro starts after dynamic keymaps (37+(4*5*14*2)) = (37+560) | ||
198 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 597 | ||
199 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 427 | ||
200 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index 07372d0ac..a5c98a1c6 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -29,9 +29,3 @@ UNICODE_ENABLE = no # Unicode | |||
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 29 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
30 | AUDIO_ENABLE = no # Audio output on port C6 | 30 | AUDIO_ENABLE = no # Audio output on port C6 |
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | 31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches |
32 | |||
33 | RAW_ENABLE = yes | ||
34 | DYNAMIC_KEYMAP_ENABLE = yes | ||
35 | |||
36 | # project specific files | ||
37 | SRC = keyboards/wilba_tech/wt_main.c | ||
diff --git a/keyboards/wilba_tech/wt60_d/wt60_d.c b/keyboards/wilba_tech/wt60_d/wt60_d.c index ccff6d62c..52a773368 100644 --- a/keyboards/wilba_tech/wt60_d/wt60_d.c +++ b/keyboards/wilba_tech/wt60_d/wt60_d.c | |||
@@ -1,17 +1 @@ | |||
1 | /* Copyright 2018 Jason Williams (Wilba) | #include "wt60_d.h" | |
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | // Nothing to see here, move along... ;-) | ||
diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 9d67c317b..ad4c120f4 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h | |||
@@ -197,24 +197,7 @@ | |||
197 | // the default effect speed (0-3) | 197 | // the default effect speed (0-3) |
198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | 198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 |
199 | 199 | ||
200 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 200 | // Backlight config starts after VIA's EEPROM usage, |
201 | 201 | // dynamic keymaps start after this. | |
202 | // EEPROM usage | 202 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 |
203 | 203 | ||
204 | // TODO: refactor with new user EEPROM code (coming soon) | ||
205 | #define EEPROM_MAGIC 0x4520 | ||
206 | #define EEPROM_MAGIC_ADDR 34 | ||
207 | // Bump this every time we change what we store | ||
208 | // This will automatically reset the EEPROM with defaults | ||
209 | // and avoid loading invalid data from the EEPROM | ||
210 | #define EEPROM_VERSION 0x08 | ||
211 | #define EEPROM_VERSION_ADDR 36 | ||
212 | |||
213 | // Backlight config starts after EEPROM version | ||
214 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
215 | // Dynamic keymap starts after backlight config (37+7) | ||
216 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
217 | // Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) | ||
218 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 | ||
219 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 | ||
220 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 111c94ee8..c59e94e83 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 8b2437fc9..f98fa4e72 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h | |||
@@ -197,24 +197,7 @@ | |||
197 | // the default effect speed (0-3) | 197 | // the default effect speed (0-3) |
198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | 198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 |
199 | 199 | ||
200 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 200 | // Backlight config starts after VIA's EEPROM usage, |
201 | 201 | // dynamic keymaps start after this. | |
202 | // EEPROM usage | 202 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 |
203 | 203 | ||
204 | // TODO: refactor with new user EEPROM code (coming soon) | ||
205 | #define EEPROM_MAGIC 0x4520 | ||
206 | #define EEPROM_MAGIC_ADDR 34 | ||
207 | // Bump this every time we change what we store | ||
208 | // This will automatically reset the EEPROM with defaults | ||
209 | // and avoid loading invalid data from the EEPROM | ||
210 | #define EEPROM_VERSION 0x08 | ||
211 | #define EEPROM_VERSION_ADDR 36 | ||
212 | |||
213 | // Backlight config starts after EEPROM version | ||
214 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
215 | // Dynamic keymap starts after backlight config (37+7) | ||
216 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
217 | // Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) | ||
218 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 | ||
219 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 | ||
220 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index 111c94ee8..c59e94e83 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h index 57546cb49..b10745344 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h | |||
@@ -178,26 +178,3 @@ | |||
178 | 178 | ||
179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 179 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 | 180 | //#define MIDI_TONE_KEYCODE_OCTAVES 1 |
181 | |||
182 | // Does not use WT_MONO_BACKLIGHT | ||
183 | //#define WT_MONO_BACKLIGHT | ||
184 | |||
185 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
186 | |||
187 | // EEPROM usage | ||
188 | |||
189 | // TODO: refactor with new user EEPROM code (coming soon) | ||
190 | #define EEPROM_MAGIC 0x451F | ||
191 | #define EEPROM_MAGIC_ADDR 34 | ||
192 | // Bump this every time we change what we store | ||
193 | // This will automatically reset the EEPROM with defaults | ||
194 | // and avoid loading invalid data from the EEPROM | ||
195 | #define EEPROM_VERSION 0x08 | ||
196 | #define EEPROM_VERSION_ADDR 36 | ||
197 | |||
198 | // Dynamic keymap starts after EEPROM version | ||
199 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
200 | // Dynamic macro starts after dynamic keymaps (37+(4*5*17*2)) = (37+680) | ||
201 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 717 | ||
202 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 307 | ||
203 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index 7d1c2aa1b..25f3ecbf1 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index f63bbf69c..0c0a2ff08 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h | |||
@@ -200,24 +200,7 @@ | |||
200 | // the default effect speed (0-3) | 200 | // the default effect speed (0-3) |
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | 201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 |
202 | 202 | ||
203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 203 | // Backlight config starts after VIA's EEPROM usage, |
204 | 204 | // dynamic keymaps start after this. | |
205 | // EEPROM usage | 205 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 |
206 | 206 | ||
207 | // TODO: refactor with new user EEPROM code (coming soon) | ||
208 | #define EEPROM_MAGIC 0x4520 | ||
209 | #define EEPROM_MAGIC_ADDR 34 | ||
210 | // Bump this every time we change what we store | ||
211 | // This will automatically reset the EEPROM with defaults | ||
212 | // and avoid loading invalid data from the EEPROM | ||
213 | #define EEPROM_VERSION 0x08 | ||
214 | #define EEPROM_VERSION_ADDR 36 | ||
215 | |||
216 | // Backlight config starts after EEPROM version | ||
217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
218 | // Dynamic keymap starts after backlight config (37+7) | ||
219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
220 | // Dynamic macro starts after dynamic keymaps (44+(4*6*15*2)) = (44+720) | ||
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 764 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 260 | ||
223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index 111c94ee8..c59e94e83 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index b173b0241..0c7b3dbfa 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h | |||
@@ -200,24 +200,7 @@ | |||
200 | // the default effect speed (0-3) | 200 | // the default effect speed (0-3) |
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | 201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 |
202 | 202 | ||
203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 203 | // Backlight config starts after VIA's EEPROM usage, |
204 | 204 | // dynamic keymaps start after this. | |
205 | // EEPROM usage | 205 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 |
206 | 206 | ||
207 | // TODO: refactor with new user EEPROM code (coming soon) | ||
208 | #define EEPROM_MAGIC 0x4520 | ||
209 | #define EEPROM_MAGIC_ADDR 34 | ||
210 | // Bump this every time we change what we store | ||
211 | // This will automatically reset the EEPROM with defaults | ||
212 | // and avoid loading invalid data from the EEPROM | ||
213 | #define EEPROM_VERSION 0x08 | ||
214 | #define EEPROM_VERSION_ADDR 36 | ||
215 | |||
216 | // Backlight config starts after EEPROM version | ||
217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
218 | // Dynamic keymap starts after backlight config (37+7) | ||
219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
220 | // Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) | ||
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 | ||
223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index 111c94ee8..c59e94e83 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h index 710599877..b84f2444d 100644 --- a/keyboards/wilba_tech/wt75_c/config.h +++ b/keyboards/wilba_tech/wt75_c/config.h | |||
@@ -198,26 +198,9 @@ | |||
198 | #define MONO_BACKLIGHT_EFFECT 1 | 198 | #define MONO_BACKLIGHT_EFFECT 1 |
199 | 199 | ||
200 | // the default effect speed (0-3) | 200 | // the default effect speed (0-3) |
201 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | 201 | #define MONO_BACKLIGHT_EFFECT_SPEED 000 |
202 | 202 | ||
203 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 203 | // Backlight config starts after VIA's EEPROM usage, |
204 | 204 | // dynamic keymaps start after this. | |
205 | // EEPROM usage | 205 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 |
206 | 206 | ||
207 | // TODO: refactor with new user EEPROM code (coming soon) | ||
208 | #define EEPROM_MAGIC 0x4520 | ||
209 | #define EEPROM_MAGIC_ADDR 34 | ||
210 | // Bump this every time we change what we store | ||
211 | // This will automatically reset the EEPROM with defaults | ||
212 | // and avoid loading invalid data from the EEPROM | ||
213 | #define EEPROM_VERSION 0x08 | ||
214 | #define EEPROM_VERSION_ADDR 36 | ||
215 | |||
216 | // Backlight config starts after EEPROM version | ||
217 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
218 | // Dynamic keymap starts after backlight config (37+7) | ||
219 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
220 | // Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) | ||
221 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 | ||
222 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 | ||
223 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk index 111c94ee8..c59e94e83 100644 --- a/keyboards/wilba_tech/wt75_c/rules.mk +++ b/keyboards/wilba_tech/wt75_c/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 15dac9047..b706956ef 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h | |||
@@ -197,24 +197,6 @@ | |||
197 | // the default effect speed (0-3) | 197 | // the default effect speed (0-3) |
198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 | 198 | #define MONO_BACKLIGHT_EFFECT_SPEED 0 |
199 | 199 | ||
200 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 200 | // Backlight config starts after VIA's EEPROM usage, |
201 | 201 | // dynamic keymaps start after this. | |
202 | // EEPROM usage | 202 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 |
203 | |||
204 | // TODO: refactor with new user EEPROM code (coming soon) | ||
205 | #define EEPROM_MAGIC 0x4520 | ||
206 | #define EEPROM_MAGIC_ADDR 34 | ||
207 | // Bump this every time we change what we store | ||
208 | // This will automatically reset the EEPROM with defaults | ||
209 | // and avoid loading invalid data from the EEPROM | ||
210 | #define EEPROM_VERSION 0x08 | ||
211 | #define EEPROM_VERSION_ADDR 36 | ||
212 | |||
213 | // Backlight config starts after EEPROM version | ||
214 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
215 | // Dynamic keymap starts after backlight config (37+7) | ||
216 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 44 | ||
217 | // Dynamic macro starts after dynamic keymaps (44+(4*6*17*2)) = (44+816) | ||
218 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 860 | ||
219 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 164 | ||
220 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk index 4880a57be..1e5b99807 100644 --- a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk | |||
@@ -1,2 +1 @@ | |||
1 | RAW_ENABLE = yes | VIA_ENABLE = yes | |
2 | DYNAMIC_KEYMAP_ENABLE = yes | ||
diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 111c94ee8..c59e94e83 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index 08556650d..9af0d0050 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h | |||
@@ -90,26 +90,3 @@ | |||
90 | * | 90 | * |
91 | */ | 91 | */ |
92 | //#define FORCE_NKRO | 92 | //#define FORCE_NKRO |
93 | |||
94 | // Does not use WT_MONO_BACKLIGHT | ||
95 | // #define WT_MONO_BACKLIGHT | ||
96 | |||
97 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | ||
98 | |||
99 | // EEPROM usage | ||
100 | |||
101 | // TODO: refactor with new user EEPROM code (coming soon) | ||
102 | #define EEPROM_MAGIC 0x451F | ||
103 | #define EEPROM_MAGIC_ADDR 34 | ||
104 | // Bump this every time we change what we store | ||
105 | // This will automatically reset the EEPROM with defaults | ||
106 | // and avoid loading invalid data from the EEPROM | ||
107 | #define EEPROM_VERSION 0x08 | ||
108 | #define EEPROM_VERSION_ADDR 36 | ||
109 | |||
110 | // Dynamic keymap starts after EEPROM version | ||
111 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 37 | ||
112 | // Dynamic macro starts after dynamic keymaps (37+(4*1*8*2)) = (37+64) | ||
113 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 101 | ||
114 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 923 | ||
115 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk index f072c6719..1e5b99807 100644 --- a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk | |||
@@ -1,68 +1 @@ | |||
1 | # project specific files | VIA_ENABLE = yes | |
2 | SRC = keyboards/wilba_tech/wt_main.c | ||
3 | |||
4 | # MCU name | ||
5 | MCU = atmega32u4 | ||
6 | |||
7 | # Processor frequency. | ||
8 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
9 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
11 | # automatically to create a 32-bit value in your source code. | ||
12 | # | ||
13 | # This will be an integer division of F_USB below, as it is sourced by | ||
14 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | |||
44 | # Boot Section | ||
45 | BOOTLOADER = atmel-dfu | ||
46 | |||
47 | |||
48 | # Build Options | ||
49 | # change yes to no to disable | ||
50 | # | ||
51 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
52 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
53 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
54 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
55 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
56 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
57 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
58 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
59 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
60 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
61 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
62 | UNICODE_ENABLE = no # Unicode | ||
63 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
64 | AUDIO_ENABLE = no # Audio output on port C6 | ||
65 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
66 | |||
67 | RAW_ENABLE = yes | ||
68 | DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index 7d1c2aa1b..25f3ecbf1 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk | |||
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu | |||
14 | # Build Options | 14 | # Build Options |
15 | # change yes to no to disable | 15 | # change yes to no to disable |
16 | # | 16 | # |
17 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 18 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 19 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
20 | CONSOLE_ENABLE = no # Console for debug(+400) | 20 | CONSOLE_ENABLE = no # Console for debug(+400) |
diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index 32fc6f9e4..1ad12ee4a 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c | |||
@@ -23,361 +23,177 @@ | |||
23 | #if MONO_BACKLIGHT_ENABLED | 23 | #if MONO_BACKLIGHT_ENABLED |
24 | #include "keyboards/wilba_tech/wt_mono_backlight.h" | 24 | #include "keyboards/wilba_tech/wt_mono_backlight.h" |
25 | #endif // MONO_BACKLIGHT_ENABLED | 25 | #endif // MONO_BACKLIGHT_ENABLED |
26 | #include "keyboards/wilba_tech/via_api.h" // Temporary hack | ||
27 | #include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack | ||
28 | 26 | ||
29 | #include "raw_hid.h" | 27 | #include "via.h" |
30 | #include "dynamic_keymap.h" | ||
31 | #include "timer.h" | ||
32 | #include "tmk_core/common/eeprom.h" | ||
33 | |||
34 | bool eeprom_is_valid(void) | ||
35 | { | ||
36 | return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && | ||
37 | eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); | ||
38 | } | ||
39 | |||
40 | void eeprom_set_valid(bool valid) | ||
41 | { | ||
42 | eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); | ||
43 | eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); | ||
44 | } | ||
45 | |||
46 | void eeprom_reset(void) | ||
47 | { | ||
48 | // Set the Zeal60 specific EEPROM state as invalid. | ||
49 | eeprom_set_valid(false); | ||
50 | // Set the TMK/QMK EEPROM state as invalid. | ||
51 | eeconfig_disable(); | ||
52 | } | ||
53 | |||
54 | #ifdef RAW_ENABLE | ||
55 | |||
56 | void raw_hid_receive( uint8_t *data, uint8_t length ) | ||
57 | { | ||
58 | uint8_t *command_id = &(data[0]); | ||
59 | uint8_t *command_data = &(data[1]); | ||
60 | switch ( *command_id ) | ||
61 | { | ||
62 | case id_get_protocol_version: | ||
63 | { | ||
64 | command_data[0] = PROTOCOL_VERSION >> 8; | ||
65 | command_data[1] = PROTOCOL_VERSION & 0xFF; | ||
66 | break; | ||
67 | } | ||
68 | case id_get_keyboard_value: | ||
69 | { | ||
70 | if ( command_data[0] == id_uptime ) | ||
71 | { | ||
72 | uint32_t value = timer_read32(); | ||
73 | command_data[1] = (value >> 24 ) & 0xFF; | ||
74 | command_data[2] = (value >> 16 ) & 0xFF; | ||
75 | command_data[3] = (value >> 8 ) & 0xFF; | ||
76 | command_data[4] = value & 0xFF; | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | *command_id = id_unhandled; | ||
81 | } | ||
82 | break; | ||
83 | } | ||
84 | #ifdef DYNAMIC_KEYMAP_ENABLE | ||
85 | case id_dynamic_keymap_get_keycode: | ||
86 | { | ||
87 | uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); | ||
88 | command_data[3] = keycode >> 8; | ||
89 | command_data[4] = keycode & 0xFF; | ||
90 | break; | ||
91 | } | ||
92 | case id_dynamic_keymap_set_keycode: | ||
93 | { | ||
94 | dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); | ||
95 | break; | ||
96 | } | ||
97 | case id_dynamic_keymap_reset: | ||
98 | { | ||
99 | dynamic_keymap_reset(); | ||
100 | break; | ||
101 | } | ||
102 | case id_dynamic_keymap_macro_get_count: | ||
103 | { | ||
104 | command_data[0] = dynamic_keymap_macro_get_count(); | ||
105 | break; | ||
106 | } | ||
107 | case id_dynamic_keymap_macro_get_buffer_size: | ||
108 | { | ||
109 | uint16_t size = dynamic_keymap_macro_get_buffer_size(); | ||
110 | command_data[0] = size >> 8; | ||
111 | command_data[1] = size & 0xFF; | ||
112 | break; | ||
113 | } | ||
114 | case id_dynamic_keymap_macro_get_buffer: | ||
115 | { | ||
116 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
117 | uint16_t size = command_data[2]; // size <= 28 | ||
118 | dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); | ||
119 | break; | ||
120 | } | ||
121 | case id_dynamic_keymap_macro_set_buffer: | ||
122 | { | ||
123 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
124 | uint16_t size = command_data[2]; // size <= 28 | ||
125 | dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); | ||
126 | break; | ||
127 | } | ||
128 | case id_dynamic_keymap_macro_reset: | ||
129 | { | ||
130 | dynamic_keymap_macro_reset(); | ||
131 | break; | ||
132 | } | ||
133 | case id_dynamic_keymap_get_layer_count: | ||
134 | { | ||
135 | command_data[0] = dynamic_keymap_get_layer_count(); | ||
136 | break; | ||
137 | } | ||
138 | case id_dynamic_keymap_get_buffer: | ||
139 | { | ||
140 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
141 | uint16_t size = command_data[2]; // size <= 28 | ||
142 | dynamic_keymap_get_buffer( offset, size, &command_data[3] ); | ||
143 | break; | ||
144 | } | ||
145 | case id_dynamic_keymap_set_buffer: | ||
146 | { | ||
147 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
148 | uint16_t size = command_data[2]; // size <= 28 | ||
149 | dynamic_keymap_set_buffer( offset, size, &command_data[3] ); | ||
150 | break; | ||
151 | } | ||
152 | #endif // DYNAMIC_KEYMAP_ENABLE | ||
153 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | ||
154 | case id_backlight_config_set_value: | ||
155 | { | ||
156 | backlight_config_set_value(command_data); | ||
157 | break; | ||
158 | } | ||
159 | case id_backlight_config_get_value: | ||
160 | { | ||
161 | backlight_config_get_value(command_data); | ||
162 | break; | ||
163 | } | ||
164 | case id_backlight_config_save: | ||
165 | { | ||
166 | backlight_config_save(); | ||
167 | break; | ||
168 | } | ||
169 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | ||
170 | case id_eeprom_reset: | ||
171 | { | ||
172 | eeprom_reset(); | ||
173 | break; | ||
174 | } | ||
175 | case id_bootloader_jump: | ||
176 | { | ||
177 | // Need to send data back before the jump | ||
178 | // Informs host that the command is handled | ||
179 | raw_hid_send( data, length ); | ||
180 | // Give host time to read it | ||
181 | wait_ms(100); | ||
182 | bootloader_jump(); | ||
183 | break; | ||
184 | } | ||
185 | default: | ||
186 | { | ||
187 | // Unhandled message. | ||
188 | *command_id = id_unhandled; | ||
189 | break; | ||
190 | } | ||
191 | } | ||
192 | |||
193 | // Return same buffer with values changed | ||
194 | raw_hid_send( data, length ); | ||
195 | |||
196 | } | ||
197 | 28 | ||
29 | #ifndef VIA_ENABLE | ||
30 | #include "tmk_core/common/eeprom.h" | ||
31 | #include "version.h" // for QMK_BUILDDATE used in EEPROM magic | ||
198 | #endif | 32 | #endif |
199 | 33 | ||
200 | void main_init(void) | 34 | // Called from via_init() if VIA_ENABLE |
35 | // Called from matrix_init_kb() if not VIA_ENABLE | ||
36 | void via_init_kb(void) | ||
201 | { | 37 | { |
202 | // If the EEPROM has the magic, the data is good. | 38 | // If the EEPROM has the magic, the data is good. |
203 | // OK to load from EEPROM. | 39 | // OK to load from EEPROM |
204 | if (eeprom_is_valid()) { | 40 | if (via_eeprom_is_valid()) { |
205 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | ||
206 | backlight_config_load(); | ||
207 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | ||
208 | } else { | ||
209 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 41 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
210 | // If the EEPROM has not been saved before, or is out of date, | 42 | backlight_config_load(); |
211 | // save the default values to the EEPROM. Default values | ||
212 | // come from construction of the backlight_config instance. | ||
213 | backlight_config_save(); | ||
214 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 43 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
215 | #ifdef DYNAMIC_KEYMAP_ENABLE | 44 | } else { |
216 | // This resets the keymaps in EEPROM to what is in flash. | ||
217 | dynamic_keymap_reset(); | ||
218 | // This resets the macros in EEPROM to nothing. | ||
219 | dynamic_keymap_macro_reset(); | ||
220 | #endif // DYNAMIC_KEYMAP_ENABLE | ||
221 | // Save the magic number last, in case saving was interrupted | ||
222 | eeprom_set_valid(true); | ||
223 | } | ||
224 | |||
225 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 45 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
226 | // Initialize LED drivers for backlight. | 46 | // If the EEPROM has not been saved before, or is out of date, |
227 | backlight_init_drivers(); | 47 | // save the default values to the EEPROM. Default values |
228 | 48 | // come from construction of the backlight_config instance. | |
229 | backlight_timer_init(); | 49 | backlight_config_save(); |
230 | backlight_timer_enable(); | ||
231 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 50 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
232 | } | ||
233 | 51 | ||
234 | void bootmagic_lite(void) | 52 | // DO NOT set EEPROM valid here, let caller do this |
235 | { | 53 | } |
236 | // The lite version of TMK's bootmagic. | ||
237 | // 100% less potential for accidentally making the | ||
238 | // keyboard do stupid things. | ||
239 | 54 | ||
240 | // We need multiple scans because debouncing can't be turned off. | 55 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
241 | matrix_scan(); | 56 | // Initialize LED drivers for backlight. |
242 | wait_ms(DEBOUNCE); | 57 | backlight_init_drivers(); |
243 | wait_ms(DEBOUNCE); | ||
244 | matrix_scan(); | ||
245 | 58 | ||
246 | // If the Esc (matrix 0,0) is held down on power up, | 59 | backlight_timer_init(); |
247 | // reset the EEPROM valid state and jump to bootloader. | 60 | backlight_timer_enable(); |
248 | if ( matrix_get_row(0) & (1<<0) ) { | 61 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
249 | eeprom_reset(); | ||
250 | bootloader_jump(); | ||
251 | } | ||
252 | } | 62 | } |
253 | 63 | ||
254 | void matrix_init_kb(void) | 64 | void matrix_init_kb(void) |
255 | { | 65 | { |
256 | bootmagic_lite(); | 66 | // If VIA is disabled, we still need to load backlight settings. |
257 | main_init(); | 67 | // Call via_init_kb() the same way as via_init(), with setting |
258 | matrix_init_user(); | 68 | // EEPROM valid afterwards. |
69 | #ifndef VIA_ENABLE | ||
70 | via_init_kb(); | ||
71 | via_eeprom_set_valid(true); | ||
72 | #endif // VIA_ENABLE | ||
73 | |||
74 | matrix_init_user(); | ||
259 | } | 75 | } |
260 | 76 | ||
261 | void matrix_scan_kb(void) | 77 | void matrix_scan_kb(void) |
262 | { | 78 | { |
263 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 79 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
264 | // This only updates the LED driver buffers if something has changed. | 80 | // This only updates the LED driver buffers if something has changed. |
265 | backlight_update_pwm_buffers(); | 81 | backlight_update_pwm_buffers(); |
266 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 82 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
267 | matrix_scan_user(); | 83 | matrix_scan_user(); |
268 | } | 84 | } |
269 | 85 | ||
270 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) | 86 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) |
271 | { | 87 | { |
272 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 88 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
273 | process_record_backlight(keycode, record); | 89 | process_record_backlight(keycode, record); |
274 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 90 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
275 | 91 | ||
276 | switch(keycode) { | 92 | return process_record_user(keycode, record); |
277 | case FN_MO13: | ||
278 | if (record->event.pressed) { | ||
279 | layer_on(1); | ||
280 | update_tri_layer(1, 2, 3); | ||
281 | } else { | ||
282 | layer_off(1); | ||
283 | update_tri_layer(1, 2, 3); | ||
284 | } | ||
285 | return false; | ||
286 | break; | ||
287 | case FN_MO23: | ||
288 | if (record->event.pressed) { | ||
289 | layer_on(2); | ||
290 | update_tri_layer(1, 2, 3); | ||
291 | } else { | ||
292 | layer_off(2); | ||
293 | update_tri_layer(1, 2, 3); | ||
294 | } | ||
295 | return false; | ||
296 | break; | ||
297 | } | ||
298 | |||
299 | #ifdef DYNAMIC_KEYMAP_ENABLE | ||
300 | // Handle macros | ||
301 | if (record->event.pressed) { | ||
302 | if ( keycode >= MACRO00 && keycode <= MACRO15 ) | ||
303 | { | ||
304 | uint8_t id = keycode - MACRO00; | ||
305 | dynamic_keymap_macro_send(id); | ||
306 | return false; | ||
307 | } | ||
308 | } | ||
309 | #endif //DYNAMIC_KEYMAP_ENABLE | ||
310 | |||
311 | return process_record_user(keycode, record); | ||
312 | } | ||
313 | |||
314 | // This overrides the one in quantum/keymap_common.c | ||
315 | uint16_t keymap_function_id_to_action( uint16_t function_id ) | ||
316 | { | ||
317 | // Zeal60 specific "action functions" are 0xF00 to 0xFFF | ||
318 | // i.e. F(0xF00) to F(0xFFF) are mapped to | ||
319 | // enum zeal60_action_functions by masking last 8 bits. | ||
320 | if ( function_id >= 0x0F00 && function_id <= 0x0FFF ) | ||
321 | { | ||
322 | uint8_t id = function_id & 0xFF; | ||
323 | switch ( id ) { | ||
324 | case TRIPLE_TAP_1_3: | ||
325 | case TRIPLE_TAP_2_3: | ||
326 | { | ||
327 | return ACTION_FUNCTION_TAP(id); | ||
328 | break; | ||
329 | } | ||
330 | default: | ||
331 | break; | ||
332 | } | ||
333 | } | ||
334 | |||
335 | return pgm_read_word(&fn_actions[function_id]); | ||
336 | } | ||
337 | |||
338 | |||
339 | // Zeal60 specific "action functions" | ||
340 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
341 | { | ||
342 | switch (id) | ||
343 | { | ||
344 | case TRIPLE_TAP_1_3: | ||
345 | case TRIPLE_TAP_2_3: | ||
346 | if (record->event.pressed) { | ||
347 | layer_on( id == TRIPLE_TAP_1_3 ? 1 : 2 ); | ||
348 | if (record->tap.count && !record->tap.interrupted) { | ||
349 | if (record->tap.count >= 3) { | ||
350 | layer_invert(3); | ||
351 | } | ||
352 | } else { | ||
353 | record->tap.count = 0; | ||
354 | } | ||
355 | } else { | ||
356 | layer_off( id == TRIPLE_TAP_1_3 ? 1 : 2 ); | ||
357 | } | ||
358 | break; | ||
359 | } | ||
360 | } | 93 | } |
361 | 94 | ||
362 | void led_set_kb(uint8_t usb_led) | 95 | void led_set_kb(uint8_t usb_led) |
363 | { | 96 | { |
364 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 97 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
365 | backlight_set_indicator_state(usb_led); | 98 | backlight_set_indicator_state(usb_led); |
366 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 99 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
367 | led_set_user(usb_led); | 100 | led_set_user(usb_led); |
368 | } | 101 | } |
369 | 102 | ||
370 | void suspend_power_down_kb(void) | 103 | void suspend_power_down_kb(void) |
371 | { | 104 | { |
372 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 105 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
373 | backlight_set_suspend_state(true); | 106 | backlight_set_suspend_state(true); |
374 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 107 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
375 | } | 108 | } |
376 | 109 | ||
377 | void suspend_wakeup_init_kb(void) | 110 | void suspend_wakeup_init_kb(void) |
378 | { | 111 | { |
379 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 112 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
380 | backlight_set_suspend_state(false); | 113 | backlight_set_suspend_state(false); |
381 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | 114 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED |
382 | } | 115 | } |
383 | 116 | ||
117 | // Moving this to the bottom of this source file is a workaround | ||
118 | // for an intermittent compiler error for Atmel compiler. | ||
119 | #ifdef VIA_ENABLE | ||
120 | void raw_hid_receive_kb(uint8_t *data, uint8_t length) { | ||
121 | uint8_t *command_id = &(data[0]); | ||
122 | uint8_t *command_data = &(data[1]); | ||
123 | switch ( *command_id ) | ||
124 | { | ||
125 | #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | ||
126 | case id_backlight_config_set_value: | ||
127 | { | ||
128 | backlight_config_set_value(command_data); | ||
129 | break; | ||
130 | } | ||
131 | case id_backlight_config_get_value: | ||
132 | { | ||
133 | backlight_config_get_value(command_data); | ||
134 | break; | ||
135 | } | ||
136 | case id_backlight_config_save: | ||
137 | { | ||
138 | backlight_config_save(); | ||
139 | break; | ||
140 | } | ||
141 | #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED | ||
142 | default: | ||
143 | { | ||
144 | // Unhandled message. | ||
145 | *command_id = id_unhandled; | ||
146 | *command_data = *command_data; // force use of variable | ||
147 | break; | ||
148 | } | ||
149 | } | ||
150 | // DO NOT call raw_hid_send(data,length) here, let caller do this | ||
151 | } | ||
152 | #endif // VIA_ENABLE | ||
153 | |||
154 | // | ||
155 | // In the case of VIA being disabled, we still need to check if | ||
156 | // keyboard level EEPROM memory is valid before loading. | ||
157 | // Thus these are copies of the same functions in VIA, since | ||
158 | // the backlight settings reuse VIA's EEPROM magic/version, | ||
159 | // and the ones in via.c won't be compiled in. | ||
160 | // | ||
161 | // Yes, this is sub-optimal, and is only here for completeness | ||
162 | // (i.e. catering to the 1% of people that want wilba.tech LED bling | ||
163 | // AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA). | ||
164 | // | ||
165 | #ifndef VIA_ENABLE | ||
166 | |||
167 | bool via_eeprom_is_valid(void) | ||
168 | { | ||
169 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
170 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
171 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
172 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
173 | |||
174 | return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 && | ||
175 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 && | ||
176 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 ); | ||
177 | } | ||
178 | |||
179 | void via_eeprom_set_valid(bool valid) | ||
180 | { | ||
181 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
182 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
183 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
184 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
185 | |||
186 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF); | ||
187 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF); | ||
188 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF); | ||
189 | } | ||
190 | |||
191 | void via_eeprom_reset(void) | ||
192 | { | ||
193 | // Set the VIA specific EEPROM state as invalid. | ||
194 | via_eeprom_set_valid(false); | ||
195 | // Set the TMK/QMK EEPROM state as invalid. | ||
196 | eeconfig_disable(); | ||
197 | } | ||
198 | |||
199 | #endif // VIA_ENABLE | ||
diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index 69d82e582..daf738da2 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c | |||
@@ -19,12 +19,17 @@ | |||
19 | #include "wt_rgb_backlight_api.h" // reuse these for now | 19 | #include "wt_rgb_backlight_api.h" // reuse these for now |
20 | #include "wt_rgb_backlight_keycodes.h" // reuse these for now | 20 | #include "wt_rgb_backlight_keycodes.h" // reuse these for now |
21 | 21 | ||
22 | #include "drivers/avr/i2c_master.h" | ||
23 | #include "drivers/issi/is31fl3736.h" | ||
24 | #include <avr/interrupt.h> | 22 | #include <avr/interrupt.h> |
23 | #include "drivers/avr/i2c_master.h" | ||
25 | 24 | ||
26 | #include "progmem.h" | 25 | #include "progmem.h" |
27 | #include "quantum/color.h" | 26 | #include "quantum/color.h" |
27 | #include "tmk_core/common/eeprom.h" | ||
28 | |||
29 | #include "via.h" // uses only the EEPROM address | ||
30 | #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) | ||
31 | |||
32 | #include "drivers/issi/is31fl3736.h" | ||
28 | 33 | ||
29 | #define ISSI_ADDR_DEFAULT 0x50 | 34 | #define ISSI_ADDR_DEFAULT 0x50 |
30 | 35 | ||
diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index ca8c3269f..31cfabddd 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c | |||
@@ -33,18 +33,20 @@ | |||
33 | #include "wt_rgb_backlight_keycodes.h" | 33 | #include "wt_rgb_backlight_keycodes.h" |
34 | 34 | ||
35 | #if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) | 35 | #if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) |
36 | #include <avr/io.h> | ||
37 | #include <util/delay.h> | ||
38 | #include <avr/interrupt.h> | 36 | #include <avr/interrupt.h> |
39 | #include "drivers/avr/i2c_master.h" | 37 | #include "drivers/avr/i2c_master.h" |
40 | #else | 38 | #else |
41 | #include "ch.h" | 39 | #include "ch.h" |
42 | #include "hal.h" | 40 | #include "hal.h" |
43 | #include "drivers/arm/i2c_master.h" | 41 | #include "drivers/arm/i2c_master.h" |
44 | #include "tmk_core/common/eeprom.h" | ||
45 | #endif | 42 | #endif |
43 | |||
46 | #include "progmem.h" | 44 | #include "progmem.h" |
47 | #include "quantum/color.h" | 45 | #include "quantum/color.h" |
46 | #include "tmk_core/common/eeprom.h" | ||
47 | |||
48 | #include "via.h" // uses only the EEPROM address | ||
49 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) | ||
48 | 50 | ||
49 | #if defined(RGB_BACKLIGHT_M6_B) | 51 | #if defined(RGB_BACKLIGHT_M6_B) |
50 | #include "drivers/issi/is31fl3218.h" | 52 | #include "drivers/issi/is31fl3218.h" |
diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h index 6b9529a6f..cb2f6a96b 100644 --- a/keyboards/wilba_tech/zeal60/config.h +++ b/keyboards/wilba_tech/zeal60/config.h | |||
@@ -115,24 +115,6 @@ | |||
115 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 115 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
116 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 116 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
117 | 117 | ||
118 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 118 | // Backlight config starts after VIA's EEPROM usage, |
119 | 119 | // dynamic keymaps start after this. | |
120 | // EEPROM usage | 120 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 \ No newline at end of file |
121 | |||
122 | // TODO: refactor with new user EEPROM code (coming soon) | ||
123 | #define EEPROM_MAGIC 0x451F | ||
124 | #define EEPROM_MAGIC_ADDR 34 | ||
125 | // Bump this every time we change what we store | ||
126 | // This will automatically reset the EEPROM with defaults | ||
127 | // and avoid loading invalid data from the EEPROM | ||
128 | #define EEPROM_VERSION 0x08 | ||
129 | #define EEPROM_VERSION_ADDR 36 | ||
130 | |||
131 | // Backlight config starts after EEPROM version | ||
132 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
133 | // Dynamic keymap starts after backlight config (37+31) | ||
134 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 68 | ||
135 | // Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) | ||
136 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 | ||
137 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 | ||
138 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/zeal60/keymaps/via/keymap.c b/keyboards/wilba_tech/zeal60/keymaps/via/keymap.c new file mode 100644 index 000000000..395790d29 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/via/keymap.c | |||
@@ -0,0 +1,38 @@ | |||
1 | // Default layout for Zeal60 | ||
2 | #include QMK_KEYBOARD_H | ||
3 | |||
4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
5 | |||
6 | // Default layer | ||
7 | [0] = LAYOUT_60_all( | ||
8 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, | ||
9 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | ||
10 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
11 | KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, | ||
12 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO13, FN_MO23, KC_RCTL), | ||
13 | |||
14 | // Fn1 Layer | ||
15 | [1] = LAYOUT_60_all( | ||
16 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, | ||
17 | KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, | ||
18 | KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, | ||
19 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, | ||
20 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
21 | |||
22 | // Fn2 Layer | ||
23 | [2] = LAYOUT_60_all( | ||
24 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
29 | |||
30 | // Fn3 Layer (zeal60 Configuration) | ||
31 | [3] = LAYOUT_60_all( | ||
32 | KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, | ||
33 | KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, KC_TRNS, | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
37 | |||
38 | }; | ||
diff --git a/keyboards/wilba_tech/zeal60/keymaps/via/rules.mk b/keyboards/wilba_tech/zeal60/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 11f3867de..3067be73d 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk | |||
@@ -20,7 +20,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | |||
20 | # change to "no" to disable the options, or define them in the Makefile in | 20 | # change to "no" to disable the options, or define them in the Makefile in |
21 | # the appropriate keymap folder that will get included automatically | 21 | # the appropriate keymap folder that will get included automatically |
22 | # | 22 | # |
23 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 23 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
26 | CONSOLE_ENABLE = no # Console for debug(+400) | 26 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | |||
36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
37 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | 37 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend |
38 | 38 | ||
39 | RAW_ENABLE = yes | ||
40 | DYNAMIC_KEYMAP_ENABLE = yes | ||
41 | CIE1931_CURVE = yes | 39 | CIE1931_CURVE = yes |
42 | 40 | ||
43 | LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift | 41 | LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift |
diff --git a/keyboards/wilba_tech/zeal60/zeal60.h b/keyboards/wilba_tech/zeal60/zeal60.h index 0d4f1b908..016531d22 100644 --- a/keyboards/wilba_tech/zeal60/zeal60.h +++ b/keyboards/wilba_tech/zeal60/zeal60.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include "quantum.h" | 18 | #include "quantum.h" |
19 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" | 19 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" |
20 | #include "keyboards/wilba_tech/via_keycodes.h" | 20 | #include "via.h" |
21 | 21 | ||
22 | #define XXX KC_NO | 22 | #define XXX KC_NO |
23 | 23 | ||
diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h index f452fbd47..01649d76f 100644 --- a/keyboards/wilba_tech/zeal65/config.h +++ b/keyboards/wilba_tech/zeal65/config.h | |||
@@ -115,24 +115,6 @@ | |||
115 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 115 | #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
116 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } | 116 | #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } |
117 | 117 | ||
118 | #define DYNAMIC_KEYMAP_LAYER_COUNT 4 | 118 | // Backlight config starts after VIA's EEPROM usage, |
119 | 119 | // dynamic keymaps start after this. | |
120 | // EEPROM usage | 120 | #define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 |
121 | |||
122 | // TODO: refactor with new user EEPROM code (coming soon) | ||
123 | #define EEPROM_MAGIC 0x451F | ||
124 | #define EEPROM_MAGIC_ADDR 34 | ||
125 | // Bump this every time we change what we store | ||
126 | // This will automatically reset the EEPROM with defaults | ||
127 | // and avoid loading invalid data from the EEPROM | ||
128 | #define EEPROM_VERSION 0x08 | ||
129 | #define EEPROM_VERSION_ADDR 36 | ||
130 | |||
131 | // Backlight config starts after EEPROM version | ||
132 | #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 | ||
133 | // Dynamic keymap starts after backlight config (37+31) | ||
134 | #define DYNAMIC_KEYMAP_EEPROM_ADDR 68 | ||
135 | // Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) | ||
136 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 | ||
137 | #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 | ||
138 | #define DYNAMIC_KEYMAP_MACRO_COUNT 16 | ||
diff --git a/keyboards/wilba_tech/zeal65/info.json b/keyboards/wilba_tech/zeal65/info.json index d83895ed9..709f7cefe 100644 --- a/keyboards/wilba_tech/zeal65/info.json +++ b/keyboards/wilba_tech/zeal65/info.json | |||
@@ -6,7 +6,7 @@ | |||
6 | "width": 16, | 6 | "width": 16, |
7 | "height": 5, | 7 | "height": 5, |
8 | "layouts": { | 8 | "layouts": { |
9 | "LAYOUT_65_split_bs": { | 9 | "LAYOUT_65_all": { |
10 | "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Fn2", "x":10, "y":4, "w":1.5}, {"label":"Fn1", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] | 10 | "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Win", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4, "w":1.5}, {"x":3, "y":4, "w":7}, {"label":"Fn2", "x":10, "y":4, "w":1.5}, {"label":"Fn1", "x":11.5, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] |
11 | }, | 11 | }, |
12 | "LAYOUT_65_normie": { | 12 | "LAYOUT_65_normie": { |
diff --git a/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c b/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c index 96b04c358..2c6d24e8f 100644 --- a/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c +++ b/keyboards/wilba_tech/zeal65/keymaps/split_bs/keymap.c | |||
@@ -4,7 +4,7 @@ | |||
4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
5 | 5 | ||
6 | // Default layer | 6 | // Default layer |
7 | [0] = LAYOUT_65_split_bs( | 7 | [0] = LAYOUT_65_all( |
8 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME, | 8 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME, |
9 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, | 9 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, |
10 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | 10 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, |
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
12 | KC_LGUI, KC_LALT, KC_SPC, FN_MO23, FN_MO13, KC_LEFT, KC_DOWN, KC_RGHT), | 12 | KC_LGUI, KC_LALT, KC_SPC, FN_MO23, FN_MO13, KC_LEFT, KC_DOWN, KC_RGHT), |
13 | 13 | ||
14 | // Fn1 Layer | 14 | // Fn1 Layer |
15 | [1] = LAYOUT_65_split_bs( | 15 | [1] = LAYOUT_65_all( |
16 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS, | 16 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS, |
17 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 17 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
18 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 18 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
@@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
20 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 20 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
21 | 21 | ||
22 | // Fn2 Layer | 22 | // Fn2 Layer |
23 | [2] = LAYOUT_65_split_bs( | 23 | [2] = LAYOUT_65_all( |
24 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 24 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
@@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | 28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
29 | 29 | ||
30 | // Fn3 Layer (zeal60 Configuration) | 30 | // Fn3 Layer (zeal60 Configuration) |
31 | [3] = LAYOUT_65_split_bs( | 31 | [3] = LAYOUT_65_all( |
32 | KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, | 32 | KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, |
33 | KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 33 | KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
diff --git a/keyboards/wilba_tech/zeal65/keymaps/via/keymap.c b/keyboards/wilba_tech/zeal65/keymaps/via/keymap.c new file mode 100644 index 000000000..2c6d24e8f --- /dev/null +++ b/keyboards/wilba_tech/zeal65/keymaps/via/keymap.c | |||
@@ -0,0 +1,38 @@ | |||
1 | // Split-backspace layout for Zeal65 | ||
2 | #include QMK_KEYBOARD_H | ||
3 | |||
4 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
5 | |||
6 | // Default layer | ||
7 | [0] = LAYOUT_65_all( | ||
8 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_HOME, | ||
9 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, | ||
10 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
11 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, | ||
12 | KC_LGUI, KC_LALT, KC_SPC, FN_MO23, FN_MO13, KC_LEFT, KC_DOWN, KC_RGHT), | ||
13 | |||
14 | // Fn1 Layer | ||
15 | [1] = LAYOUT_65_all( | ||
16 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS, | ||
17 | KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
18 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
19 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
20 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
21 | |||
22 | // Fn2 Layer | ||
23 | [2] = LAYOUT_65_all( | ||
24 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
25 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
26 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
27 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
28 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
29 | |||
30 | // Fn3 Layer (zeal60 Configuration) | ||
31 | [3] = LAYOUT_65_all( | ||
32 | KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, | ||
33 | KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
36 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
37 | |||
38 | }; | ||
diff --git a/keyboards/wilba_tech/zeal65/keymaps/via/rules.mk b/keyboards/wilba_tech/zeal65/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/wilba_tech/zeal65/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index 6c8783eb2..94d487cbb 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk | |||
@@ -20,7 +20,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN | |||
20 | # change to "no" to disable the options, or define them in the Makefile in | 20 | # change to "no" to disable the options, or define them in the Makefile in |
21 | # the appropriate keymap folder that will get included automatically | 21 | # the appropriate keymap folder that will get included automatically |
22 | # | 22 | # |
23 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 23 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 24 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 25 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
26 | CONSOLE_ENABLE = no # Console for debug(+400) | 26 | CONSOLE_ENABLE = no # Console for debug(+400) |
@@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | |||
36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 36 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
37 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 37 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
38 | 38 | ||
39 | RAW_ENABLE = yes | ||
40 | DYNAMIC_KEYMAP_ENABLE = yes | ||
41 | CIE1931_CURVE = yes | 39 | CIE1931_CURVE = yes |
42 | 40 | ||
43 | # project specific files | 41 | # project specific files |
diff --git a/keyboards/wilba_tech/zeal65/zeal65.h b/keyboards/wilba_tech/zeal65/zeal65.h index d8528e6c5..34c129416 100644 --- a/keyboards/wilba_tech/zeal65/zeal65.h +++ b/keyboards/wilba_tech/zeal65/zeal65.h | |||
@@ -17,11 +17,11 @@ | |||
17 | 17 | ||
18 | #include "quantum.h" | 18 | #include "quantum.h" |
19 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" | 19 | #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" |
20 | #include "keyboards/wilba_tech/via_keycodes.h" | 20 | #include "via.h" |
21 | 21 | ||
22 | #define XXX KC_NO | 22 | #define XXX KC_NO |
23 | 23 | ||
24 | #define LAYOUT_65_split_bs( \ | 24 | #define LAYOUT_65_all( \ |
25 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K0E, \ | 25 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K0E, \ |
26 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ | 26 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ |
27 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ | 27 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ |
diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index ca056f630..11d28592d 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c | |||
@@ -20,28 +20,37 @@ | |||
20 | #include "progmem.h" // to read default from flash | 20 | #include "progmem.h" // to read default from flash |
21 | #include "quantum.h" // for send_string() | 21 | #include "quantum.h" // for send_string() |
22 | #include "dynamic_keymap.h" | 22 | #include "dynamic_keymap.h" |
23 | 23 | #include "via.h" // for default VIA_EEPROM_ADDR_END | |
24 | #ifdef DYNAMIC_KEYMAP_ENABLE | 24 | |
25 | 25 | #ifndef DYNAMIC_KEYMAP_LAYER_COUNT | |
26 | # ifndef DYNAMIC_KEYMAP_EEPROM_ADDR | 26 | # define DYNAMIC_KEYMAP_LAYER_COUNT 4 |
27 | # error DYNAMIC_KEYMAP_EEPROM_ADDR not defined | 27 | #endif |
28 | # endif | 28 | |
29 | 29 | #ifndef DYNAMIC_KEYMAP_MACRO_COUNT | |
30 | # ifndef DYNAMIC_KEYMAP_LAYER_COUNT | 30 | # define DYNAMIC_KEYMAP_MACRO_COUNT 16 |
31 | # error DYNAMIC_KEYMAP_LAYER_COUNT not defined | 31 | #endif |
32 | # endif | 32 | |
33 | 33 | // If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h, | |
34 | # ifndef DYNAMIC_KEYMAP_MACRO_COUNT | 34 | // default it start after VIA_EEPROM_CUSTOM_ADDR+VIA_EEPROM_CUSTOM_SIZE |
35 | # error DYNAMIC_KEYMAP_MACRO_COUNT not defined | 35 | #ifndef DYNAMIC_KEYMAP_EEPROM_ADDR |
36 | # endif | 36 | # ifdef VIA_EEPROM_CUSTOM_CONFIG_ADDR |
37 | 37 | # define DYNAMIC_KEYMAP_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR+VIA_EEPROM_CUSTOM_CONFIG_SIZE) | |
38 | # ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR | 38 | # else |
39 | # error DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR not defined | 39 | # error DYNAMIC_KEYMAP_EEPROM_ADDR not defined |
40 | # endif | 40 | # endif |
41 | 41 | #endif | |
42 | # ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE | 42 | |
43 | # error DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE not defined | 43 | // Dynamic macro starts after dynamic keymaps |
44 | # endif | 44 | #ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR |
45 | # define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR (DYNAMIC_KEYMAP_EEPROM_ADDR+(DYNAMIC_KEYMAP_LAYER_COUNT*MATRIX_ROWS*MATRIX_COLS*2)) | ||
46 | #endif | ||
47 | |||
48 | // Dynamic macro uses up all remaining memory | ||
49 | // Assumes 1K EEPROM on ATMega32U4 | ||
50 | // Override for anything different | ||
51 | #ifndef DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE | ||
52 | # define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE (1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR) | ||
53 | #endif | ||
45 | 54 | ||
46 | uint8_t dynamic_keymap_get_layer_count(void) { return DYNAMIC_KEYMAP_LAYER_COUNT; } | 55 | uint8_t dynamic_keymap_get_layer_count(void) { return DYNAMIC_KEYMAP_LAYER_COUNT; } |
47 | 56 | ||
@@ -208,5 +217,3 @@ void dynamic_keymap_macro_send(uint8_t id) { | |||
208 | send_string(data); | 217 | send_string(data); |
209 | } | 218 | } |
210 | } | 219 | } |
211 | |||
212 | #endif // DYNAMIC_KEYMAP_ENABLE | ||
diff --git a/quantum/quantum.c b/quantum/quantum.c index 695da5fdc..bf159644a 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
@@ -213,6 +213,9 @@ bool process_record_quantum(keyrecord_t *record) { | |||
213 | #if defined(RGB_MATRIX_ENABLE) | 213 | #if defined(RGB_MATRIX_ENABLE) |
214 | process_rgb_matrix(keycode, record) && | 214 | process_rgb_matrix(keycode, record) && |
215 | #endif | 215 | #endif |
216 | #if defined(VIA_ENABLE) | ||
217 | process_record_via(keycode, record) && | ||
218 | #endif | ||
216 | process_record_kb(keycode, record) && | 219 | process_record_kb(keycode, record) && |
217 | #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) | 220 | #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) |
218 | process_midi(keycode, record) && | 221 | process_midi(keycode, record) && |
@@ -560,9 +563,7 @@ __attribute__((weak)) void bootmagic_lite(void) { | |||
560 | 563 | ||
561 | // We need multiple scans because debouncing can't be turned off. | 564 | // We need multiple scans because debouncing can't be turned off. |
562 | matrix_scan(); | 565 | matrix_scan(); |
563 | #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 | 566 | #if defined(DEBOUNCE) && DEBOUNCE > 0 |
564 | wait_ms(DEBOUNCING_DELAY * 2); | ||
565 | #elif defined(DEBOUNCE) && DEBOUNCE > 0 | ||
566 | wait_ms(DEBOUNCE * 2); | 567 | wait_ms(DEBOUNCE * 2); |
567 | #else | 568 | #else |
568 | wait_ms(30); | 569 | wait_ms(30); |
diff --git a/quantum/quantum.h b/quantum/quantum.h index 053b33b91..9758374f6 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
@@ -162,6 +162,14 @@ extern layer_state_t layer_state; | |||
162 | # include "process_dynamic_macro.h" | 162 | # include "process_dynamic_macro.h" |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | #ifdef DYNAMIC_KEYMAP_ENABLE | ||
166 | # include "dynamic_keymap.h" | ||
167 | #endif | ||
168 | |||
169 | #ifdef VIA_ENABLE | ||
170 | # include "via.h" | ||
171 | #endif | ||
172 | |||
165 | // Function substitutions to ease GPIO manipulation | 173 | // Function substitutions to ease GPIO manipulation |
166 | #if defined(__AVR__) | 174 | #if defined(__AVR__) |
167 | typedef uint8_t pin_t; | 175 | typedef uint8_t pin_t; |
diff --git a/quantum/via.c b/quantum/via.c new file mode 100644 index 000000000..64b05324a --- /dev/null +++ b/quantum/via.c | |||
@@ -0,0 +1,400 @@ | |||
1 | /* Copyright 2019 Jason Williams (Wilba) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #ifndef RAW_ENABLE | ||
18 | # error "RAW_ENABLE is not enabled" | ||
19 | #endif | ||
20 | |||
21 | #ifndef DYNAMIC_KEYMAP_ENABLE | ||
22 | # error "DYNAMIC_KEYMAP_ENABLE is not enabled" | ||
23 | #endif | ||
24 | |||
25 | #include "quantum.h" | ||
26 | |||
27 | #include "via.h" | ||
28 | #include "raw_hid.h" | ||
29 | #include "dynamic_keymap.h" | ||
30 | #include "tmk_core/common/eeprom.h" | ||
31 | #include "version.h" // for QMK_BUILDDATE used in EEPROM magic | ||
32 | |||
33 | // Can be called in an overriding via_init_kb() to test if keyboard level code usage of | ||
34 | // EEPROM is invalid and use/save defaults. | ||
35 | bool via_eeprom_is_valid(void) | ||
36 | { | ||
37 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
38 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
39 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
40 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
41 | |||
42 | return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 && | ||
43 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 && | ||
44 | eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 ); | ||
45 | } | ||
46 | |||
47 | // Sets VIA/keyboard level usage of EEPROM to valid/invalid | ||
48 | // Keyboard level code (eg. via_init_kb()) should not call this | ||
49 | void via_eeprom_set_valid(bool valid) | ||
50 | { | ||
51 | char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" | ||
52 | uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); | ||
53 | uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); | ||
54 | uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); | ||
55 | |||
56 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF); | ||
57 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF); | ||
58 | eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF); | ||
59 | } | ||
60 | |||
61 | // Flag QMK and VIA/keyboard level EEPROM as invalid. | ||
62 | // Used in bootmagic_lite() and VIA command handler. | ||
63 | // Keyboard level code should not need to call this. | ||
64 | void via_eeprom_reset(void) | ||
65 | { | ||
66 | // Set the VIA specific EEPROM state as invalid. | ||
67 | via_eeprom_set_valid(false); | ||
68 | // Set the TMK/QMK EEPROM state as invalid. | ||
69 | eeconfig_disable(); | ||
70 | } | ||
71 | |||
72 | // Override bootmagic_lite() so it can flag EEPROM as invalid | ||
73 | // as well as jump to bootloader, thus performing a "factory reset" | ||
74 | // of dynamic keymaps and optionally backlight/other settings. | ||
75 | void bootmagic_lite(void) | ||
76 | { | ||
77 | // The lite version of TMK's bootmagic based on Wilba. | ||
78 | // 100% less potential for accidentally making the | ||
79 | // keyboard do stupid things. | ||
80 | |||
81 | // We need multiple scans because debouncing can't be turned off. | ||
82 | matrix_scan(); | ||
83 | #if defined(DEBOUNCE) && DEBOUNCE > 0 | ||
84 | wait_ms(DEBOUNCE * 2); | ||
85 | #else | ||
86 | wait_ms(30); | ||
87 | #endif | ||
88 | matrix_scan(); | ||
89 | |||
90 | // If the Esc and space bar are held down on power up, | ||
91 | // reset the EEPROM valid state and jump to bootloader. | ||
92 | // Assumes Esc is at [0,0]. | ||
93 | // This isn't very generalized, but we need something that doesn't | ||
94 | // rely on user's keymaps in firmware or EEPROM. | ||
95 | if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { | ||
96 | // This is the only difference from the default implementation. | ||
97 | via_eeprom_reset(); | ||
98 | // Jump to bootloader. | ||
99 | bootloader_jump(); | ||
100 | } | ||
101 | } | ||
102 | |||
103 | // Override this at the keyboard code level to check | ||
104 | // VIA's EEPROM valid state and reset to defaults as needed. | ||
105 | // Used by keyboards that store their own state in EEPROM, | ||
106 | // for backlight, rotary encoders, etc. | ||
107 | // The override should not set via_eeprom_set_valid(true) as | ||
108 | // the caller also needs to check the valid state. | ||
109 | __attribute__((weak)) void via_init_kb(void) { | ||
110 | } | ||
111 | |||
112 | // Called by QMK core to initialize dynamic keymaps etc. | ||
113 | void via_init(void) | ||
114 | { | ||
115 | // Let keyboard level test EEPROM valid state, | ||
116 | // but not set it valid, it is done here. | ||
117 | via_init_kb(); | ||
118 | |||
119 | // If the EEPROM has the magic, the data is good. | ||
120 | // OK to load from EEPROM. | ||
121 | if (via_eeprom_is_valid()) { | ||
122 | } else { | ||
123 | // This resets the layout options | ||
124 | via_set_layout_options(0); | ||
125 | // This resets the keymaps in EEPROM to what is in flash. | ||
126 | dynamic_keymap_reset(); | ||
127 | // This resets the macros in EEPROM to nothing. | ||
128 | dynamic_keymap_macro_reset(); | ||
129 | // Save the magic number last, in case saving was interrupted | ||
130 | via_eeprom_set_valid(true); | ||
131 | } | ||
132 | } | ||
133 | |||
134 | // This is generalized so the layout options EEPROM usage can be | ||
135 | // variable, between 1 and 4 bytes. | ||
136 | uint32_t via_get_layout_options(void) | ||
137 | { | ||
138 | uint32_t value = 0; | ||
139 | // Start at the most significant byte | ||
140 | void * source = (void *)(VIA_EEPROM_LAYOUT_OPTIONS_ADDR); | ||
141 | for ( uint8_t i = 0; i < VIA_EEPROM_LAYOUT_OPTIONS_SIZE; i++ ) { | ||
142 | value = value << 8; | ||
143 | value |= eeprom_read_byte(source); | ||
144 | source++; | ||
145 | } | ||
146 | return value; | ||
147 | } | ||
148 | |||
149 | void via_set_layout_options(uint32_t value) | ||
150 | { | ||
151 | // Start at the least significant byte | ||
152 | void * target = (void *)(VIA_EEPROM_LAYOUT_OPTIONS_ADDR+VIA_EEPROM_LAYOUT_OPTIONS_SIZE-1); | ||
153 | for ( uint8_t i = 0; i < VIA_EEPROM_LAYOUT_OPTIONS_SIZE; i++ ) { | ||
154 | eeprom_update_byte(target, value & 0xFF ); | ||
155 | value = value >> 8; | ||
156 | target--; | ||
157 | } | ||
158 | } | ||
159 | |||
160 | // Called by QMK core to process VIA-specific keycodes. | ||
161 | bool process_record_via(uint16_t keycode, keyrecord_t *record) | ||
162 | { | ||
163 | // Handle macros | ||
164 | if (record->event.pressed) { | ||
165 | if ( keycode >= MACRO00 && keycode <= MACRO15 ) | ||
166 | { | ||
167 | uint8_t id = keycode - MACRO00; | ||
168 | dynamic_keymap_macro_send(id); | ||
169 | return false; | ||
170 | } | ||
171 | } | ||
172 | |||
173 | // TODO: ideally this would be generalized and refactored into | ||
174 | // QMK core as advanced keycodes, until then, the simple case | ||
175 | // can be available here to keyboards using VIA | ||
176 | switch(keycode) { | ||
177 | case FN_MO13: | ||
178 | if (record->event.pressed) { | ||
179 | layer_on(1); | ||
180 | update_tri_layer(1, 2, 3); | ||
181 | } else { | ||
182 | layer_off(1); | ||
183 | update_tri_layer(1, 2, 3); | ||
184 | } | ||
185 | return false; | ||
186 | break; | ||
187 | case FN_MO23: | ||
188 | if (record->event.pressed) { | ||
189 | layer_on(2); | ||
190 | update_tri_layer(1, 2, 3); | ||
191 | } else { | ||
192 | layer_off(2); | ||
193 | update_tri_layer(1, 2, 3); | ||
194 | } | ||
195 | return false; | ||
196 | break; | ||
197 | } | ||
198 | return true; | ||
199 | } | ||
200 | |||
201 | // Keyboard level code can override this to handle custom messages from VIA. | ||
202 | // See raw_hid_receive() implementation. | ||
203 | // DO NOT call raw_hid_send() in the overide function. | ||
204 | __attribute__((weak)) void raw_hid_receive_kb(uint8_t *data, uint8_t length) { | ||
205 | uint8_t *command_id = &(data[0]); | ||
206 | *command_id = id_unhandled; | ||
207 | } | ||
208 | |||
209 | // VIA handles received HID messages first, and will route to | ||
210 | // raw_hid_receive_kb() for command IDs that are not handled here. | ||
211 | // This gives the keyboard code level the ability to handle the command | ||
212 | // specifically. | ||
213 | // | ||
214 | // raw_hid_send() is called at the end, with the same buffer, which was | ||
215 | // possibly modified with returned values. | ||
216 | void raw_hid_receive( uint8_t *data, uint8_t length ) | ||
217 | { | ||
218 | uint8_t *command_id = &(data[0]); | ||
219 | uint8_t *command_data = &(data[1]); | ||
220 | switch ( *command_id ) | ||
221 | { | ||
222 | case id_get_protocol_version: | ||
223 | { | ||
224 | command_data[0] = VIA_PROTOCOL_VERSION >> 8; | ||
225 | command_data[1] = VIA_PROTOCOL_VERSION & 0xFF; | ||
226 | break; | ||
227 | } | ||
228 | case id_get_keyboard_value: | ||
229 | { | ||
230 | switch ( command_data[0] ) | ||
231 | { | ||
232 | case id_uptime: | ||
233 | { | ||
234 | uint32_t value = timer_read32(); | ||
235 | command_data[1] = (value >> 24 ) & 0xFF; | ||
236 | command_data[2] = (value >> 16 ) & 0xFF; | ||
237 | command_data[3] = (value >> 8 ) & 0xFF; | ||
238 | command_data[4] = value & 0xFF; | ||
239 | break; | ||
240 | } | ||
241 | case id_layout_options: | ||
242 | { | ||
243 | uint32_t value = via_get_layout_options(); | ||
244 | command_data[1] = (value >> 24 ) & 0xFF; | ||
245 | command_data[2] = (value >> 16 ) & 0xFF; | ||
246 | command_data[3] = (value >> 8 ) & 0xFF; | ||
247 | command_data[4] = value & 0xFF; | ||
248 | break; | ||
249 | } | ||
250 | case id_switch_matrix_state: | ||
251 | { | ||
252 | #if ( (MATRIX_COLS/8+1)*MATRIX_ROWS <= 28 ) | ||
253 | uint8_t i = 1; | ||
254 | for ( uint8_t row=0; row<MATRIX_ROWS; row++ ) { | ||
255 | matrix_row_t value = matrix_get_row(row); | ||
256 | #if (MATRIX_COLS > 24) | ||
257 | command_data[i++] = (value >> 24 ) & 0xFF; | ||
258 | #endif | ||
259 | #if (MATRIX_COLS > 16) | ||
260 | command_data[i++] = (value >> 16 ) & 0xFF; | ||
261 | #endif | ||
262 | #if (MATRIX_COLS > 8) | ||
263 | command_data[i++] = (value >> 8 ) & 0xFF; | ||
264 | #endif | ||
265 | command_data[i++] = value & 0xFF; | ||
266 | } | ||
267 | #endif | ||
268 | break; | ||
269 | } | ||
270 | default: | ||
271 | { | ||
272 | raw_hid_receive_kb(data,length); | ||
273 | break; | ||
274 | } | ||
275 | } | ||
276 | break; | ||
277 | } | ||
278 | case id_set_keyboard_value: | ||
279 | { | ||
280 | switch ( command_data[0] ) | ||
281 | { | ||
282 | case id_layout_options: | ||
283 | { | ||
284 | uint32_t value = ( (uint32_t)command_data[1] << 24 ) | | ||
285 | ( (uint32_t)command_data[2] << 16 ) | | ||
286 | ( (uint32_t)command_data[3] << 8 ) | | ||
287 | (uint32_t)command_data[4]; | ||
288 | via_set_layout_options(value); | ||
289 | break; | ||
290 | } | ||
291 | default: | ||
292 | { | ||
293 | raw_hid_receive_kb(data,length); | ||
294 | break; | ||
295 | } | ||
296 | } | ||
297 | break; | ||
298 | } | ||
299 | case id_dynamic_keymap_get_keycode: | ||
300 | { | ||
301 | uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); | ||
302 | command_data[3] = keycode >> 8; | ||
303 | command_data[4] = keycode & 0xFF; | ||
304 | break; | ||
305 | } | ||
306 | case id_dynamic_keymap_set_keycode: | ||
307 | { | ||
308 | dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); | ||
309 | break; | ||
310 | } | ||
311 | case id_dynamic_keymap_reset: | ||
312 | { | ||
313 | dynamic_keymap_reset(); | ||
314 | break; | ||
315 | } | ||
316 | case id_backlight_config_set_value: | ||
317 | case id_backlight_config_get_value: | ||
318 | case id_backlight_config_save: | ||
319 | { | ||
320 | raw_hid_receive_kb(data, length); | ||
321 | break; | ||
322 | } | ||
323 | case id_dynamic_keymap_macro_get_count: | ||
324 | { | ||
325 | command_data[0] = dynamic_keymap_macro_get_count(); | ||
326 | break; | ||
327 | } | ||
328 | case id_dynamic_keymap_macro_get_buffer_size: | ||
329 | { | ||
330 | uint16_t size = dynamic_keymap_macro_get_buffer_size(); | ||
331 | command_data[0] = size >> 8; | ||
332 | command_data[1] = size & 0xFF; | ||
333 | break; | ||
334 | } | ||
335 | case id_dynamic_keymap_macro_get_buffer: | ||
336 | { | ||
337 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
338 | uint16_t size = command_data[2]; // size <= 28 | ||
339 | dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); | ||
340 | break; | ||
341 | } | ||
342 | case id_dynamic_keymap_macro_set_buffer: | ||
343 | { | ||
344 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
345 | uint16_t size = command_data[2]; // size <= 28 | ||
346 | dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); | ||
347 | break; | ||
348 | } | ||
349 | case id_dynamic_keymap_macro_reset: | ||
350 | { | ||
351 | dynamic_keymap_macro_reset(); | ||
352 | break; | ||
353 | } | ||
354 | case id_dynamic_keymap_get_layer_count: | ||
355 | { | ||
356 | command_data[0] = dynamic_keymap_get_layer_count(); | ||
357 | break; | ||
358 | } | ||
359 | case id_dynamic_keymap_get_buffer: | ||
360 | { | ||
361 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
362 | uint16_t size = command_data[2]; // size <= 28 | ||
363 | dynamic_keymap_get_buffer( offset, size, &command_data[3] ); | ||
364 | break; | ||
365 | } | ||
366 | case id_dynamic_keymap_set_buffer: | ||
367 | { | ||
368 | uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; | ||
369 | uint16_t size = command_data[2]; // size <= 28 | ||
370 | dynamic_keymap_set_buffer( offset, size, &command_data[3] ); | ||
371 | break; | ||
372 | } | ||
373 | case id_eeprom_reset: | ||
374 | { | ||
375 | via_eeprom_reset(); | ||
376 | break; | ||
377 | } | ||
378 | case id_bootloader_jump: | ||
379 | { | ||
380 | // Need to send data back before the jump | ||
381 | // Informs host that the command is handled | ||
382 | raw_hid_send( data, length ); | ||
383 | // Give host time to read it | ||
384 | wait_ms(100); | ||
385 | bootloader_jump(); | ||
386 | break; | ||
387 | } | ||
388 | default: | ||
389 | { | ||
390 | // The command ID is not known | ||
391 | // Return the unhandled state | ||
392 | *command_id = id_unhandled; | ||
393 | break; | ||
394 | } | ||
395 | } | ||
396 | |||
397 | // Return the same buffer, optionally with values changed | ||
398 | // (i.e. returning state to the host, or the unhandled state). | ||
399 | raw_hid_send( data, length ); | ||
400 | } | ||
diff --git a/quantum/via.h b/quantum/via.h new file mode 100644 index 000000000..f9a8017b2 --- /dev/null +++ b/quantum/via.h | |||
@@ -0,0 +1,151 @@ | |||
1 | /* Copyright 2019 Jason Williams (Wilba) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include <tmk_core/common/eeconfig.h> // for EECONFIG_SIZE | ||
20 | |||
21 | // Keyboard level code can change where VIA stores the magic. | ||
22 | // The magic is the build date YYMMDD encoded as BCD in 3 bytes, | ||
23 | // thus installing firmware built on a different date to the one | ||
24 | // already installed can be detected and the EEPROM data is reset. | ||
25 | // The only reason this is important is in case EEPROM usage changes | ||
26 | // and the EEPROM was not explicitly reset by bootmagic lite. | ||
27 | #ifndef VIA_EEPROM_MAGIC_ADDR | ||
28 | # define VIA_EEPROM_MAGIC_ADDR (EECONFIG_SIZE) | ||
29 | #endif | ||
30 | |||
31 | #define VIA_EEPROM_LAYOUT_OPTIONS_ADDR (VIA_EEPROM_MAGIC_ADDR+3) | ||
32 | |||
33 | // Changing the layout options size after release will invalidate EEPROM, | ||
34 | // but this is something that should be set correctly on initial implementation. | ||
35 | // 1 byte is enough for most uses (i.e. 8 binary states, or 6 binary + 1 ternary/quaternary ) | ||
36 | #ifndef VIA_EEPROM_LAYOUT_OPTIONS_SIZE | ||
37 | # define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 1 | ||
38 | #endif | ||
39 | |||
40 | // The end of the EEPROM memory used by VIA | ||
41 | // By default, dynamic keymaps will start at this if there is no | ||
42 | // custom config | ||
43 | #define VIA_EEPROM_CUSTOM_CONFIG_ADDR (VIA_EEPROM_LAYOUT_OPTIONS_ADDR+VIA_EEPROM_LAYOUT_OPTIONS_SIZE) | ||
44 | |||
45 | #ifndef VIA_EEPROM_CUSTOM_CONFIG_SIZE | ||
46 | # define VIA_EEPROM_CUSTOM_CONFIG_SIZE 0 | ||
47 | #endif | ||
48 | |||
49 | // This is changed only when the command IDs change, | ||
50 | // so VIA Configurator can detect compatible firmware. | ||
51 | #define VIA_PROTOCOL_VERSION 0x0009 | ||
52 | |||
53 | enum via_command_id | ||
54 | { | ||
55 | id_get_protocol_version = 0x01, // always 0x01 | ||
56 | id_get_keyboard_value, | ||
57 | id_set_keyboard_value, | ||
58 | id_dynamic_keymap_get_keycode, | ||
59 | id_dynamic_keymap_set_keycode, | ||
60 | id_dynamic_keymap_reset, | ||
61 | id_backlight_config_set_value, | ||
62 | id_backlight_config_get_value, | ||
63 | id_backlight_config_save, | ||
64 | id_eeprom_reset, | ||
65 | id_bootloader_jump, | ||
66 | id_dynamic_keymap_macro_get_count, | ||
67 | id_dynamic_keymap_macro_get_buffer_size, | ||
68 | id_dynamic_keymap_macro_get_buffer, | ||
69 | id_dynamic_keymap_macro_set_buffer, | ||
70 | id_dynamic_keymap_macro_reset, | ||
71 | id_dynamic_keymap_get_layer_count, | ||
72 | id_dynamic_keymap_get_buffer, | ||
73 | id_dynamic_keymap_set_buffer, | ||
74 | id_unhandled = 0xFF, | ||
75 | }; | ||
76 | |||
77 | enum via_keyboard_value_id | ||
78 | { | ||
79 | id_uptime = 0x01, | ||
80 | id_layout_options, | ||
81 | id_switch_matrix_state | ||
82 | }; | ||
83 | |||
84 | // Can't use SAFE_RANGE here, it might change if someone adds | ||
85 | // new values to enum quantum_keycodes. | ||
86 | // Need to keep checking 0x5F10 is still in the safe range. | ||
87 | // TODO: merge this into quantum_keycodes | ||
88 | // Backlight keycodes are in range 0x5F00-0x5F0F | ||
89 | enum via_keycodes { | ||
90 | FN_MO13 = 0x5F10, | ||
91 | FN_MO23, | ||
92 | MACRO00, | ||
93 | MACRO01, | ||
94 | MACRO02, | ||
95 | MACRO03, | ||
96 | MACRO04, | ||
97 | MACRO05, | ||
98 | MACRO06, | ||
99 | MACRO07, | ||
100 | MACRO08, | ||
101 | MACRO09, | ||
102 | MACRO10, | ||
103 | MACRO11, | ||
104 | MACRO12, | ||
105 | MACRO13, | ||
106 | MACRO14, | ||
107 | MACRO15, | ||
108 | }; | ||
109 | |||
110 | enum user_keycodes { | ||
111 | USER00 = 0x5F80, | ||
112 | USER01, | ||
113 | USER02, | ||
114 | USER03, | ||
115 | USER04, | ||
116 | USER05, | ||
117 | USER06, | ||
118 | USER07, | ||
119 | USER08, | ||
120 | USER09, | ||
121 | USER10, | ||
122 | USER11, | ||
123 | USER12, | ||
124 | USER13, | ||
125 | USER14, | ||
126 | USER15, | ||
127 | }; | ||
128 | |||
129 | // Can be called in an overriding via_init_kb() to test if keyboard level code usage of | ||
130 | // EEPROM is invalid and use/save defaults. | ||
131 | bool via_eeprom_is_valid(void); | ||
132 | |||
133 | // Sets VIA/keyboard level usage of EEPROM to valid/invalid | ||
134 | // Keyboard level code (eg. via_init_kb()) should not call this | ||
135 | void via_eeprom_set_valid(bool valid); | ||
136 | |||
137 | // Flag QMK and VIA/keyboard level EEPROM as invalid. | ||
138 | // Used in bootmagic_lite() and VIA command handler. | ||
139 | // Keyboard level code should not need to call this. | ||
140 | void via_eeprom_reset(void); | ||
141 | |||
142 | // Called by QMK core to initialize dynamic keymaps etc. | ||
143 | void via_init(void); | ||
144 | |||
145 | // Used by VIA to store and retrieve the layout options. | ||
146 | uint32_t via_get_layout_options(void); | ||
147 | void via_set_layout_options(uint32_t value); | ||
148 | |||
149 | // Called by QMK core to process VIA-specific keycodes. | ||
150 | bool process_record_via(uint16_t keycode, keyrecord_t *record); | ||
151 | |||
diff --git a/show_options.mk b/show_options.mk index 63ab3b0d7..003169d4c 100644 --- a/show_options.mk +++ b/show_options.mk | |||
@@ -10,7 +10,8 @@ BUILD_OPTION_NAMES = \ | |||
10 | DEBOUNCE_TYPE \ | 10 | DEBOUNCE_TYPE \ |
11 | SPLIT_KEYBOARD \ | 11 | SPLIT_KEYBOARD \ |
12 | DYNAMIC_KEYMAP_ENABLE \ | 12 | DYNAMIC_KEYMAP_ENABLE \ |
13 | USB_HID_ENABLE | 13 | USB_HID_ENABLE \ |
14 | VIA_ENABLE | ||
14 | 15 | ||
15 | HARDWARE_OPTION_NAMES = \ | 16 | HARDWARE_OPTION_NAMES = \ |
16 | SLEEP_LED_ENABLE \ | 17 | SLEEP_LED_ENABLE \ |
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 308f865e1..6fbe78903 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h | |||
@@ -48,6 +48,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
48 | #define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32 | 48 | #define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32 |
49 | // TODO: Combine these into a single word and single block of EEPROM | 49 | // TODO: Combine these into a single word and single block of EEPROM |
50 | #define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)33 | 50 | #define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)33 |
51 | // Size of EEPROM being used, other code can refer to this for available EEPROM | ||
52 | #define EECONFIG_SIZE 34 | ||
51 | /* debug bit */ | 53 | /* debug bit */ |
52 | #define EECONFIG_DEBUG_ENABLE (1 << 0) | 54 | #define EECONFIG_DEBUG_ENABLE (1 << 0) |
53 | #define EECONFIG_DEBUG_MATRIX (1 << 1) | 55 | #define EECONFIG_DEBUG_MATRIX (1 << 1) |
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index af2b2fd48..794a9152f 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c | |||
@@ -83,6 +83,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
83 | #ifdef VELOCIKEY_ENABLE | 83 | #ifdef VELOCIKEY_ENABLE |
84 | # include "velocikey.h" | 84 | # include "velocikey.h" |
85 | #endif | 85 | #endif |
86 | #ifdef VIA_ENABLE | ||
87 | # include "via.h" | ||
88 | #endif | ||
86 | 89 | ||
87 | // Only enable this if console is enabled to print to | 90 | // Only enable this if console is enabled to print to |
88 | #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) | 91 | #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) |
@@ -217,6 +220,9 @@ __attribute__((weak)) bool is_keyboard_master(void) { return true; } | |||
217 | void keyboard_init(void) { | 220 | void keyboard_init(void) { |
218 | timer_init(); | 221 | timer_init(); |
219 | matrix_init(); | 222 | matrix_init(); |
223 | #ifdef VIA_ENABLE | ||
224 | via_init(); | ||
225 | #endif | ||
220 | #ifdef QWIIC_ENABLE | 226 | #ifdef QWIIC_ENABLE |
221 | qwiic_init(); | 227 | qwiic_init(); |
222 | #endif | 228 | #endif |