ESP I2C: Read a specific byte in ESP32 slave inner buffer?
Posted: Mon Sep 20, 2021 1:19 pm
Hello all,
I want to transfer data between two ESP32 through I2C instead of ESP-NOW.
When the ESP32 is set as a slave device, it maintans a slave address and an internal ring buffer. The protocol used by ESP is: after receiving the slave address, the slave device will immediately send N bytes to the I2C bus from the very first byte in the ring buffer.
Is it possible to specify the start address to be read from? I feel it would be more natrual if the slave device can maintain a fixed-size buffer and refresh it perodically. The protocol should also be modified so that the master can specify the start address to be read in the buffer. By this way the ESP slave device would look like an I2C device with 128 registers if the buffer length is set to 128 for example.
Best Regards
Zhao
I want to transfer data between two ESP32 through I2C instead of ESP-NOW.
When the ESP32 is set as a slave device, it maintans a slave address and an internal ring buffer. The protocol used by ESP is: after receiving the slave address, the slave device will immediately send N bytes to the I2C bus from the very first byte in the ring buffer.
Is it possible to specify the start address to be read from? I feel it would be more natrual if the slave device can maintain a fixed-size buffer and refresh it perodically. The protocol should also be modified so that the master can specify the start address to be read in the buffer. By this way the ESP slave device would look like an I2C device with 128 registers if the buffer length is set to 128 for example.
Best Regards
Zhao