Skip to content

[Question] Why you disable global interrupts? #9

@hitech95

Description

@hitech95

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions