diff options
Diffstat (limited to 'quantum/split_common/serial.c')
| -rw-r--r-- | quantum/split_common/serial.c | 16 |
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 @@ | |||
| 12 | #include <stdbool.h> | 12 | #include <stdbool.h> |
| 13 | #include "serial.h" | 13 | #include "serial.h" |
| 14 | 14 | ||
| 15 | #ifndef USE_I2C | 15 | #ifdef SOFT_SERIAL_PIN |
| 16 | |||
| 17 | #ifndef SOFT_SERIAL_PIN | ||
| 18 | #error quantum/split_common/serial.c need SOFT_SERIAL_PIN define | ||
| 19 | #endif | ||
| 20 | 16 | ||
| 21 | #ifdef __AVR_ATmega32U4__ | 17 | #ifdef __AVR_ATmega32U4__ |
| 22 | // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. | 18 | // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. |
| 23 | #ifdef USE_I2C | 19 | #ifdef USE_AVR_I2C |
| 24 | #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 | 20 | #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 |
| 25 | #error Using ATmega32U4 I2C, so can not use PD0, PD1 | 21 | #error Using ATmega32U4 I2C, so can not use PD0, PD1 |
| 26 | #endif | 22 | #endif |
| 27 | #endif | 23 | #endif |
| 28 | 24 | ||
| 29 | #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 | 25 | #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 |
| @@ -278,4 +274,4 @@ int serial_update_buffers(void) { | |||
| 278 | return 0; | 274 | return 0; |
| 279 | } | 275 | } |
| 280 | 276 | ||
| 281 | #endif | 277 | #endif /* SOFT_SERIAL_PIN */ |
