I have an Atmega328 programmed using the Arduino software and libraries (but is standalone on on a board in the TSOP package) without bootloader and with ISP programming). I am using the Wire library to act as an I2C peripheral, where I implement (and register) the requestEvent
and receiveEvent
callbacks.
Is it possible to determine, either during the requestEvent
callback or after it at some point, how many bytes were read by the master before it sent a NACK?