mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
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.
This commit is contained in:
committed by
Damien George
parent
70446f46c2
commit
669dbca959
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user