aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-28 10:43:14 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-09-28 10:43:14 +0000
commit52c1339d2333672a1824f1dc7ee8174cf5876ba4 (patch)
tree5d010cb1e3e5dd8239a52ee25b434663240670c7
parentc822cd9ad142dbc409847c7d987d4090858400a2 (diff)
downloadChibiOS-52c1339d2333672a1824f1dc7ee8174cf5876ba4.tar.gz
ChibiOS-52c1339d2333672a1824f1dc7ee8174cf5876ba4.tar.bz2
ChibiOS-52c1339d2333672a1824f1dc7ee8174cf5876ba4.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7330 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/STM32/STM32F30x/adc_lld.h8
-rw-r--r--os/hal/ports/STM32/STM32F30x/ext_lld_isr.c4
-rw-r--r--os/hal/ports/STM32/STM32F30x/stm32_registry.h6
3 files changed, 15 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/STM32F30x/adc_lld.h b/os/hal/ports/STM32/STM32F30x/adc_lld.h
index a720f02bb..bc8a7c25b 100644
--- a/os/hal/ports/STM32/STM32F30x/adc_lld.h
+++ b/os/hal/ports/STM32/STM32F30x/adc_lld.h
@@ -248,10 +248,18 @@
#error "ADC1 not present in the selected device"
#endif
+#if STM32_ADC_DUAL_MODE && STM32_ADC_USE_ADC1 && !STM32_HAS_ADC2
+#error "ADC2 not present in the selected device"
+#endif
+
#if STM32_ADC_USE_ADC3 && !STM32_HAS_ADC3
#error "ADC3 not present in the selected device"
#endif
+#if STM32_ADC_DUAL_MODE && STM32_ADC_USE_ADC2 && !STM32_HAS_ADC4
+#error "ADC4 not present in the selected device"
+#endif
+
#if !STM32_ADC_USE_ADC1 && !STM32_ADC_USE_ADC3
#error "ADC driver activated but no ADC peripheral assigned"
#endif
diff --git a/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c b/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c
index affe82900..b16158d8b 100644
--- a/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c
+++ b/os/hal/ports/STM32/STM32F30x/ext_lld_isr.c
@@ -370,7 +370,9 @@ void ext_lld_exti_irq_enable(void) {
nvicEnableVector(RTC_WKUP_IRQn, STM32_EXT_EXTI20_IRQ_PRIORITY);
nvicEnableVector(COMP1_2_3_IRQn, STM32_EXT_EXTI21_22_29_IRQ_PRIORITY);
nvicEnableVector(COMP4_5_6_IRQn, STM32_EXT_EXTI30_32_IRQ_PRIORITY);
+#if STM32_EXTI_NUM_CHANNELS >= 34
nvicEnableVector(COMP7_IRQn, STM32_EXT_EXTI33_IRQ_PRIORITY);
+#endif
}
/**
@@ -394,7 +396,9 @@ void ext_lld_exti_irq_disable(void) {
nvicDisableVector(RTC_WKUP_IRQn);
nvicDisableVector(COMP1_2_3_IRQn);
nvicDisableVector(COMP4_5_6_IRQn);
+#if STM32_EXTI_NUM_CHANNELS >= 34
nvicDisableVector(COMP7_IRQn);
+#endif
}
#endif /* HAL_USE_EXT */
diff --git a/os/hal/ports/STM32/STM32F30x/stm32_registry.h b/os/hal/ports/STM32/STM32F30x/stm32_registry.h
index 9ba44a970..a3844eadb 100644
--- a/os/hal/ports/STM32/STM32F30x/stm32_registry.h
+++ b/os/hal/ports/STM32/STM32F30x/stm32_registry.h
@@ -65,7 +65,7 @@
#define STM32_HAS_ETH FALSE
/* EXTI attributes.*/
-#define STM32_EXTI_NUM_CHANNELS 36
+#define STM32_EXTI_NUM_CHANNELS 34
/* GPIO attributes.*/
#define STM32_HAS_GPIOA TRUE
@@ -687,7 +687,7 @@
#define STM32_HAS_ETH FALSE
/* EXTI attributes.*/
-#define STM32_EXTI_NUM_CHANNELS 36
+#define STM32_EXTI_NUM_CHANNELS 34
/* GPIO attributes.*/
#define STM32_HAS_GPIOA TRUE
@@ -1149,7 +1149,7 @@
#define STM32_HAS_ETH FALSE
/* EXTI attributes.*/
-#define STM32_EXTI_NUM_CHANNELS 36
+#define STM32_EXTI_NUM_CHANNELS 34
/* GPIO attributes.*/
#define STM32_HAS_GPIOA TRUE