From 781b0b129cccbecba160effce8c4ddd68295b8b9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 11 Sep 2010 10:57:11 +0000 Subject: Fixed bug 3064204. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2175 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/adc.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'os/hal/include/adc.h') diff --git a/os/hal/include/adc.h b/os/hal/include/adc.h index 8b1bfd47b..8a2af908e 100644 --- a/os/hal/include/adc.h +++ b/os/hal/include/adc.h @@ -38,12 +38,19 @@ /* Driver pre-compile time settings. */ /*===========================================================================*/ +/** + * @brief Inclusion of the @p adcWaitConversion() function. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ -#if !CH_USE_SEMAPHORES -#error "ADC driver requires CH_USE_SEMAPHORES" +#if ADC_USE_WAIT && !CH_USE_SEMAPHORES +#error "ADC driver requires CH_USE_SEMAPHORES when ADC_USE_WAIT is enabled" #endif /*===========================================================================*/ @@ -90,7 +97,9 @@ extern "C" { adccallback_t callback); void adcStopConversion(ADCDriver *adcp); void adcStopConversionI(ADCDriver *adcp); +#if ADC_USE_WAIT msg_t adcWaitConversion(ADCDriver *adcp, systime_t timeout); +#endif #ifdef __cplusplus } #endif -- cgit v1.2.3