uart2wishbone: add default baudrate

This commit is contained in:
Florent Kermarrec 2014-06-05 14:43:29 +02:00
parent b94cba2d4b
commit 8719206a3a
2 changed files with 3 additions and 3 deletions

View File

@ -10,9 +10,9 @@ def write_b(uart, data):
class Uart2Wishbone:
WRITE_CMD = 0x01
READ_CMD = 0x02
def __init__(self, port, baudrate, addrmap=None, debug=False):
def __init__(self, port, baudrate=115200, addrmap=None, debug=False):
self.port = port
self.baudrate = baudrate
self.baudrate = str(baudrate)
self.debug = debug
self.uart = serial.Serial(port, baudrate, timeout=0.25)
self.regs = build_map(addrmap, self.read, self.write)

View File

@ -161,7 +161,7 @@ class UARTMux(Module):
class UART2Wishbone(Module, AutoCSR):
WRITE_CMD = 0x01
READ_CMD = 0x02
def __init__(self, pads, clk_freq, baud, share_uart=False):
def __init__(self, pads, clk_freq, baud=115200, share_uart=False):
# Wishbone interface
self.wishbone = wishbone.Interface()