[fpc-pascal] FPC/Lazarus on RPi4 - How to read/write I2C connected EEPROM?
christo.crause at gmail.com
Sun Apr 2 07:31:43 CEST 2023
On Sat, Apr 1, 2023 at 9:57 PM Bo Berglund via fpc-pascal <
fpc-pascal at lists.freepascal.org> wrote:
> Can I use Linux file system commands to read/write the data on the i2c
> memory device and if so how from fpc?
To some extent it is possible to handle i2c transactions as file read/write
operations, but some ioctl calls are required to configure e.g. the device
address . Take note that only a subset of i2c functionality is available
using read/write calls. Lazi2cdev  uses this approach.
For finer control over the i2c transactions (for example combined
write/read transactions) low level ioctl calls are available in Linux. I
wrote an i2c class  using this approach.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal