a question for the experts:
i got a program that needs to use the wire library to act as a i2c slave.
i also need to take advantage of i2c clock stretching since some commands will take a while to complete and by using clock stretching i have a way to prevent i2c master from sending commands too fast.
in my onReceive callback that is run from an interrupt i'm using another library that disables interrupts and then turns the back on again.
what happens to the i2c clock stretching when interrupts are turned off and then back on again like this?
will noInterrupts()/interrupts() clear the pending i2c interrupt too and therefor also disable the clock stretching possibly halfway thru my code?
basically how do noInterrupts()/interrupts() affect pending interrupts? are they cleared? if so i have a problem.
the processor in question is a 328p