aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/NRF51/NRF51822/adc_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/NRF51/NRF51822/adc_lld.c')
-rw-r--r--os/hal/ports/NRF51/NRF51822/adc_lld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/adc_lld.c b/os/hal/ports/NRF51/NRF51822/adc_lld.c
index 0c28cb0..7f3413c 100644
--- a/os/hal/ports/NRF51/NRF51822/adc_lld.c
+++ b/os/hal/ports/NRF51/NRF51822/adc_lld.c
@@ -171,11 +171,12 @@ void adc_lld_stop(ADCDriver *adcp) {
if (adcp->state == ADC_READY) {
#if NRF51_ADC_USE_ADC1
- if (&ADCD1 == adcp)
+ if (&ADCD1 == adcp) {
nvicDisableVector(ADC_IRQn);
adcp->adc->INTENCLR = ADC_INTENCLR_END_Clear << ADC_INTENCLR_END_Pos;
adc_lld_stop_conversion(adcp);
+ }
#endif
}
}