]> www.fi.muni.cz Git - bike-lights.git/commit
adc.c: abort the current reading when the timer expires
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 2 Jul 2013 10:03:19 +0000 (12:03 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 2 Jul 2013 10:06:00 +0000 (12:06 +0200)
commitb34429defa04d493a49e24ad8840e42600bd0f28
tree22192678c3d961f702f1b814e71384a229bc5e04
parentd52307e8b0b0b1113ba928e19ffa91340d037eda
adc.c: abort the current reading when the timer expires

Inside the timer interrupt, we may have changed the PWM outputs,
so the reading of ADC will be useless. Drop it in this case.

FIXME: possible race condition against timer IRQ.
firmware/adc.c