diff options
author | James Churchill <pelrun@gmail.com> | 2018-12-29 16:53:21 +1100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-01-03 20:00:27 -0800 |
commit | 38e01a7480f6826b3d220c4c8357788558b2af07 (patch) | |
tree | 25ccc41022e2c2486d44ad4a1e5a0cae4e9f5a55 /quantum/split_common/split_util.c | |
parent | 54b572159f62913ead47b0a6ee8d2d09dfb8f19a (diff) | |
download | qmk_firmware-38e01a7480f6826b3d220c4c8357788558b2af07.tar.gz qmk_firmware-38e01a7480f6826b3d220c4c8357788558b2af07.zip |
Convert split_common to use generic GPIO api
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); |