diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-10-03 10:10:58 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-10-03 10:10:58 +0000 |
commit | 3e35320975201e4693f8ae3e39b758ea582042b9 (patch) | |
tree | 517a960cc83aee12241b50a9b8ea5e611fa805b7 | |
parent | 35c88286dff9473991103b9eff5aa69d2120d515 (diff) | |
download | ChibiOS-3e35320975201e4693f8ae3e39b758ea582042b9.tar.gz ChibiOS-3e35320975201e4693f8ae3e39b758ea582042b9.tar.bz2 ChibiOS-3e35320975201e4693f8ae3e39b758ea582042b9.zip |
ADC hooks renamed.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9839 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c b/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c index 664a05a66..d4bc0da26 100644 --- a/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c +++ b/os/hal/ports/STM32/LLD/ADCv3/hal_adc_lld.c @@ -313,9 +313,6 @@ static void adc_lld_serve_interrupt(ADCDriver *adcp, uint32_t isr) { /* Analog watchdog error.*/
_adc_isr_error_code(adcp, ADC_ERR_AWD3);
}
-#if defined(STM32_ADC_IRQ_HOOK)
- STM32_ADC_IRQ_HOOK
-#endif
}
}
@@ -335,25 +332,36 @@ OSAL_IRQ_HANDLER(STM32_ADC1_HANDLER) { OSAL_IRQ_PROLOGUE();
#if STM32_ADC_DUAL_MODE
+
isr = ADC1->ISR;
isr |= ADC2->ISR;
ADC1->ISR = isr;
ADC2->ISR = isr;
-
+#if defined(STM32_ADC_ADC12_IRQ_HOOK)
+ STM32_ADC_ADC12_IRQ_HOOK
+#endif
adc_lld_serve_interrupt(&ADCD1, isr);
+
#else /* !STM32_ADC_DUAL_MODE */
+
#if STM32_ADC_USE_ADC1
isr = ADC1->ISR;
ADC1->ISR = isr;
-
+#if defined(STM32_ADC_ADC1_IRQ_HOOK)
+ STM32_ADC_ADC1_IRQ_HOOK
+#endif
adc_lld_serve_interrupt(&ADCD1, isr);
#endif
+
#if STM32_ADC_USE_ADC2
isr = ADC2->ISR;
ADC2->ISR = isr;
-
+#if defined(STM32_ADC_ADC2_IRQ_HOOK)
+ STM32_ADC_ADC2_IRQ_HOOK
+#endif
adc_lld_serve_interrupt(&ADCD2, isr);
#endif
+
#endif /* !STM32_ADC_DUAL_MODE */
OSAL_IRQ_EPILOGUE();
@@ -373,7 +381,9 @@ OSAL_IRQ_HANDLER(STM32_ADC3_HANDLER) { isr = ADC3->ISR;
ADC3->ISR = isr;
-
+#if defined(STM32_ADC_ADC3_IRQ_HOOK)
+ STM32_ADC_ADC3_IRQ_HOOK
+#endif
adc_lld_serve_interrupt(&ADCD3, isr);
OSAL_IRQ_EPILOGUE();
|