tools/remove: add 0x to hex debug prints.
This commit is contained in:
parent
cddf19df98
commit
f918d0bf02
|
@ -33,7 +33,7 @@ class CommPCIe:
|
|||
for i in range(length_int):
|
||||
value = ctypes.c_uint32.from_buffer(self.mmap, addr + 4*i).value
|
||||
if self.debug:
|
||||
print("read {:08x} @ {:08x}".format(value, addr + 4*i))
|
||||
print("read 0x{:08x} @ 0x{:08x}".format(value, addr + 4*i))
|
||||
if length is None:
|
||||
return value
|
||||
data.append(value)
|
||||
|
@ -45,4 +45,4 @@ class CommPCIe:
|
|||
for i, value in enumerate(data):
|
||||
ctypes.c_uint32.from_buffer(self.mmap, addr + 4*i).value = value
|
||||
if self.debug:
|
||||
print("write {:08x} @ {:08x}".format(value, addr + 4*i))
|
||||
print("write 0x{:08x} @ 0x{:08x}".format(value, addr + 4*i))
|
||||
|
|
|
@ -61,7 +61,7 @@ class CommUART:
|
|||
for i in range(length_int):
|
||||
value = int.from_bytes(self._read(4), "big")
|
||||
if self.debug:
|
||||
print("read {:08x} @ {:08x}".format(value, addr + 4*i))
|
||||
print("read 0x{:08x} @ 0x{:08x}".format(value, addr + 4*i))
|
||||
if length is None:
|
||||
return value
|
||||
data.append(value)
|
||||
|
@ -83,6 +83,6 @@ class CommUART:
|
|||
for i, value in enumerate(data[offset:offset+size]):
|
||||
self._write(list(value.to_bytes(4, byteorder="big")))
|
||||
if self.debug:
|
||||
print("write {:08x} @ {:08x}".format(value, addr + offset, 4*i))
|
||||
print("write 0x{:08x} @ 0x{:08x}".format(value, addr + offset, 4*i))
|
||||
offset += size
|
||||
length -= size
|
||||
|
|
|
@ -48,7 +48,7 @@ class CommUDP:
|
|||
datas = packet.records.pop().writes.get_datas()
|
||||
if self.debug:
|
||||
for i, value in enumerate(datas):
|
||||
print("read {:08x} @ {:08x}".format(value, addr + 4*i))
|
||||
print("read 0x{:08x} @ 0x{:08x}".format(value, addr + 4*i))
|
||||
return datas[0] if length is None else datas
|
||||
|
||||
def write(self, addr, datas):
|
||||
|
@ -66,4 +66,4 @@ class CommUDP:
|
|||
|
||||
if self.debug:
|
||||
for i, value in enumerate(datas):
|
||||
print("write {:08x} @ {:08x}".format(value, addr + 4*i))
|
||||
print("write 0x{:08x} @ 0x{:08x}".format(value, addr + 4*i))
|
||||
|
|
|
@ -102,7 +102,7 @@ class CommUSB:
|
|||
if value is None:
|
||||
value = 0xffffffff
|
||||
if self.debug:
|
||||
print("read {:08x} @ {:08x}".format(value, addr))
|
||||
print("read 0x{:08x} @ 0x{:08x}".format(value, addr))
|
||||
if length is None:
|
||||
return value
|
||||
data.append(value)
|
||||
|
@ -137,7 +137,7 @@ class CommUSB:
|
|||
for i, value in enumerate(data):
|
||||
self.usb_write(addr, value)
|
||||
if self.debug:
|
||||
print("write {:08x} @ {:08x}".format(value, addr + 4*i))
|
||||
print("write 0x{:08x} @ 0x{:08x}".format(value, addr + 4*i))
|
||||
|
||||
def usb_write(self, addr, value, depth=0):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue