Skip to content
Snippets Groups Projects
Commit 669dbca9 authored by Dave Hylands's avatar Dave Hylands Committed by Damien George
Browse files

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.
parent 70446f46
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment