[avr] double-check the ACO to protect against spikes on the sensing circuit
This commit is contained in:
parent
4fc914558f
commit
35e79ca1bf
|
@ -241,6 +241,9 @@ ISR(TIMER1_COMPA_vect)
|
|||
|
||||
ISR(ANALOG_COMP_vect)
|
||||
{
|
||||
if (!(ACSR & (1 << ACO)))
|
||||
return;
|
||||
|
||||
disable_led();
|
||||
|
||||
event.brown_out++;
|
||||
|
|
Loading…
Reference in New Issue