summaryrefslogtreecommitdiffstats
path: root/quantum/split_common/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/split_common/serial.c')
-rw-r--r--quantum/split_common/serial.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/quantum/split_common/serial.c b/quantum/split_common/serial.c
index f34f824d7..13e58d825 100644
--- a/quantum/split_common/serial.c
+++ b/quantum/split_common/serial.c
@@ -12,18 +12,14 @@
#include <stdbool.h>
#include "serial.h"
-#ifndef USE_I2C
-
-#ifndef SOFT_SERIAL_PIN
- #error quantum/split_common/serial.c need SOFT_SERIAL_PIN define
-#endif
+#ifdef SOFT_SERIAL_PIN
#ifdef __AVR_ATmega32U4__
// if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
- #ifdef USE_I2C
- #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
- #error Using ATmega32U4 I2C, so can not use PD0, PD1
- #endif
+ #ifdef USE_AVR_I2C
+ #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
+ #error Using ATmega32U4 I2C, so can not use PD0, PD1
+ #endif
#endif
#if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
@@ -278,4 +274,4 @@ int serial_update_buffers(void) {
return 0;
}
-#endif
+#endif /* SOFT_SERIAL_PIN */