]> rtime.felk.cvut.cz Git - sojka/sterm.git/commitdiff
Support baudrates up to 4 Mbps
authorMichal Sojka <michal.sojka@cvut.cz>
Sat, 2 Nov 2019 22:24:46 +0000 (23:24 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Sat, 2 Nov 2019 22:33:26 +0000 (23:33 +0100)
These are supported by glibc since 1999. If other C libraries have
problem with those, we should add ifdefs.

Thanks to ohemming@gmail.com for letting me know that his Rock64 needs
1.5 Mbps baudrate.

sterm.c

diff --git a/sterm.c b/sterm.c
index 040c22f29c9a5ec163c4b944862087f5069068ca..e0406bbe5046546799243007d20aacd89b3beb6e 100644 (file)
--- a/sterm.c
+++ b/sterm.c
@@ -250,6 +250,18 @@ int main(int argc, char *argv[])
                                S(57600);
                                S(115200);
                                S(230400);
+                               S(460800);
+                               S(500000);
+                               S(576000);
+                               S(921600);
+                               S(1000000);
+                               S(1152000);
+                               S(1500000);
+                               S(2000000);
+                               S(2500000);
+                               S(3000000);
+                               S(3500000);
+                               S(4000000);
 #undef S
                        default:
                                fprintf(stderr, "Unknown baud rate %d\n", s);