From: Joe Britton Date: Fri, 26 Jun 2015 09:40:18 +0000 (+0200) Subject: flterm.py: use serial_for_url X-Git-Tag: 24jan2021_ls180~2219 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1e3fb16ac0e0d20f50a489fcccb7f1806a7dcbf;p=litex.git flterm.py: use serial_for_url --- diff --git a/tools/flterm.py b/tools/flterm.py index 84b385ed..912509af 100644 --- 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