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
This commit is contained in:
Wilba
2020-01-04 07:52:00 +11:00
committed by Drashna Jaelre
parent b362595665
commit 320822d75b
167 changed files with 1502 additions and 3157 deletions

View File

@@ -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

View File

@@ -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) };

View File

@@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@@ -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