diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-17 22:09:04 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-17 22:09:04 +0000 |
commit | 1dd5442c8c6c3b7d77133825abf147501de36093 (patch) | |
tree | c09e96c7c821d8c6b48eea4e21b684709d6345b4 /os | |
parent | ea7ffbbbc0d052c5fe36014b9f18b47961c9e614 (diff) | |
download | ChibiOS-1dd5442c8c6c3b7d77133825abf147501de36093.tar.gz ChibiOS-1dd5442c8c6c3b7d77133825abf147501de36093.tar.bz2 ChibiOS-1dd5442c8c6c3b7d77133825abf147501de36093.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1313 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/io/platforms/STM32/adc_lld.c | 3 | ||||
-rw-r--r-- | os/io/platforms/STM32/adc_lld.h | 11 |
2 files changed, 8 insertions, 6 deletions
diff --git a/os/io/platforms/STM32/adc_lld.c b/os/io/platforms/STM32/adc_lld.c index 7a0fe64ea..9a482c045 100644 --- a/os/io/platforms/STM32/adc_lld.c +++ b/os/io/platforms/STM32/adc_lld.c @@ -51,7 +51,7 @@ CH_IRQ_HANDLER(Vector6C) { CH_IRQ_PROLOGUE();
if ((DMA1->ISR & DMA_ISR_TEIF1) != 0)
- chEvtBroadcastI(&ADCD1.ad_dmaerror);
+ STM32_ADC1_DMA_ERROR_HOOK();
else {
/* */
}
@@ -76,7 +76,6 @@ void adc_lld_init(void) { ADCD1.ad_adc = ADC1;
ADCD1.ad_dma = DMA1_Channel1;
ADCD1.ad_dmaprio = STM32_ADC1_DMA_PRIORITY << 12;
- chEvtInit(&ADCD1.ad_dmaerror);
#endif
}
diff --git a/os/io/platforms/STM32/adc_lld.h b/os/io/platforms/STM32/adc_lld.h index 309981869..7c3249741 100644 --- a/os/io/platforms/STM32/adc_lld.h +++ b/os/io/platforms/STM32/adc_lld.h @@ -61,6 +61,13 @@ #define STM32_ADC1_IRQ_PRIORITY 0x70
#endif
+/**
+ * @brief ADC1 DMA error hook. + */
+#if !defined(STM32_ADC1_DMA_ERROR_HOOK) || defined(__DOXYGEN__)
+#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
+#endif
+
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/
@@ -177,10 +184,6 @@ typedef struct { * @brief DMA priority bit mask.
*/
uint32_t ad_dmaprio;
- /**
- * @brief DMA error event.
- */
- EventSource ad_dmaerror;
} ADCDriver;
/*===========================================================================*/
|