From 320822d75b785401809f45007320e6fb6885b3fd Mon Sep 17 00:00:00 2001 From: Wilba Date: Sat, 4 Jan 2020 07:52:00 +1100 Subject: 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 --- tmk_core/common/eeconfig.h | 2 ++ tmk_core/common/keyboard.c | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'tmk_core/common') diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 308f865e19..6fbe789031 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -48,6 +48,8 @@ along with this program. If not, see . #define EECONFIG_RGB_MATRIX_SPEED (uint8_t *)32 // TODO: Combine these into a single word and single block of EEPROM #define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)33 +// Size of EEPROM being used, other code can refer to this for available EEPROM +#define EECONFIG_SIZE 34 /* debug bit */ #define EECONFIG_DEBUG_ENABLE (1 << 0) #define EECONFIG_DEBUG_MATRIX (1 << 1) diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index af2b2fd48b..794a9152fb 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -83,6 +83,9 @@ along with this program. If not, see . #ifdef VELOCIKEY_ENABLE # include "velocikey.h" #endif +#ifdef VIA_ENABLE +# include "via.h" +#endif // Only enable this if console is enabled to print to #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) @@ -217,6 +220,9 @@ __attribute__((weak)) bool is_keyboard_master(void) { return true; } void keyboard_init(void) { timer_init(); matrix_init(); +#ifdef VIA_ENABLE + via_init(); +#endif #ifdef QWIIC_ENABLE qwiic_init(); #endif -- cgit v1.2.3