diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-09-11 10:57:11 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-09-11 10:57:11 +0000 |
commit | 781b0b129cccbecba160effce8c4ddd68295b8b9 (patch) | |
tree | 4e32a7b8c14e9eb808e1ae305fcbbff76074de48 /os/hal/include/adc.h | |
parent | d51840a0c799be3b684c5b379f4015475096b6b1 (diff) | |
download | ChibiOS-781b0b129cccbecba160effce8c4ddd68295b8b9.tar.gz ChibiOS-781b0b129cccbecba160effce8c4ddd68295b8b9.tar.bz2 ChibiOS-781b0b129cccbecba160effce8c4ddd68295b8b9.zip |
Fixed bug 3064204.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2175 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include/adc.h')
-rw-r--r-- | os/hal/include/adc.h | 13 |
1 files changed, 11 insertions, 2 deletions
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
|