diff options
author | Dasky <32983009+daskygit@users.noreply.github.com> | 2022-09-16 00:06:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 00:06:00 +0100 |
commit | e1aed8da08468fd04bb9e33129a5a26b80c0e093 (patch) | |
tree | 58de4402813e0edf64cd0f93879adcba2d06c1e5 /quantum/split_common | |
parent | 08738aab7e230caa9c0f0beb5700c80253904aa5 (diff) |
Move fake EE_HANDS (#18352)
Diffstat (limited to 'quantum/split_common')
-rw-r--r-- | quantum/split_common/split_util.c | 14 |
1 files changed, 14 insertions, 0 deletions
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) { if (!eeconfig_is_enabled()) { eeconfig_init(); } + // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS within the emulated eeprom via dfu-util or another tool +# if defined(INIT_EE_HANDS_LEFT) || defined(INIT_EE_HANDS_RIGHT) +# if defined(INIT_EE_HANDS_LEFT) +# pragma message "Faking EE_HANDS for left hand" + const bool should_be_left = true; +# else +# pragma message "Faking EE_HANDS for right hand" + const bool should_be_left = false; +# endif + bool is_left = eeconfig_read_handedness(); + if (is_left != should_be_left) { + eeconfig_update_handedness(should_be_left); + } +# endif // defined(INIT_EE_HANDS_LEFT) || defined(INIT_EE_HANDS_RIGHT) #endif isLeftHand = is_keyboard_left(); |