I'm trying to use ESP32's I2C functionality as a slave. When the I2C master wants to read/write data from/to the slave, it sets the lowest bit of the I2C address to either 0 (write) or 1 (read). However, I can't seem to figure out how to get this value from ESP-IDF's I2C slave functions.
As an example, the master, when it wants to read SMBus register 0x45 from the slave device with address 0x53, will write to the bus (each line is a byte, and I've left out start and ack/nack bits):
Code: Select all
(0x53 << 1) | 0x1
0x45