diff options
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 f3e21aa15f..9cbbd6620b 100644 --- a/keyboards/wilba_tech/rama_works_koyu/config.h +++ b/keyboards/wilba_tech/rama_works_koyu/config.h @@ -18,7 +18,7 @@ #include "config_common.h" // USB Device descriptor parameter -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x4B59 // "KY" #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -119,24 +119,6 @@ #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
\ No newline at end of file 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 0000000000..f6bc94fbd6 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + 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, + 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, + 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, + 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, + MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + 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, + 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, + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/rama_works_koyu/keymaps/via/rules.mk b/keyboards/wilba_tech/rama_works_koyu/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /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 f51bc5c613..b9c033e095 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 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define ____ KC_NO diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index cf6a8a96a0..80a3b32b2b 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 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # 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 f72ecae85c..d2e67e0c97 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 along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x00AB // 10-B #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -180,25 +179,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*10*2)) = (37+80) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 117 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 907 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 - -#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 7c3ec9601d..511dc9537e 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 @@ #include "../../config.h" +#undef VIA_ENABLE #undef RAW_ENABLE #undef DYNAMIC_KEYMAP_ENABLE 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 0000000000..8c97a5cfb6 --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/via/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + 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 ), + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + LAYOUT( + 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/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 0000000000..1e5b99807c --- /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 07372d0ac2..e970f6c7a2 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 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -29,9 +29,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - -# project specific files -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 1ee76750c1..8381a4db00 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 @@ #include "config_common.h" // USB Device descriptor parameter -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x060A // 60-A #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -116,24 +116,6 @@ #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 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 0000000000..7b6d9b756c --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m60_a/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +// M60-A layout +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_60_hhkb( + 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_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_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_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, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO23), + +// Fn1 Layer +[1] = LAYOUT_60_hhkb( + 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_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, + 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, + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_60_hhkb( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_60_hhkb( + 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/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 0000000000..1e5b99807c --- /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 01e096fee6..2c690122ba 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 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define XXX KC_NO diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index 1dec6c074f..e4e934bdba 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 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes 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 07396450d6..1a61604bb4 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 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x006A // 6-A #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -103,27 +103,9 @@ #define RGB_BACKLIGHT_ENABLED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - // NOTE: M6-A doesn't use RGB backlight, but we keep this // consistent with M6-B which does. -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+43) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 80 -// Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 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 0000000000..7a408fa8aa --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; + 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 0000000000..1e5b99807c --- /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 5feee31120..26185cb38f 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 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -34,10 +34,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -CIE1931_CURVE = no - -# project specific files -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 535c64b80f..3ebfd80dab 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 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x006B // 6-B #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -149,24 +149,6 @@ #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+43) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 80 -// Dynamic macro starts after dynamic keymaps (80+(4*6*2)) = (80+48) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 128 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 896 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 43 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 0000000000..7a408fa8aa --- /dev/null +++ b/keyboards/wilba_tech/rama_works_m6_b/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; + 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 0000000000..1e5b99807c --- /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 4c14af06c4..05212a3be2 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 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -35,8 +35,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # 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 d0bf0ed1e3..748b2cb291 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 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5241 // "RW" +#define VENDOR_ID 0x5241 // "RA" #define PRODUCT_ID 0x080A // 80-A #define DEVICE_VER 0x0001 #define MANUFACTURER RAMA WORKS @@ -232,25 +232,6 @@ #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x07 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*6*17*2)) = (68+816) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 884 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 140 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 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 0000000000..548843427c --- /dev/null +++ b/keyboards/wilba_tech/rama_works_u80_a/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + 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, + 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, + 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, + 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, + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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, + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/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 0000000000..1e5b99807c --- /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 c057db4ccd..c5380e4a6b 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 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define ____ KC_NO diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index 0f02cd04f3..443776d4a3 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 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -29,9 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # project specific files diff --git a/keyboards/wilba_tech/via_api.h b/keyboards/wilba_tech/via_api.h deleted file mode 100644 index f04bb1b46a..0000000000 --- a/keyboards/wilba_tech/via_api.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -#define PROTOCOL_VERSION 0x0008 - -enum via_command_id -{ - id_get_protocol_version = 0x01, // always 0x01 - id_get_keyboard_value, - id_set_keyboard_value, - id_dynamic_keymap_get_keycode, - id_dynamic_keymap_set_keycode, - id_dynamic_keymap_reset, - id_backlight_config_set_value, - id_backlight_config_get_value, - id_backlight_config_save, - id_eeprom_reset, - id_bootloader_jump, - id_dynamic_keymap_macro_get_count, - id_dynamic_keymap_macro_get_buffer_size, - id_dynamic_keymap_macro_get_buffer, - id_dynamic_keymap_macro_set_buffer, - id_dynamic_keymap_macro_reset, - id_dynamic_keymap_get_layer_count, - id_dynamic_keymap_get_buffer, - id_dynamic_keymap_set_buffer, - id_unhandled = 0xFF, -}; - -enum via_keyboard_value_id -{ - id_uptime = 0x01, - id_firmware_version -}; - diff --git a/keyboards/wilba_tech/via_keycodes.h b/keyboards/wilba_tech/via_keycodes.h deleted file mode 100644 index bed48d64b0..0000000000 --- a/keyboards/wilba_tech/via_keycodes.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright 2017 Jason Williams (Wilba) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#pragma once - -// Can't use SAFE_RANGE here, it might change if someone adds -// new values to enum quantum_keycodes. -// Need to keep checking 0x5F10 is still in the safe range. -// TODO: merge this into quantum_keycodes -// Backlight keycodes are in range 0x5F00-0x5F0F -enum via_keycodes { - FN_MO13 = 0x5F10, - FN_MO23, - MACRO00, - MACRO01, - MACRO02, - MACRO03, - MACRO04, - MACRO05, - MACRO06, - MACRO07, - MACRO08, - MACRO09, - MACRO10, - MACRO11, - MACRO12, - MACRO13, - MACRO14, - MACRO15, -}; - -enum user_keycodes { - USER00 = 0x5F80, - USER01, - USER02, - USER03, - USER04, - USER05, - USER06, - USER07, - USER08, - USER09, - USER10, - USER11, - USER12, - USER13, - USER14, - USER15, -}; - -// VIA specific "action functions", introduced with Zeal60 -// These are only valid IDs in action_function() -// Use FN_TT13, FN_TT23, etc. in keymaps -enum via_action_functions { - TRIPLE_TAP_1_3 = 0x31, - TRIPLE_TAP_2_3 = 0x32 -}; - -// Bitwise OR the above with 0x0F00 to use in F(x) macro -// This reserves the top 256 of the 4096 range of F(x) keycodes, -// leaving the rest for use in fn_actions[] or actions in EEPROM. -#define FN_TT13 F((0x0F00|TRIPLE_TAP_1_3)) -#define FN_TT23 F((0x0F00|TRIPLE_TAP_2_3)) - -#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 6e1e0e81cc..269afbcb8b 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -200,24 +200,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*5*14*2)) = (44+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 604 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 420 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk index 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 111c94ee80..c59e94e83c 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 066465d424..acb69ba042 100644 --- a/keyboards/wilba_tech/wt60_d/config.h +++ b/keyboards/wilba_tech/wt60_d/config.h @@ -178,23 +178,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*14*2)) = (37+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 597 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 427 -#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 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt60_d/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index 07372d0ac2..a5c98a1c60 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -29,9 +29,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes - -# project specific files -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 ccff6d62c9..52a7733683 100644 --- a/keyboards/wilba_tech/wt60_d/wt60_d.c +++ b/keyboards/wilba_tech/wt60_d/wt60_d.c @@ -1,17 +1 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -// Nothing to see here, move along... ;-) +#include "wt60_d.h" diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 9d67c317b2..ad4c120f4d 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -197,24 +197,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk index 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 111c94ee80..c59e94e83c 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 8b2437fc92..f98fa4e729 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -197,24 +197,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*5*15*2)) = (44+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 644 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 380 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk index 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt65_b/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index 111c94ee80..c59e94e83c 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 57546cb491..b107453441 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -178,26 +178,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -// Does not use WT_MONO_BACKLIGHT -//#define WT_MONO_BACKLIGHT - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*5*17*2)) = (37+680) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 717 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 307 -#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 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index 7d1c2aa1b1..25f3ecbf19 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 f63bbf69c7..0c0a2ff082 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -200,24 +200,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*15*2)) = (44+720) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 764 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 260 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk index 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index 111c94ee80..c59e94e83c 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 b173b02417..0c7b3dbfad 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -200,24 +200,7 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk index 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_b/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index 111c94ee80..c59e94e83c 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 7105998774..b84f2444d8 100644 --- a/keyboards/wilba_tech/wt75_c/config.h +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -198,26 +198,9 @@ #define MONO_BACKLIGHT_EFFECT 1 // the default effect speed (0-3) -#define MONO_BACKLIGHT_EFFECT_SPEED 0 - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*16*2)) = (44+768) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 812 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 212 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +#define MONO_BACKLIGHT_EFFECT_SPEED 000 + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 + diff --git a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk index 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt75_c/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk index 111c94ee80..c59e94e83c 100644 --- a/keyboards/wilba_tech/wt75_c/rules.mk +++ b/keyboards/wilba_tech/wt75_c/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 15dac9047f..b706956ef9 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -197,24 +197,6 @@ // the default effect speed (0-3) #define MONO_BACKLIGHT_EFFECT_SPEED 0 -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x4520 -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+7) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 44 -// Dynamic macro starts after dynamic keymaps (44+(4*6*17*2)) = (44+816) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 860 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 164 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 7 diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk index 4880a57bec..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -1,2 +1 @@ -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 111c94ee80..c59e94e83c 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 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 08556650da..9af0d00507 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -90,26 +90,3 @@ * */ //#define FORCE_NKRO - -// Does not use WT_MONO_BACKLIGHT -// #define WT_MONO_BACKLIGHT - -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Dynamic keymap starts after EEPROM version -#define DYNAMIC_KEYMAP_EEPROM_ADDR 37 -// Dynamic macro starts after dynamic keymaps (37+(4*1*8*2)) = (37+64) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 101 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 923 -#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 f072c67198..1e5b99807c 100644 --- a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk @@ -1,68 +1 @@ -# project specific files -SRC = keyboards/wilba_tech/wt_main.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section -BOOTLOADER = atmel-dfu - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file +VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index 7d1c2aa1b1..25f3ecbf19 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index 32fc6f9e44..1ad12ee4a5 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -23,361 +23,177 @@ #if MONO_BACKLIGHT_ENABLED #include "keyboards/wilba_tech/wt_mono_backlight.h" #endif // MONO_BACKLIGHT_ENABLED -#include "keyboards/wilba_tech/via_api.h" // Temporary hack -#include "keyboards/wilba_tech/via_keycodes.h" // Temporary hack -#include "raw_hid.h" -#include "dynamic_keymap.h" -#include "timer.h" -#include "tmk_core/common/eeprom.h" - -bool eeprom_is_valid(void) -{ - return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && - eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); -} - -void eeprom_set_valid(bool valid) -{ - eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); - eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); -} - -void eeprom_reset(void) -{ - // Set the Zeal60 specific EEPROM state as invalid. - eeprom_set_valid(false); - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); -} - -#ifdef RAW_ENABLE - -void raw_hid_receive( uint8_t *data, uint8_t length ) -{ - uint8_t *command_id = &(data[0]); - uint8_t *command_data = &(data[1]); - switch ( *command_id ) - { - case id_get_protocol_version: - { - command_data[0] = PROTOCOL_VERSION >> 8; - command_data[1] = PROTOCOL_VERSION & 0xFF; - break; - } - case id_get_keyboard_value: - { - if ( command_data[0] == id_uptime ) - { - uint32_t value = timer_read32(); - command_data[1] = (value >> 24 ) & 0xFF; - command_data[2] = (value >> 16 ) & 0xFF; - command_data[3] = (value >> 8 ) & 0xFF; - command_data[4] = value & 0xFF; - } - else - { - *command_id = id_unhandled; - } - break; - } -#ifdef DYNAMIC_KEYMAP_ENABLE - case id_dynamic_keymap_get_keycode: - { - uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); - command_data[3] = keycode >> 8; - command_data[4] = keycode & 0xFF; - break; - } - case id_dynamic_keymap_set_keycode: - { - dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); - break; - } - case id_dynamic_keymap_reset: - { - dynamic_keymap_reset(); - break; - } - case id_dynamic_keymap_macro_get_count: - { - command_data[0] = dynamic_keymap_macro_get_count(); - break; - } - case id_dynamic_keymap_macro_get_buffer_size: - { - uint16_t size = dynamic_keymap_macro_get_buffer_size(); - command_data[0] = size >> 8; - command_data[1] = size & 0xFF; - break; - } - case id_dynamic_keymap_macro_get_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_macro_set_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_macro_reset: - { - dynamic_keymap_macro_reset(); - break; - } - case id_dynamic_keymap_get_layer_count: - { - command_data[0] = dynamic_keymap_get_layer_count(); - break; - } - case id_dynamic_keymap_get_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_get_buffer( offset, size, &command_data[3] ); - break; - } - case id_dynamic_keymap_set_buffer: - { - uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; - uint16_t size = command_data[2]; // size <= 28 - dynamic_keymap_set_buffer( offset, size, &command_data[3] ); - break; - } -#endif // DYNAMIC_KEYMAP_ENABLE -#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - case id_backlight_config_set_value: - { - backlight_config_set_value(command_data); - break; - } - case id_backlight_config_get_value: - { - backlight_config_get_value(command_data); - break; - } - case id_backlight_config_save: - { - backlight_config_save(); - break; - } -#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - case id_eeprom_reset: - { - eeprom_reset(); - break; - } - case id_bootloader_jump: - { - // Need to send data back before the jump - // Informs host that the command is handled - raw_hid_send( data, length ); - // Give host time to read it - wait_ms(100); - bootloader_jump(); - break; - } - default: - { - // Unhandled message. - *command_id = id_unhandled; - break; - } - } - - // Return same buffer with values changed - raw_hid_send( data, length ); - -} +#include "via.h" +#ifndef VIA_ENABLE +#include "tmk_core/common/eeprom.h" +#include "version.h" // for QMK_BUILDDATE used in EEPROM magic #endif -void main_init(void) +// Called from via_init() if VIA_ENABLE +// Called from matrix_init_kb() if not VIA_ENABLE +void via_init_kb(void) { - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM. - if (eeprom_is_valid()) { -#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_config_load(); -#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - } else { + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM + if (via_eeprom_is_valid()) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - // If the EEPROM has not been saved before, or is out of date, - // save the default values to the EEPROM. Default values - // come from construction of the backlight_config instance. - backlight_config_save(); + backlight_config_load(); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED -#ifdef DYNAMIC_KEYMAP_ENABLE - // This resets the keymaps in EEPROM to what is in flash. - dynamic_keymap_reset(); - // This resets the macros in EEPROM to nothing. - dynamic_keymap_macro_reset(); -#endif // DYNAMIC_KEYMAP_ENABLE - // Save the magic number last, in case saving was interrupted - eeprom_set_valid(true); - } - + } else { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - // Initialize LED drivers for backlight. - backlight_init_drivers(); - - backlight_timer_init(); - backlight_timer_enable(); + // If the EEPROM has not been saved before, or is out of date, + // save the default values to the EEPROM. Default values + // come from construction of the backlight_config instance. + backlight_config_save(); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED -} -void bootmagic_lite(void) -{ - // The lite version of TMK's bootmagic. - // 100% less potential for accidentally making the - // keyboard do stupid things. + // DO NOT set EEPROM valid here, let caller do this + } - // We need multiple scans because debouncing can't be turned off. - matrix_scan(); - wait_ms(DEBOUNCE); - wait_ms(DEBOUNCE); - matrix_scan(); +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + // Initialize LED drivers for backlight. + backlight_init_drivers(); - // If the Esc (matrix 0,0) is held down on power up, - // reset the EEPROM valid state and jump to bootloader. - if ( matrix_get_row(0) & (1<<0) ) { - eeprom_reset(); - bootloader_jump(); - } + backlight_timer_init(); + backlight_timer_enable(); +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } void matrix_init_kb(void) { - bootmagic_lite(); - main_init(); - matrix_init_user(); + // If VIA is disabled, we still need to load backlight settings. + // Call via_init_kb() the same way as via_init(), with setting + // EEPROM valid afterwards. +#ifndef VIA_ENABLE + via_init_kb(); + via_eeprom_set_valid(true); +#endif // VIA_ENABLE + + matrix_init_user(); } void matrix_scan_kb(void) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - // This only updates the LED driver buffers if something has changed. - backlight_update_pwm_buffers(); + // This only updates the LED driver buffers if something has changed. + backlight_update_pwm_buffers(); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - matrix_scan_user(); + matrix_scan_user(); } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - process_record_backlight(keycode, record); + process_record_backlight(keycode, record); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - switch(keycode) { - case FN_MO13: - if (record->event.pressed) { - layer_on(1); - update_tri_layer(1, 2, 3); - } else { - layer_off(1); - update_tri_layer(1, 2, 3); - } - return false; - break; - case FN_MO23: - if (record->event.pressed) { - layer_on(2); - update_tri_layer(1, 2, 3); - } else { - layer_off(2); - update_tri_layer(1, 2, 3); - } - return false; - break; - } - -#ifdef DYNAMIC_KEYMAP_ENABLE - // Handle macros - if (record->event.pressed) { - if ( keycode >= MACRO00 && keycode <= MACRO15 ) - { - uint8_t id = keycode - MACRO00; - dynamic_keymap_macro_send(id); - return false; - } - } -#endif //DYNAMIC_KEYMAP_ENABLE - - return process_record_user(keycode, record); -} - -// This overrides the one in quantum/keymap_common.c -uint16_t keymap_function_id_to_action( uint16_t function_id ) -{ - // Zeal60 specific "action functions" are 0xF00 to 0xFFF - // i.e. F(0xF00) to F(0xFFF) are mapped to - // enum zeal60_action_functions by masking last 8 bits. - if ( function_id >= 0x0F00 && function_id <= 0x0FFF ) - { - uint8_t id = function_id & 0xFF; - switch ( id ) { - case TRIPLE_TAP_1_3: - case TRIPLE_TAP_2_3: - { - return ACTION_FUNCTION_TAP(id); - break; - } - default: - break; - } - } - - return pgm_read_word(&fn_actions[function_id]); -} - - -// Zeal60 specific "action functions" -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch (id) - { - case TRIPLE_TAP_1_3: - case TRIPLE_TAP_2_3: - if (record->event.pressed) { - layer_on( id == TRIPLE_TAP_1_3 ? 1 : 2 ); - if (record->tap.count && !record->tap.interrupted) { - if (record->tap.count >= 3) { - layer_invert(3); - } - } else { - record->tap.count = 0; - } - } else { - layer_off( id == TRIPLE_TAP_1_3 ? 1 : 2 ); - } - break; - } + return process_record_user(keycode, record); } void led_set_kb(uint8_t usb_led) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_set_indicator_state(usb_led); + backlight_set_indicator_state(usb_led); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - led_set_user(usb_led); + led_set_user(usb_led); } void suspend_power_down_kb(void) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_set_suspend_state(true); + backlight_set_suspend_state(true); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } void suspend_wakeup_init_kb(void) { #if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED - backlight_set_suspend_state(false); + backlight_set_suspend_state(false); #endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED } +// Moving this to the bottom of this source file is a workaround +// for an intermittent compiler error for Atmel compiler. +#ifdef VIA_ENABLE +void raw_hid_receive_kb(uint8_t *data, uint8_t length) { + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { +#if RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + case id_backlight_config_set_value: + { + backlight_config_set_value(command_data); + break; + } + case id_backlight_config_get_value: + { + backlight_config_get_value(command_data); + break; + } + case id_backlight_config_save: + { + backlight_config_save(); + break; + } +#endif // RGB_BACKLIGHT_ENABLED || MONO_BACKLIGHT_ENABLED + default: + { + // Unhandled message. + *command_id = id_unhandled; + *command_data = *command_data; // force use of variable + break; + } + } + // DO NOT call raw_hid_send(data,length) here, let caller do this +} +#endif // VIA_ENABLE + +// +// In the case of VIA being disabled, we still need to check if +// keyboard level EEPROM memory is valid before loading. +// Thus these are copies of the same functions in VIA, since +// the backlight settings reuse VIA's EEPROM magic/version, +// and the ones in via.c won't be compiled in. +// +// Yes, this is sub-optimal, and is only here for completeness +// (i.e. catering to the 1% of people that want wilba.tech LED bling +// AND want persistent settings BUT DON'T want to use dynamic keymaps/VIA). +// +#ifndef VIA_ENABLE + +bool via_eeprom_is_valid(void) +{ + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); + uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); + uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); + + return (eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0 ) == magic0 && + eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1 ) == magic1 && + eeprom_read_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2 ) == magic2 ); +} + +void via_eeprom_set_valid(bool valid) +{ + char *p = QMK_BUILDDATE; // e.g. "2019-11-05-11:29:54" + uint8_t magic0 = ( ( p[2] & 0x0F ) << 4 ) | ( p[3] & 0x0F ); + uint8_t magic1 = ( ( p[5] & 0x0F ) << 4 ) | ( p[6] & 0x0F ); + uint8_t magic2 = ( ( p[8] & 0x0F ) << 4 ) | ( p[9] & 0x0F ); + + eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+0, valid ? magic0 : 0xFF); + eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+1, valid ? magic1 : 0xFF); + eeprom_update_byte( (void*)VIA_EEPROM_MAGIC_ADDR+2, valid ? magic2 : 0xFF); +} + +void via_eeprom_reset(void) +{ + // Set the VIA specific EEPROM state as invalid. + via_eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +#endif // VIA_ENABLE diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index 69d82e582a..daf738da2e 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -19,12 +19,17 @@ #include "wt_rgb_backlight_api.h" // reuse these for now #include "wt_rgb_backlight_keycodes.h" // reuse these for now -#include "drivers/avr/i2c_master.h" -#include "drivers/issi/is31fl3736.h" #include <avr/interrupt.h> +#include "drivers/avr/i2c_master.h" #include "progmem.h" #include "quantum/color.h" +#include "tmk_core/common/eeprom.h" + +#include "via.h" // uses only the EEPROM address +#define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) + +#include "drivers/issi/is31fl3736.h" #define ISSI_ADDR_DEFAULT 0x50 diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index ca8c3269f6..31cfabddd7 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -33,18 +33,20 @@ #include "wt_rgb_backlight_keycodes.h" #if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) -#include <avr/io.h> -#include <util/delay.h> #include <avr/interrupt.h> #include "drivers/avr/i2c_master.h" #else #include "ch.h" #include "hal.h" #include "drivers/arm/i2c_master.h" -#include "tmk_core/common/eeprom.h" #endif + #include "progmem.h" #include "quantum/color.h" +#include "tmk_core/common/eeprom.h" + +#include "via.h" // uses only the EEPROM address +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) #if defined(RGB_BACKLIGHT_M6_B) #include "drivers/issi/is31fl3218.h" diff --git a/keyboards/wilba_tech/zeal60/config.h b/keyboards/wilba_tech/zeal60/config.h index 6b9529a6f9..cb2f6a96bd 100644 --- a/keyboards/wilba_tech/zeal60/config.h +++ b/keyboards/wilba_tech/zeal60/config.h @@ -115,24 +115,6 @@ #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*14*2)) = (68+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 628 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31
\ No newline at end of file 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 0000000000..395790d290 --- /dev/null +++ b/keyboards/wilba_tech/zeal60/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for Zeal60 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_60_all( + 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, + 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_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, + 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, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_MO13, FN_MO23, KC_RCTL), + +// Fn1 Layer +[1] = LAYOUT_60_all( + 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, + 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, + 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, + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_60_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_60_all( + 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/zeal60/keymaps/via/rules.mk b/keyboards/wilba_tech/zeal60/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /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 11f3867de3..3067be73d3 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 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes 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 0d4f1b908b..016531d227 100644 --- a/keyboards/wilba_tech/zeal60/zeal60.h +++ b/keyboards/wilba_tech/zeal60/zeal60.h @@ -17,7 +17,7 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define XXX KC_NO diff --git a/keyboards/wilba_tech/zeal65/config.h b/keyboards/wilba_tech/zeal65/config.h index f452fbd475..01649d76fe 100644 --- a/keyboards/wilba_tech/zeal65/config.h +++ b/keyboards/wilba_tech/zeal65/config.h @@ -115,24 +115,6 @@ #define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } #define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } -#define DYNAMIC_KEYMAP_LAYER_COUNT 4 - -// EEPROM usage - -// TODO: refactor with new user EEPROM code (coming soon) -#define EEPROM_MAGIC 0x451F -#define EEPROM_MAGIC_ADDR 34 -// Bump this every time we change what we store -// This will automatically reset the EEPROM with defaults -// and avoid loading invalid data from the EEPROM -#define EEPROM_VERSION 0x08 -#define EEPROM_VERSION_ADDR 36 - -// Backlight config starts after EEPROM version -#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37 -// Dynamic keymap starts after backlight config (37+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 68 -// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668 -#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356 -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 31 diff --git a/keyboards/wilba_tech/zeal65/info.json b/keyboards/wilba_tech/zeal65/info.json index d83895ed95..709f7cefe1 100644 --- a/keyboards/wilba_tech/zeal65/info.json +++ b/keyboards/wilba_tech/zeal65/info.json @@ -6,7 +6,7 @@ "width": 16, "height": 5, "layouts": { - "LAYOUT_65_split_bs": { + "LAYOUT_65_all": { "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}] }, "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 96b04c358d..2c6d24e8fa 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 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default layer -[0] = LAYOUT_65_split_bs( +[0] = LAYOUT_65_all( 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, 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, 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] = { KC_LGUI, KC_LALT, KC_SPC, FN_MO23, FN_MO13, KC_LEFT, KC_DOWN, KC_RGHT), // Fn1 Layer -[1] = LAYOUT_65_split_bs( +[1] = LAYOUT_65_all( 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, 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, KC_TRNS, KC_TRNS, 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] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), // Fn2 Layer -[2] = LAYOUT_65_split_bs( +[2] = LAYOUT_65_all( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), // Fn3 Layer (zeal60 Configuration) -[3] = LAYOUT_65_split_bs( +[3] = LAYOUT_65_all( 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, 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, KC_TRNS, KC_TRNS, 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 0000000000..2c6d24e8fa --- /dev/null +++ b/keyboards/wilba_tech/zeal65/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Split-backspace layout for Zeal65 +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_65_all( + 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, + 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, + 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, + 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, + KC_LGUI, KC_LALT, KC_SPC, FN_MO23, FN_MO13, KC_LEFT, KC_DOWN, KC_RGHT), + +// Fn1 Layer +[1] = LAYOUT_65_all( + 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, + 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_65_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer (zeal60 Configuration) +[3] = LAYOUT_65_all( + 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, 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, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/rules.mk b/keyboards/wilba_tech/zeal65/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /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 6c8783eb29..94d487cbb7 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 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -36,8 +36,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes CIE1931_CURVE = yes # project specific files diff --git a/keyboards/wilba_tech/zeal65/zeal65.h b/keyboards/wilba_tech/zeal65/zeal65.h index d8528e6c51..34c1294165 100644 --- a/keyboards/wilba_tech/zeal65/zeal65.h +++ b/keyboards/wilba_tech/zeal65/zeal65.h @@ -17,11 +17,11 @@ #include "quantum.h" #include "keyboards/wilba_tech/wt_rgb_backlight_keycodes.h" -#include "keyboards/wilba_tech/via_keycodes.h" +#include "via.h" #define XXX KC_NO -#define LAYOUT_65_split_bs( \ +#define LAYOUT_65_all( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ |