From 31f0e24588395472c5cde55bcd08ae56bb3a1126 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 23 May 2020 08:57:30 +0200 Subject: [PATCH] Make serial speed a compile option --- Config.h | 3 +++ SerialPort.cpp | 2 +- SerialPort.h | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Config.h b/Config.h index 73e716b..c540fa1 100644 --- a/Config.h +++ b/Config.h @@ -35,6 +35,9 @@ // For 19.2 MHz // #define EXTERNAL_OSC 19200000 +// Use a higher baudrate for host communication. Required for FM network ! +// #define SERIAL_SPEED 230400 + // Allow the use of the COS line to lockout the modem // #define USE_COS_AS_LOCKOUT diff --git a/SerialPort.cpp b/SerialPort.cpp index 2a9a241..8b56099 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -602,7 +602,7 @@ void CSerialPort::setMode(MMDVM_STATE modemState) void CSerialPort::start() { - beginInt(1U, 115200); + beginInt(1U, SERIAL_SPEED); #if defined(SERIAL_REPEATER) beginInt(3U, 9600); diff --git a/SerialPort.h b/SerialPort.h index a75731a..b8838b5 100644 --- a/SerialPort.h +++ b/SerialPort.h @@ -23,6 +23,10 @@ #include "Globals.h" #include "RingBuffer.h" +#if !defined(SERIAL_SPEED) +#define SERIAL_SPEED 115200 +#endif + class CSerialPort { public: