[!ATTENTION] This is under development.
- Abstract access to devices and registers by Python classes.
- Replace C programs with
mmapor the usage ofdevmemfor testing register accesses.
from pyDeviceAccess import Device, RegisterMode
with Device(0x8000_0000, size=256) as dev:
ctrl = dev.UInt32(0x00)
status = dev.UInt32(0x04, mode=RegisterMode.READ_ONLY)
fifo = dev.UInt32Array(0x10, count=8, mode=RegisterMode.WRITE_ONLY)
ctrl.value = 0x0000_0001
print(hex(status.value))
for i, reg in enumerate(fifo):
reg.value = i- Patrick Lehmann (Maintainer)
- Sven Köhler
- and more...
This Python package (source code) is licensed under Apache License 2.0.
The accompanying documentation is licensed under Creative Commons - Attribution-4.0 (CC-BY 4.0).
SPDX-License-Identifier: Apache-2.0