diff options
Diffstat (limited to 'quantum/split_common/split_util.c')
| -rw-r--r-- | quantum/split_common/split_util.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index c613f265a..11453c998 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c | |||
| @@ -1,24 +1,15 @@ | |||
| 1 | #include <avr/io.h> | ||
| 2 | #include <avr/wdt.h> | ||
| 3 | #include <avr/power.h> | ||
| 4 | #include <avr/interrupt.h> | ||
| 5 | #include <util/delay.h> | ||
| 6 | #include <avr/eeprom.h> | ||
| 7 | #include "split_util.h" | 1 | #include "split_util.h" |
| 8 | #include "matrix.h" | 2 | #include "matrix.h" |
| 9 | #include "keyboard.h" | 3 | #include "keyboard.h" |
| 10 | #include "config.h" | 4 | #include "config.h" |
| 11 | #include "timer.h" | 5 | #include "timer.h" |
| 12 | #include "split_flags.h" | 6 | #include "split_flags.h" |
| 7 | #include "quantum.h" | ||
| 13 | 8 | ||
| 14 | #ifdef BACKLIGHT_ENABLE | 9 | #ifdef BACKLIGHT_ENABLE |
| 15 | # include "backlight.h" | 10 | # include "backlight.h" |
| 16 | #endif | 11 | #endif |
| 17 | 12 | ||
| 18 | #ifdef SPLIT_HAND_PIN | ||
| 19 | # include "pincontrol.h" | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #if defined(USE_I2C) || defined(EH) | 13 | #if defined(USE_I2C) || defined(EH) |
| 23 | # include "i2c.h" | 14 | # include "i2c.h" |
| 24 | #endif | 15 | #endif |
| @@ -30,8 +21,8 @@ volatile uint8_t setTries = 0; | |||
| 30 | static void setup_handedness(void) { | 21 | static void setup_handedness(void) { |
| 31 | #ifdef SPLIT_HAND_PIN | 22 | #ifdef SPLIT_HAND_PIN |
| 32 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand | 23 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand |
| 33 | pinMode(SPLIT_HAND_PIN, PinDirectionInput); | 24 | setPinInput(SPLIT_HAND_PIN); |
| 34 | isLeftHand = digitalRead(SPLIT_HAND_PIN); | 25 | isLeftHand = readPin(SPLIT_HAND_PIN); |
| 35 | #else | 26 | #else |
| 36 | #ifdef EE_HANDS | 27 | #ifdef EE_HANDS |
| 37 | isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); | 28 | isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); |
