summaryrefslogtreecommitdiff
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)
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 288299ada8..f2599d1d21 100644
--- a/quantum/via.c
+++ b/quantum/via.c
@@ -111,7 +111,7 @@ void via_init(void) {
if (via_eeprom_is_valid()) {
} else {
// This resets the layout options
- via_set_layout_options(0);
+ via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT);
// This resets the keymaps in EEPROM to what is in flash.
dynamic_keymap_reset();
// This resets the macros in EEPROM to nothing.
diff --git a/quantum/via.h b/quantum/via.h
index 012547e055..373843f901 100644
--- a/quantum/via.h
+++ b/quantum/via.h
@@ -37,6 +37,14 @@
# define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 1
#endif
+// Allow override of the layout options default value.
+// This requires advanced knowledge of how VIA stores layout options
+// and is only really useful for setting a boolean layout option
+// state to true by default.
+#ifndef VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT
+# define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x00000000
+#endif
+
// The end of the EEPROM memory used by VIA
// By default, dynamic keymaps will start at this if there is no
// custom config