From 8786285624e21917c9b42f39ff0b119a34bd47e3 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sat, 20 May 2023 23:57:17 +0200 Subject: [PATCH] Assume that we have enough HW serials --- WifiInterface.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/WifiInterface.cpp b/WifiInterface.cpp index 21d474b..d5504b6 100644 --- a/WifiInterface.cpp +++ b/WifiInterface.cpp @@ -58,6 +58,20 @@ Stream * WifiInterface::wifiStream; #define NUM_SERIAL 1 #endif +// To be able to define these in platform specific +// DCCTimer.cpp files, we here make the +// assumption that these exist to link against. +// if enough serial interfaces exist. +#if NUM_SERIAL > 0 +extern HardwareSerial Serial1; +#endif +#if NUM_SERIAL > 1 +extern HardwareSerial Serial2; +#endif +#if NUM_SERIAL > 2 +extern HardwareSerial Serial3; +#endif + bool WifiInterface::setup(long serial_link_speed, const FSH *wifiESSID, const FSH *wifiPassword,