aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/adc.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-27 19:55:59 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-27 19:55:59 +0000
commit47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215 (patch)
treefb344c8f0a469e5eb68701f08e417d1037215081 /os/hal/src/adc.c
parent076e7453bf812c59f38cda94dd0379b6f03af0d0 (diff)
parente5ce81050f699c61b43aa74384d011c861fb31f2 (diff)
downloadChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.gz
ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.bz2
ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.zip
I2C branch. Goals: DMA-based driver, stm32f4x port.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3541 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/adc.c')
-rw-r--r--os/hal/src/adc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/os/hal/src/adc.c b/os/hal/src/adc.c
index c375818a6..08aa830f0 100644
--- a/os/hal/src/adc.c
+++ b/os/hal/src/adc.c
@@ -162,6 +162,8 @@ void adcStartConversion(ADCDriver *adcp,
/**
* @brief Starts an ADC conversion.
* @details Starts an asynchronous conversion operation.
+ * @post The callbacks associated to the conversion group will be invoked
+ * on buffer fill and error events.
* @note The buffer is organized as a matrix of M*N elements where M is the
* channels number configured into the conversion group and N is the
* buffer depth. The samples are sequentially written into the buffer
@@ -185,7 +187,8 @@ void adcStartConversionI(ADCDriver *adcp,
((depth == 1) || ((depth & 1) == 0)),
"adcStartConversionI");
chDbgAssert((adcp->state == ADC_READY) ||
- (adcp->state == ADC_COMPLETE),
+ (adcp->state == ADC_COMPLETE) ||
+ (adcp->state == ADC_ERROR),
"adcStartConversionI(), #1", "not ready");
adcp->samples = samples;
@@ -268,6 +271,8 @@ void adcStopConversionI(ADCDriver *adcp) {
* @retval RDY_RESET The conversion has been stopped using
* @p acdStopConversion() or @p acdStopConversionI(),
* the result buffer may contain incorrect data.
+ * @retval RDY_TIMEOUT The conversion has been stopped because an hardware
+ * error.
*
* @api
*/