[avr] double-check the ACO to protect against spikes on the sensing circuit

This commit is contained in:
Bart Van Der Meerssche 2011-02-15 22:52:46 +01:00
parent 4fc914558f
commit 35e79ca1bf
1 changed files with 3 additions and 0 deletions

View File

@ -241,6 +241,9 @@ ISR(TIMER1_COMPA_vect)
ISR(ANALOG_COMP_vect)
{
if (!(ACSR & (1 << ACO)))
return;
disable_led();
event.brown_out++;