aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmaple/stm32f1/adc.c4
-rw-r--r--libmaple/stm32f1/include/series/adc.h4
2 files changed, 3 insertions, 5 deletions
diff --git a/libmaple/stm32f1/adc.c b/libmaple/stm32f1/adc.c
index 8242520..bb6f8ca 100644
--- a/libmaple/stm32f1/adc.c
+++ b/libmaple/stm32f1/adc.c
@@ -51,7 +51,7 @@ static adc_dev adc2 = {
/** ADC2 device. */
const adc_dev *ADC2 = &adc2;
-#ifdef STM32_HIGH_DENSITY
+#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
adc_dev adc3 = {
.regs = ADC3_BASE,
.clk_id = RCC_ADC3
@@ -92,7 +92,7 @@ void adc_set_prescaler(adc_prescaler pre) {
void adc_foreach(void (*fn)(const adc_dev*)) {
fn(ADC1);
fn(ADC2);
-#ifdef STM32_HIGH_DENSITY
+#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
fn(ADC3);
#endif
}
diff --git a/libmaple/stm32f1/include/series/adc.h b/libmaple/stm32f1/include/series/adc.h
index 1798e55..45a5e9d 100644
--- a/libmaple/stm32f1/include/series/adc.h
+++ b/libmaple/stm32f1/include/series/adc.h
@@ -43,7 +43,7 @@
extern const struct adc_dev *ADC1;
extern const struct adc_dev *ADC2;
-#ifdef STM32_HIGH_DENSITY
+#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
extern const struct adc_dev *ADC3;
#endif
@@ -55,10 +55,8 @@ extern const struct adc_dev *ADC3;
#define ADC1_BASE ((struct adc_reg_map*)0x40012400)
/** ADC2 register map base pointer. */
#define ADC2_BASE ((struct adc_reg_map*)0x40012800)
-#ifdef STM32_HIGH_DENSITY
/** ADC3 register map base pointer. */
#define ADC3_BASE ((struct adc_reg_map*)0x40013C00)
-#endif
/*
* Register bit definitions