Skip to content

Commit 669dbca

Browse files
dhylandsdpgeorge
authored andcommitted
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.
1 parent 70446f4 commit 669dbca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/pyboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class PyboardError(BaseException):
4141
pass
4242

4343
class Pyboard:
44-
def __init__(self, serial_device):
45-
self.serial = serial.Serial(serial_device, baudrate=115200, interCharTimeout=1)
44+
def __init__(self, serial_device, baudrate=115200):
45+
self.serial = serial.Serial(serial_device, baudrate=baudrate, interCharTimeout=1)
4646

4747
def close(self):
4848
self.serial.close()

0 commit comments

Comments
 (0)