diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2013-05-31 01:27:25 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2013-05-31 01:27:25 +0000 |
commit | 7816a6a659f0434770edf47d15d0ee24add3b04f (patch) | |
tree | cf62f4eb431dd51f7750c4f46473d9572c676b12 /serial | |
parent | f3da326297dcaae555247042c576b254550ad5da (diff) | |
download | pyserial-7816a6a659f0434770edf47d15d0ee24add3b04f.tar.gz |
[Bug pyserial:137] Patch to add non-standard baudrates to Cygwin
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@459 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'serial')
-rw-r--r-- | serial/serialposix.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/serial/serialposix.py b/serial/serialposix.py index 6f7bb47..1b7fe86 100644 --- a/serial/serialposix.py +++ b/serial/serialposix.py @@ -101,7 +101,19 @@ elif plat == 'cygwin': # cygwin/win32 (confirmed) def set_special_baudrate(port, baudrate): raise ValueError("sorry don't know how to handle non standard baud rate on this platform") - baudrate_constants = {} + baudrate_constants = { + 128000: 0x01003, + 256000: 0x01005, + 500000: 0x01007, + 576000: 0x01008, + 921600: 0x01009, + 1000000: 0x0100a, + 1152000: 0x0100b, + 1500000: 0x0100c, + 2000000: 0x0100d, + 2500000: 0x0100e, + 3000000: 0x0100f + } elif plat[:7] == 'openbsd': # OpenBSD |