diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-11-08 14:49:52 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-11-08 14:49:52 +0000 |
commit | 8f814aba602e2e672b6a306e693cc6e3be178563 (patch) | |
tree | 55f6c9ed27070f5a2963bd4ff0dfdd2ce14ed2a0 | |
parent | 84683817cd0373780776b97c5f39bf5bdf716757 (diff) | |
download | ChibiOS-8f814aba602e2e672b6a306e693cc6e3be178563.tar.gz ChibiOS-8f814aba602e2e672b6a306e693cc6e3be178563.tar.bz2 ChibiOS-8f814aba602e2e672b6a306e693cc6e3be178563.zip |
Fixed bug #903.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10977 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.c | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/ADCv1/hal_adc_lld.h | 4 | ||||
-rw-r--r-- | readme.txt | 1 |
3 files changed, 5 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
diff --git a/readme.txt b/readme.txt index 23b750abd..aab6e2c9b 100644 --- a/readme.txt +++ b/readme.txt @@ -152,6 +152,7 @@ dependencies and configuration directories. This makes possible
to have multiple non-conflicting makefiles in the same project.
Updated the various platform.mk implementing "smart build" mode.
+- HAL: Fixed ADC does not build on STM32F030 (bug #903)(backported to 17.6.4).
- LIB: Fixed typo for function evtStop (bug #897)(backported to 17.6.4
and 16.1.10).
- NIL: Fixed core and Heap allocators not functional in NIL (bug #902)
|