mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-07-27 03:51:02 +00:00
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 <adam@gessaman.com>
This commit is contained in:
co-authored by
Adam Gessaman
parent
39ff5b879a
commit
3b69e7873b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user