aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/adc_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/templates/adc_lld.c')
-rw-r--r--os/hal/templates/adc_lld.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/os/hal/templates/adc_lld.c b/os/hal/templates/adc_lld.c
index da80b8a7f..9259bead6 100644
--- a/os/hal/templates/adc_lld.c
+++ b/os/hal/templates/adc_lld.c
@@ -24,7 +24,7 @@
#include "hal.h"
-#if HAL_USE_ADC || defined(__DOXYGEN__)
+#if (HAL_USE_ADC == TRUE) || defined(__DOXYGEN__)
/*===========================================================================*/
/* Driver local definitions. */
@@ -37,7 +37,7 @@
/**
* @brief ADC1 driver identifier.
*/
-#if PLATFORM_ADC_USE_ADC1 || defined(__DOXYGEN__)
+#if (PLATFORM_ADC_USE_ADC1 == TRUE) || defined(__DOXYGEN__)
ADCDriver ADCD1;
#endif
@@ -64,10 +64,10 @@ ADCDriver ADCD1;
*/
void adc_lld_init(void) {
-#if PLATFORM_ADC_USE_ADC1
+#if PLATFORM_ADC_USE_ADC1 == TRUE
/* Driver initialization.*/
adcObjectInit(&ADCD1);
-#endif /* PLATFORM_ADC_USE_ADC1 */
+#endif
}
/**
@@ -81,11 +81,11 @@ void adc_lld_start(ADCDriver *adcp) {
if (adcp->state == ADC_STOP) {
/* Enables the peripheral.*/
-#if PLATFORM_ADC_USE_ADC1
+#if PLATFORM_ADC_USE_ADC1 == TRUE
if (&ADCD1 == adcp) {
}
-#endif /* PLATFORM_ADC_USE_ADC1 */
+#endif
}
/* Configures the peripheral.*/
@@ -104,11 +104,11 @@ void adc_lld_stop(ADCDriver *adcp) {
/* Resets the peripheral.*/
/* Disables the peripheral.*/
-#if PLATFORM_ADC_USE_ADC1
+#if PLATFORM_ADC_USE_ADC1 == TRUE
if (&ADCD1 == adcp) {
}
-#endif /* PLATFORM_ADC_USE_ADC1 */
+#endif
}
}
@@ -136,6 +136,6 @@ void adc_lld_stop_conversion(ADCDriver *adcp) {
(void)adcp;
}
-#endif /* HAL_USE_ADC */
+#endif /* HAL_USE_ADC == TRUE */
/** @} */