aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/AT91SAM7/adc_lld.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/AT91SAM7/adc_lld.c b/os/hal/platforms/AT91SAM7/adc_lld.c
index 066e3c542..0ffea3db1 100644
--- a/os/hal/platforms/AT91SAM7/adc_lld.c
+++ b/os/hal/platforms/AT91SAM7/adc_lld.c
@@ -117,6 +117,7 @@ ADCDriver ADCD1;
if ((isr & AT91C_ADC_EOC5)) dummy = ADCReg1->ADC_CDR5; \
if ((isr & AT91C_ADC_EOC6)) dummy = ADCReg1->ADC_CDR6; \
if ((isr & AT91C_ADC_EOC7)) dummy = ADCReg1->ADC_CDR7; \
+ (void) dummy; \
}
#define adc_stop() { \
adc_disable(); \
@@ -160,6 +161,9 @@ static void handleint(void) {
/* Half transfer processing.*/
} else if ((isr & AT91C_ADC_ENDRX)) {
+ // Make sure we get a full complete next time.
+ ADCReg1->ADC_RNPR = 0;
+ ADCReg1->ADC_RNCR = 0;
_adc_isr_half_code(&ADCD1);
}