From 3b69e7873bd76b52c3d3469d7496ff64a9048db5 Mon Sep 17 00:00:00 2001 From: ViezeVingertjes Date: Fri, 26 Jun 2026 00:11:33 +0200 Subject: [PATCH] fix: guard HWCDC serial config behind ARDUINO_USB_MODE setTxTimeoutMs() and setTxBufferSize() are HWCDC-only APIs; calling them on HardwareSerial (UART-bridge boards like T-Beam) fails to compile. Co-Authored-By: Adam Gessaman --- examples/kiss_modem/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/kiss_modem/main.cpp b/examples/kiss_modem/main.cpp index 95a06ee6..5836a694 100644 --- a/examples/kiss_modem/main.cpp +++ b/examples/kiss_modem/main.cpp @@ -113,11 +113,9 @@ void setup() { uint32_t start = millis(); while (!Serial && millis() - start < 3000) delay(10); delay(100); -#if defined(ESP32) +#if defined(ESP32) && ARDUINO_USB_MODE Serial.setTxTimeoutMs(USB_TX_TIMEOUT_MS); -#if ARDUINO_USB_MODE Serial.setTxBufferSize(USB_TX_BUFFER_SIZE); -#endif #endif modem = new KissModem(Serial, identity, rng, radio_driver, board, sensors); #endif