Skip to content

Commit

Permalink
tools: Allow pyboard constructor to take a baudrate parameter.
Browse files Browse the repository at this point in the history
This allows pyboard.py to be used over a UART interface
rather than just over a USB serial interface.
  • Loading branch information
dhylands committed May 27, 2015
1 parent 967f323 commit 0f90142
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/pyboard.py
Expand Up @@ -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()
Expand Down

0 comments on commit 0f90142

Please sign in to comment.