diff --git a/cores/arduino/SerialObj1.cpp b/cores/arduino/SerialObj1.cpp index 11fb873f7..1051a8d15 100644 --- a/cores/arduino/SerialObj1.cpp +++ b/cores/arduino/SerialObj1.cpp @@ -1,5 +1,9 @@ #include "Serial.h" #if SERIAL_HOWMANY > 0 +#if defined(UART1_RTS_PIN) && defined(UART1_CTS_PIN) +UART _UART1_(UART1_TX_PIN, UART1_RX_PIN, UART1_RTS_PIN, UART1_CTS_PIN); +#else UART _UART1_(UART1_TX_PIN, UART1_RX_PIN); +#endif #endif \ No newline at end of file diff --git a/cores/arduino/SerialObj2.cpp b/cores/arduino/SerialObj2.cpp index 5497e42e4..7d9597ed5 100644 --- a/cores/arduino/SerialObj2.cpp +++ b/cores/arduino/SerialObj2.cpp @@ -1,5 +1,9 @@ #include "Serial.h" #if SERIAL_HOWMANY > 1 +#if defined(UART2_RTS_PIN) && defined(UART2_CTS_PIN) +UART _UART2_(UART2_TX_PIN, UART2_RX_PIN, UART2_RTS_PIN, UART2_CTS_PIN); +#else UART _UART2_(UART2_TX_PIN, UART2_RX_PIN); +#endif #endif \ No newline at end of file diff --git a/cores/arduino/SerialObj3.cpp b/cores/arduino/SerialObj3.cpp index 2f083d49b..4977ff8c9 100644 --- a/cores/arduino/SerialObj3.cpp +++ b/cores/arduino/SerialObj3.cpp @@ -1,13 +1,25 @@ #include "Serial.h" #if SERIAL_HOWMANY > 2 +#if defined(UART3_RTS_PIN) && defined(UART3_CTS_PIN) +UART _UART3_(UART3_TX_PIN, UART3_RX_PIN, UART3_RTS_PIN, UART3_CTS_PIN); +#else UART _UART3_(UART3_TX_PIN, UART3_RX_PIN); #endif +#endif #if SERIAL_HOWMANY > 3 +#if defined(UART4_RTS_PIN) && defined(UART4_CTS_PIN) +UART _UART4_(UART4_TX_PIN, UART4_RX_PIN, UART4_RTS_PIN, UART4_CTS_PIN); +#else UART _UART4_(UART4_TX_PIN, UART4_RX_PIN); #endif +#endif #if SERIAL_HOWMANY > 4 +#if defined(UART5_RTS_PIN) && defined(UART5_CTS_PIN) UART _UART5_(UART5_TX_PIN, UART5_RX_PIN, UART5_RTS_PIN, UART5_CTS_PIN); +#else +UART _UART5_(UART5_TX_PIN, UART5_RX_PIN); +#endif #endif \ No newline at end of file