Page 1 of 1

Clearing I2C ring buffer

Posted: Tue Dec 08, 2020 7:44 pm
by kmcgrath
I am working with ESP-IDF with ESP32. I am having trouble clearing the ring buffer without running i2c disable() which deletes the driver and requires an install which takes some time. I had thought perhaps reset would handle this but it doesn't clear the ring buffer out. Is there anyway to clear the I2C ring buffer without using disable()?

Re: Clearing I2C ring buffer

Posted: Wed Feb 24, 2021 9:02 pm
by mabensur
I am running into the same problem. Did you find any solution?

Re: Clearing I2C ring buffer

Posted: Thu Feb 25, 2021 12:45 pm
by Victoria Nope
I see no reason behind, but well, you might do it by adding your own function in the i2c.c driver source, because there is no function for that by now and the buffers rx_ring_buf and tx_ring_buf are internal, declared inside the static structure p_i2c_obj.