diff options
| author | Wilba <Jason.S.Williams@gmail.com> | 2020-01-04 07:52:00 +1100 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2020-01-03 12:52:00 -0800 |
| commit | 320822d75b785401809f45007320e6fb6885b3fd (patch) | |
| tree | c511d49a48b953ac29ffb4a51ac928319eb9fde4 /keyboards/wilba_tech | |
| parent | b36259566546eb884cc241bcfadb671051e5e75e (diff) | |
| download | qmk_firmware-320822d75b785401809f45007320e6fb6885b3fd.tar.gz qmk_firmware-320822d75b785401809f45007320e6fb6885b3fd.zip | |
VIA Configurator Refactor (#7268)
* VIA Refactor
* Remove old code
* review changes
* review changes
* Fix cannonkeys/satisfaction75/prototype:via build
* Add via.h to quantum.h
* Move backlight init to after backlight config load
* Merge branch 'master' into via_refactor_pr
* Update user's rules.mk to new way of enabling VIA
* Added id_switch_matrix_state
* Review changes
Diffstat (limited to 'keyboards/wilba_tech')
76 files changed, 477 insertions, 997 deletions
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, \ |
