SREG = cSREG;
is when they get turned back on again. cSREG is an unsigned byte, so when I do the following when the interrupts are enabled:
cSREG = SREG;
The state of all the status registers is saved.
And when I do:
SREG = cSREG;
The status register gets put back just how it was before doing cli(); This re-enables the interrupts.
|