diff options
author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2018-12-15 14:31:56 +0900 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-12-14 21:31:56 -0800 |
commit | 8f790948e5f7ed62b2c56e1a6aa63dae89d5c860 (patch) | |
tree | 5d934ecae5855bf3f907b0ad485e78b42d9c228a /quantum/split_common/serial.c | |
parent | a49d98e665d934c318894cfc9d9813adacd08f11 (diff) |
Refactor quantum/split_common/i2c.c, quantum/split_common/serial.c (#4522)
* add temporary compile test shell script
* Extended support of SKIP_VERSION to make invariant compile results during testing.
* build_keyboard.mk, tmk_core/rules.mk: add LIB_SRC, QUANTUM_LIB_SRC support
Support compiled object enclosed in library.
e.g.
```
LIB_SRC += xxxx.c
xxxx.c --> xxxx.o ---> xxxx.a
```
* remove 'ifdef/ifndef USE_I2C' from quantum/split_common/{i2c|serial}.c
* add SKIP_DEBUG_INFO into tmk_core/rules.mk
When SKIP_DEBUG_INFO=yes is specified, do not use the -g option at compile time.
* tmk_core/rules.mk: Library object need -fno-lto
* add SKIP_DEBUG_INFO=yes
* remove temporary compile test shell script
* add '#define SOFT_SERIAL_PIN D0' to keyboards/lets_split/rev?/config.h
* quantum/split_common/serial.c: Changed not to use USE_I2C.
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 f34f824d7d..13e58d8259 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 */ |