Commit bc0b9676 authored by Federico Vaga's avatar Federico Vaga

sw:py: dma_write returns the number of transfered bytes

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent c6b97be4
......@@ -65,6 +65,7 @@ class TestDma(object):
"""
spec.dma_start()
spec.dma_write(0, b"\x00" * dma_size)
assert count == dma_size
spec.dma_stop()
......
......@@ -46,6 +46,7 @@ class PySPEC:
start = 0
while len(data) - start > 0:
start += self.dma_file.write(bytes(data[start:]))
return start
def __dma_seek(self, offset):
self.dma_file.seek(offset)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment