Do not recursively enter temperature_isr
Disable the interrupt source instead, which avoids the added latency of reentering the isr in the first place.
This commit is contained in:
parent
82e221e3c7
commit
2535d072c4
|
|
@ -1777,15 +1777,11 @@ ISR(TIMER2_COMPB_vect)
|
||||||
ISR(TIMER0_COMPB_vect)
|
ISR(TIMER0_COMPB_vect)
|
||||||
#endif //SYSTEM_TIMER_2
|
#endif //SYSTEM_TIMER_2
|
||||||
{
|
{
|
||||||
static bool _lock = false;
|
DISABLE_TEMPERATURE_INTERRUPT();
|
||||||
if (!_lock)
|
sei();
|
||||||
{
|
temperature_isr();
|
||||||
_lock = true;
|
cli();
|
||||||
sei();
|
ENABLE_TEMPERATURE_INTERRUPT();
|
||||||
temperature_isr();
|
|
||||||
cli();
|
|
||||||
_lock = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void check_max_temp()
|
void check_max_temp()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue