NeoHWSerial icon indicating copy to clipboard operation
NeoHWSerial copied to clipboard

[Question] Why you disable global interrupts?

Open hitech95 opened this issue 7 years ago • 0 comments

I have a question about why you disable the interrupts here: https://github.com/SlashDevin/NeoHWSerial/blob/master/1.6.5r2/NeoHWSerial.cpp#L214

void NeoHWSerial::attachInterrupt( isr_t fn )
{
  uint8_t oldSREG = SREG;
  cli();
    _isr = fn;
  SREG = oldSREG;
}

hitech95 avatar Dec 17 '18 12:12 hitech95