Hi ,
From base/microblaze/microblaze_python_libraries.ipynb, we can see that:
device.write(0x50, buf, 1)
device.read(0x50, buf, 2)
‘device’ is defined by device = lib.i2c_open(lib.PMOD_G4_B, lib.PMOD_G4_A).
If dir(device), we can see the available functions:
.
However, these are slightly different from the definition as the screenshot below, as well as in PYNQ/i2c.c at master · Xilinx/PYNQ · GitHub.
They start with i2c. For example the code above “device.write(0x50, buf, 1)” should be “lib.i2c_write(0x50, buf, 1)”.
The same is true for gpio and spi.
So questions are:
- are they equivalent, e.g. device.write vs lib.i2c_write ? the testing result is. Just want to confirm.
- any more specific documentation about it? would be good to read some references.
any input will be much appreciated.
Colin