litescope/drivers: do not build regs when addrmap is None
This commit is contained in:
parent
a266deb58e
commit
70f1f96fda
|
@ -11,6 +11,7 @@ class LiteScopeEtherboneDriver:
|
|||
|
||||
self.tx_sock = None
|
||||
self.rx_sock = None
|
||||
if addrmap is not None:
|
||||
self.regs = build_map(addrmap, busword, self.read, self.write)
|
||||
|
||||
def open(self):
|
||||
|
|
|
@ -15,6 +15,7 @@ class LiteScopeUARTDriver:
|
|||
self.baudrate = str(baudrate)
|
||||
self.debug = debug
|
||||
self.uart = serial.Serial(port, baudrate, timeout=0.25)
|
||||
if addrmap is not None:
|
||||
self.regs = build_map(addrmap, busword, self.read, self.write)
|
||||
|
||||
def open(self):
|
||||
|
|
Loading…
Reference in New Issue