Your understanding of the waveforms is correct.
I agree with your comment that there may not be much time gained implementing an I2C event (except for large data chunks such as displays). I find it always a challenge to take into account the lower speed of a small CPU compared to the desktop beasts we use to develop our hardware/firmware :).
A combined 'writeTo - readFrom' might be an easier cycle-saver : an I2C read transaction almost always starts with write-register-address - but that's only something to add to the whish-list...
var data = i2c.readFrom(i2c_address, count);
// whish :
var data = i2c.readFromAddress(i2c_address, register_address, count);
© Espruino, powered by microcosm.
Report a problem