1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-23 08:45:22 +03:00

Interrupt cleanup

Fixes issue of reentrant calls to nointerrupts()
exposed functional replacements to cli sei and SREG when dealing with
interrupts
InterruptLock class to auto stop and restore interrupt level
Fix user ISR calls to be like Arduino with interrupts disabled fully.
This commit is contained in:
Makuna
2015-08-03 19:35:17 -07:00
parent 8e09520501
commit 57642c10b6
5 changed files with 58 additions and 18 deletions

View File

@ -59,8 +59,6 @@ static uint8_t s_servoCount = 0; // the total number of attached s_se
//------------------------------------------------------------------------------
template <class T> void Servo_Handler(T* timer)
{
noInterrupts();
uint8_t servoIndex;
// clear interrupt
@ -101,8 +99,6 @@ template <class T> void Servo_Handler(T* timer)
timer->setEndOfCycle();
}
interrupts();
}
static void initISR(ServoTimerSequence timerId)