Convert split_common to use generic GPIO api
This commit is contained in:
parent
54b572159f
commit
38e01a7480
2 changed files with 23 additions and 54 deletions
|
@ -1,24 +1,15 @@
|
|||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/power.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include "split_util.h"
|
||||
#include "matrix.h"
|
||||
#include "keyboard.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
#include "split_flags.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
# include "backlight.h"
|
||||
#endif
|
||||
|
||||
#ifdef SPLIT_HAND_PIN
|
||||
# include "pincontrol.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_I2C) || defined(EH)
|
||||
# include "i2c.h"
|
||||
#endif
|
||||
|
@ -30,8 +21,8 @@ volatile uint8_t setTries = 0;
|
|||
static void setup_handedness(void) {
|
||||
#ifdef SPLIT_HAND_PIN
|
||||
// Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
|
||||
pinMode(SPLIT_HAND_PIN, PinDirectionInput);
|
||||
isLeftHand = digitalRead(SPLIT_HAND_PIN);
|
||||
setPinInput(SPLIT_HAND_PIN);
|
||||
isLeftHand = readPin(SPLIT_HAND_PIN);
|
||||
#else
|
||||
#ifdef EE_HANDS
|
||||
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue