projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04c64eb
)
flterm.py: use serial_for_url
author
Joe Britton
<joe.britton@gmail.com>
Fri, 26 Jun 2015 09:40:18 +0000
(11:40 +0200)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Fri, 26 Jun 2015 09:40:33 +0000
(11:40 +0200)
tools/flterm.py
patch
|
blob
|
history
diff --git
a/tools/flterm.py
b/tools/flterm.py
index 84b385ed8db46ac3706d469ec195f3c1055b7758..912509af8e6953d1c3381c0f01da3de8a7e2366f 100644
(file)
--- a/
tools/flterm.py
+++ b/
tools/flterm.py
@@
-117,7
+117,14
@@
class Flterm:
def open(self, port, speed):
port = port if not port.isdigit() else int(port)
- self.serial = serial.Serial(port, speed, timeout=0.25)
+ self.serial = serial.serial_for_url(
+ port,
+ baudrate=speed,
+ bytesize=8,
+ parity="N",
+ stopbits=1,
+ xonxoff=0,
+ timeout=0.25)
self.serial.flushOutput()
self.serial.flushInput()
self.serial.close() # in case port was not correctly closed