This adds i2c.dev_no to mos.yml, which instructs the driver to open /dev/i2c-? as backend for I2C.
It then implements a Linux I2C version of the driver, using ioctl() to select the slave, and read/write to write to it.
Notes:
Linux doesn't have a call to free/reset the bus
Linux doesn't expose the underlying SCL/SDA pins, so bitbanging a reset is not possible.
Linux doesn't allow stop bit to be absent (!)
Linux only supports 100KHz frequency.
Basic functionality works -- reading and writing, SMBUS register read/write, and scanning.
This adds
i2c.dev_no
to mos.yml, which instructs the driver to open /dev/i2c-? as backend for I2C. It then implements a Linux I2C version of the driver, using ioctl() to select the slave, and read/write to write to it.Notes:
Basic functionality works -- reading and writing, SMBUS register read/write, and scanning.