aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorWilba <Jason.S.Williams@gmail.com>2020-04-07 05:27:44 +1000
committerGitHub <noreply@github.com>2020-04-06 20:27:44 +0100
commit9bfa713421ccd62fe49493b282d02310accf0523 (patch)
treeb4045447627e4ec53c6d2133487cf70b59f13571 /quantum
parentb6fc3ad8e71134d10bf6ed8979bb505f33db92b9 (diff)
downloadqmk_firmware-9bfa713421ccd62fe49493b282d02310accf0523.tar.gz
qmk_firmware-9bfa713421ccd62fe49493b282d02310accf0523.zip
Configurable VIA layout options default value (#8707)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/via.c2
-rw-r--r--quantum/via.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/quantum/via.c b/quantum/via.c
index 288299ada..f2599d1d2 100644
--- a/quantum/via.c
+++ b/quantum/via.c
@@ -111,7 +111,7 @@ void via_init(void) {
111 if (via_eeprom_is_valid()) { 111 if (via_eeprom_is_valid()) {
112 } else { 112 } else {
113 // This resets the layout options 113 // This resets the layout options
114 via_set_layout_options(0); 114 via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
115 // This resets the keymaps in EEPROM to what is in flash. 115 // This resets the keymaps in EEPROM to what is in flash.
116 dynamic_keymap_reset(); 116 dynamic_keymap_reset();
117 // This resets the macros in EEPROM to nothing. 117 // This resets the macros in EEPROM to nothing.
diff --git a/quantum/via.h b/quantum/via.h
index 012547e05..373843f90 100644
--- a/quantum/via.h
+++ b/quantum/via.h
@@ -37,6 +37,14 @@
37# define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 1 37# define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 1
38#endif 38#endif
39 39
40// Allow override of the layout options default value.
41// This requires advanced knowledge of how VIA stores layout options
42// and is only really useful for setting a boolean layout option
43// state to true by default.
44#ifndef VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT
45# define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x00000000
46#endif
47
40// The end of the EEPROM memory used by VIA 48// The end of the EEPROM memory used by VIA
41// By default, dynamic keymaps will start at this if there is no 49// By default, dynamic keymaps will start at this if there is no
42// custom config 50// custom config