Open schmmi opened 3 years ago
See line 196:
SREG = oldSREG; // turn interrupts back on
The technique of saving the status register and restoring it is a standard method of turning interrupts back on.
If we used sei() as you suggest, and they were not on anyway then we have now changed interrupts from not on to on. The method of saving and restoring SREG makes sure that the interrupts are back the way they were beforehand.
SendOnlySoftwareSerial line 168 disables interrupt. However interrupts are not enabled again. Probably sei() is missing at the end of the function.