micropython/tests/ports/rp2/rp2_dma.py.exp

17 wiersze
763 B
Plaintext

# test basic usage
DMA(0)
{'inc_read': 1, 'high_pri': 0, 'write_err': 0, 'ring_sel': 0, 'enable': 1, 'treq_sel': 63, 'sniff_en': 0, 'irq_quiet': 1, 'read_err': 0, 'chain_to': 0, 'busy': 0, 'inc_write': 1, 'ring_size': 0, 'bswap': 0, 'size': 2, 'ahb_err': 0}
0 0 0 4161593 0 <memoryview>
ValueError
# test memory copy
True
bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07') bytearray(b'\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff')
# test timing
True
bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07') bytearray(b'\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff')
# test immediate trigger
bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07') bytearray(b'\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff')
# test irq
irq fired
bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07') bytearray(b'\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff')