From d3713af096bdfdc1709e57e0066949314b7db1a6 Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Tue, 9 Jan 2018 10:22:43 -0500 Subject: [PATCH] Support 500kbps serial ports. (#167) --- include/serial/serial.h | 2 +- src/impl/unix.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/serial/serial.h b/include/serial/serial.h index 1385659..a165785 100644 --- a/include/serial/serial.h +++ b/include/serial/serial.h @@ -488,7 +488,7 @@ public: * 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 56000, * 57600, 115200 * Some other baudrates that are supported by some comports: - * 128000, 153600, 230400, 256000, 460800, 921600 + * 128000, 153600, 230400, 256000, 460800, 500000, 921600 * * \param baudrate An integer that sets the baud rate for the serial port. * diff --git a/src/impl/unix.cc b/src/impl/unix.cc index 4ef6b32..4309aa6 100755 --- a/src/impl/unix.cc +++ b/src/impl/unix.cc @@ -269,6 +269,9 @@ Serial::SerialImpl::reconfigurePort () #ifdef B460800 case 460800: baud = B460800; break; #endif +#ifdef B500000 + case 500000: baud = B500000; break; +#endif #ifdef B576000 case 576000: baud = B576000; break; #endif