summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorDasky <32983009+daskygit@users.noreply.github.com>2022-09-16 00:06:00 +0100
committerGitHub <noreply@github.com>2022-09-16 00:06:00 +0100
commite1aed8da08468fd04bb9e33129a5a26b80c0e093 (patch)
tree58de4402813e0edf64cd0f93879adcba2d06c1e5 /quantum
parent08738aab7e230caa9c0f0beb5700c80253904aa5 (diff)
Move fake EE_HANDS (#18352)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/eeconfig.c10
-rw-r--r--quantum/split_common/split_util.c14
2 files changed, 14 insertions, 10 deletions
diff --git a/quantum/eeconfig.c b/quantum/eeconfig.c
index 0ff9996ca4..0b7ae39907 100644
--- a/quantum/eeconfig.c
+++ b/quantum/eeconfig.c
@@ -57,16 +57,6 @@ void eeconfig_init_quantum(void) {
57 eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); 57 eeprom_update_dword(EECONFIG_RGB_MATRIX, 0);
58 eeprom_update_word(EECONFIG_RGB_MATRIX_EXTENDED, 0); 58 eeprom_update_word(EECONFIG_RGB_MATRIX_EXTENDED, 0);
59 59
60 // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS
61 // within the emulated eeprom via dfu-util or another tool
62#if defined INIT_EE_HANDS_LEFT
63# pragma message "Faking EE_HANDS for left hand"
64 eeprom_update_byte(EECONFIG_HANDEDNESS, 1);
65#elif defined INIT_EE_HANDS_RIGHT
66# pragma message "Faking EE_HANDS for right hand"
67 eeprom_update_byte(EECONFIG_HANDEDNESS, 0);
68#endif
69
70#if defined(HAPTIC_ENABLE) 60#if defined(HAPTIC_ENABLE)
71 haptic_reset(); 61 haptic_reset();
72#else 62#else
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 4892b7f8d8..0b3338ed6f 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -139,6 +139,20 @@ void split_pre_init(void) {
139 if (!eeconfig_is_enabled()) { 139 if (!eeconfig_is_enabled()) {
140 eeconfig_init(); 140 eeconfig_init();
141 } 141 }
142 // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS within the emulated eeprom via dfu-util or another tool
143# if defined(INIT_EE_HANDS_LEFT) || defined(INIT_EE_HANDS_RIGHT)
144# if defined(INIT_EE_HANDS_LEFT)
145# pragma message "Faking EE_HANDS for left hand"
146 const bool should_be_left = true;
147# else
148# pragma message "Faking EE_HANDS for right hand"
149 const bool should_be_left = false;
150# endif
151 bool is_left = eeconfig_read_handedness();
152 if (is_left != should_be_left) {
153 eeconfig_update_handedness(should_be_left);
154 }
155# endif // defined(INIT_EE_HANDS_LEFT) || defined(INIT_EE_HANDS_RIGHT)
142#endif 156#endif
143 isLeftHand = is_keyboard_left(); 157 isLeftHand = is_keyboard_left();
144 158