aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/adc.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-09-11 10:57:11 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-09-11 10:57:11 +0000
commit781b0b129cccbecba160effce8c4ddd68295b8b9 (patch)
tree4e32a7b8c14e9eb808e1ae305fcbbff76074de48 /os/hal/include/adc.h
parentd51840a0c799be3b684c5b379f4015475096b6b1 (diff)
downloadChibiOS-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.h13
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