summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2015-05-27 10:24:10 -0700
committerDamien George <damien.p.george@gmail.com>2015-05-27 23:01:28 +0100
commit669dbca9598e7ba39fab7344be19e7395b973003 (patch)
treedefa460928568f6e54353e19ad436131c651dddf
parent70446f46c2a970026c422b165853eda9dcbc10aa (diff)
downloadmicropython-669dbca9598e7ba39fab7344be19e7395b973003.tar.gz
micropython-669dbca9598e7ba39fab7344be19e7395b973003.zip
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.
-rwxr-xr-xtools/pyboard.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py
index 83b613d74b..27665d9055 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()