aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c4
-rw-r--r--os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c b/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c
index 2f67aa80a..9968adabd 100644
--- a/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c
+++ b/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c
@@ -395,7 +395,7 @@ void adcSTM32DisableTS(void) {
ADC->CCR &= ~ADC_CCR_TSEN;
}
-#ifdef STM32F0XX
+#if defined(ADC_CCR_VBATEN) || defined(__DOXYGEN__)
/**
* @brief Enables the VBATEN bit.
* @details The VBATEN bit is required in order to sample the VBAT channel.
@@ -425,7 +425,7 @@ void adcSTM32DisableVBAT(void) {
ADC->CCR &= ~ADC_CCR_VBATEN;
}
-#endif /* STM32F0XX */
+#endif /* defined(ADC_CCR_VBATEN) */
#endif /* HAL_USE_ADC */
diff --git a/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.h b/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.h
index 93bba6cb9..f67821701 100644
--- a/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.h
+++ b/os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.h
@@ -434,10 +434,10 @@ extern "C" {
void adcSTM32DisableVREF(void);
void adcSTM32EnableTS(void);
void adcSTM32DisableTS(void);
-#ifdef STM32F0XX
+#if defined(ADC_CCR_VBATEN)
void adcSTM32EnableVBAT(void);
void adcSTM32DisableVBAT(void);
-#endif /* STM32F0XX */
+#endif
#ifdef __cplusplus
}
#endif