]> git.tdb.fi Git - libs/core.git/commitdiff
Additional baud rates from termios.h
authorMikko Rasa <tdb@tdb.fi>
Fri, 27 Jun 2014 16:02:13 +0000 (19:02 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 27 Jun 2014 16:02:13 +0000 (19:02 +0300)
source/io/unix/serial.cpp

index 69939a8dee31c5eceea91783b088e77f1941cbf0..2be5dc589f6efe57c5a83d9434776912d290faac 100644 (file)
@@ -68,6 +68,18 @@ void Serial::DeviceState::set_baud_rate(unsigned baud)
        case 57600:  speed = B57600; break;
        case 115200: speed = B115200; break;
        case 230400: speed = B230400; break;
+       case 460800: speed = B460800; break;
+       case 500000: speed = B500000; break;
+       case 576000: speed = B576000; break;
+       case 921600: speed = B921600; break;
+       case 1000000: speed = B1000000; break;
+       case 1152000: speed = B1152000; break;
+       case 1500000: speed = B1500000; break;
+       case 2000000: speed = B2000000; break;
+       case 2500000: speed = B2500000; break;
+       case 3000000: speed = B3000000; break;
+       case 3500000: speed = B3500000; break;
+       case 4000000: speed = B4000000; break;
        default: throw invalid_argument("set_baud_rate");
        }