From 0f90142df9b01142eb7688b0bd44412c61bfbe27 Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Wed, 27 May 2015 10:24:10 -0700 Subject: [PATCH] tools: Allow pyboard constructor to take a baudrate parameter. This allows pyboard.py to be used over a UART interface rather than just over a USB serial interface. --- tools/pyboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pyboard.py b/tools/pyboard.py index 83b613d74b5a..27665d905540 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -41,8 +41,8 @@ class PyboardError(BaseException): pass class Pyboard: - def __init__(self, serial_device): - self.serial = serial.Serial(serial_device, baudrate=115200, interCharTimeout=1) + def __init__(self, serial_device, baudrate=115200): + self.serial = serial.Serial(serial_device, baudrate=baudrate, interCharTimeout=1) def close(self): self.serial.close()