mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-04 09:02:21 +00:00
(2/3) Add Slow Clock Support for RP2040 platform. This will disable USB Softserial.
This commit is contained in:
@@ -126,8 +126,13 @@ int32_t SerialModule::runOnce()
|
||||
uint32_t baud = getBaudRate();
|
||||
|
||||
if (moduleConfig.serial.override_console_serial_port) {
|
||||
#ifdef RP2040_SLOW_CLOCK
|
||||
Serial2.flush();
|
||||
serialPrint = &Serial2;
|
||||
#else
|
||||
Serial.flush();
|
||||
serialPrint = &Serial;
|
||||
#endif
|
||||
// Give it a chance to flush out 💩
|
||||
delay(10);
|
||||
}
|
||||
@@ -151,8 +156,13 @@ int32_t SerialModule::runOnce()
|
||||
Serial2.begin(baud, SERIAL_8N1);
|
||||
Serial2.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);
|
||||
} else {
|
||||
#ifdef RP2040_SLOW_CLOCK
|
||||
Serial2.begin(baud, SERIAL_8N1);
|
||||
Serial2.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);
|
||||
#else
|
||||
Serial.begin(baud, SERIAL_8N1);
|
||||
Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
Serial.begin(baud, SERIAL_8N1);
|
||||
|
||||
Reference in New Issue
Block a user