tools/remote/comm_uart: fix offset on write bursts.

This commit is contained in:
Florent Kermarrec 2020-09-02 17:10:39 +02:00
parent 6250d4fa41
commit 222e3f4003
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class CommUART:
"fixed": CMD_WRITE_BURST_FIXED,
}[burst]
self._write([cmd, size])
self._write(list(((addr+offset)//4).to_bytes(4, byteorder="big")))
self._write(list(((addr//4 + offset).to_bytes(4, byteorder="big"))))
for i, value in enumerate(data[offset:offset+size]):
self._write(list(value.to_bytes(4, byteorder="big")))
if self.debug: