]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - keyboards/lets_split/split_util.c
Copy CMD60 as starting point and rename files
[qmk_firmware.git] / keyboards / lets_split / split_util.c
index 65003a71a46d6ea699eac1f4900ce499ba4e51ec..226dc1881631003342c2f0874d968ef352a62908 100644 (file)
@@ -6,18 +6,23 @@
 #include <avr/eeprom.h>
 #include "split_util.h"
 #include "matrix.h"
-#include "i2c.h"
-#include "serial.h"
 #include "keyboard.h"
 #include "config.h"
 
+#ifdef USE_I2C
+#  include "i2c.h"
+#else
+#  include "serial.h"
+#endif
+
 volatile bool isLeftHand = true;
 
 static void setup_handedness(void) {
   #ifdef EE_HANDS
     isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
   #else
-    #ifdef I2C_MASTER_RIGHT
+    // I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c
+    #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
       isLeftHand = !has_usb();
     #else
       isLeftHand = has_usb();