aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32L1xx/adc_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-23 15:48:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-23 15:48:55 +0000
commitc39d08fc2ae9c43f73114e24292520306bddde19 (patch)
tree7bae8c26f8e20566aba8755f0cd3bb34d2ac4f87 /os/hal/platforms/STM32L1xx/adc_lld.c
parentd2721c36a6d74fd18de7e4de95fdd166083e343e (diff)
downloadChibiOS-c39d08fc2ae9c43f73114e24292520306bddde19.tar.gz
ChibiOS-c39d08fc2ae9c43f73114e24292520306bddde19.tar.bz2
ChibiOS-c39d08fc2ae9c43f73114e24292520306bddde19.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3384 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32L1xx/adc_lld.c')
-rw-r--r--os/hal/platforms/STM32L1xx/adc_lld.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32L1xx/adc_lld.c b/os/hal/platforms/STM32L1xx/adc_lld.c
index a2149b6ae..74c9a6ee3 100644
--- a/os/hal/platforms/STM32L1xx/adc_lld.c
+++ b/os/hal/platforms/STM32L1xx/adc_lld.c
@@ -84,7 +84,7 @@ static void adc_lld_serve_rx_interrupt(ADCDriver *adcp, uint32_t flags) {
*
* @isr
*/
-CH_IRQ_HANDLER(UART5_IRQHandler) {
+CH_IRQ_HANDLER(ADC1_IRQHandler) {
uint32_t sr;
CH_IRQ_PROLOGUE();
@@ -96,6 +96,7 @@ CH_IRQ_HANDLER(UART5_IRQHandler) {
to read data fast enough.*/
_adc_isr_error_code(&ADCD1, ADC_ERR_OVERFLOW);
}
+ /* TODO: Add here analog watchdog handling.*/
CH_IRQ_EPILOGUE();
}
@@ -146,6 +147,8 @@ void adc_lld_start(ADCDriver *adcp) {
chDbgAssert(!b, "adc_lld_start(), #1", "stream already allocated");
dmaStreamSetPeripheral(adcp->dmastp, &ADC1->DR);
rccEnableADC1(FALSE);
+ NVICEnableVector(ADC1_IRQn,
+ CORTEX_PRIORITY_MASK(STM32_ADC_ADC1_IRQ_PRIORITY));
}
#endif