[Python-checkins] bpo-28367: Add additional baud rates for termios (GH-13142)

T. Wouters webhook-mailer at python.org
Sat Jan 4 07:56:48 EST 2020


https://github.com/python/cpython/commit/7dc72b8d4f2c9d1eed20f314fd6425eab66cbc89
commit: 7dc72b8d4f2c9d1eed20f314fd6425eab66cbc89
branch: master
author: Anthony Shaw <anthony.p.shaw at gmail.com>
committer: T. Wouters <thomas at python.org>
date: 2020-01-04T13:56:31+01:00
summary:

bpo-28367: Add additional baud rates for termios (GH-13142)


Co-authored-by: Andrey Smirnov <andrew.smirnov at gmail.com>.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>

files:
A Misc/NEWS.d/next/Library/2019-05-06-22-38-47.bpo-28367.2AKen5.rst
M Modules/termios.c

diff --git a/Misc/NEWS.d/next/Library/2019-05-06-22-38-47.bpo-28367.2AKen5.rst b/Misc/NEWS.d/next/Library/2019-05-06-22-38-47.bpo-28367.2AKen5.rst
new file mode 100644
index 0000000000000..115f458bfbf3e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-05-06-22-38-47.bpo-28367.2AKen5.rst
@@ -0,0 +1,13 @@
+Termios magic constants for the following baud rates:
+  - B500000
+  - B576000
+  - B921600
+  - B1000000
+  - B1152000
+  - B1500000
+  - B2000000
+  - B2500000
+  - B3000000
+  - B3500000
+  - B4000000
+Patch by Andrey Smirnov
\ No newline at end of file
diff --git a/Modules/termios.c b/Modules/termios.c
index b3b8c72bf6b84..0fd93c06c7203 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -613,6 +613,39 @@ static struct constant {
 #ifdef B460800
     {"B460800", B460800},
 #endif
+#ifdef B500000
+    {"B500000", B500000},
+#endif
+#ifdef B576000
+    { "B576000", B576000},
+#endif
+#ifdef B921600
+    { "B921600", B921600},
+#endif
+#ifdef B1000000
+    { "B1000000", B1000000},
+#endif
+#ifdef B1152000
+    { "B1152000", B1152000},
+#endif
+#ifdef B1500000
+    { "B1500000", B1500000},
+#endif
+#ifdef B2000000
+    { "B2000000", B2000000},
+#endif
+#ifdef B2500000
+    { "B2500000", B2500000},
+#endif
+#ifdef B3000000
+    { "B3000000", B3000000},
+#endif
+#ifdef B3500000
+    { "B3500000", B3500000},
+#endif
+#ifdef B4000000
+    { "B4000000", B4000000},
+#endif
 #ifdef CBAUD
     {"CBAUD", CBAUD},
 #endif



More information about the Python-checkins mailing list