From 6092e38f6cf1f93da1dce3345c48435753589ecf Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 17 Nov 2009 16:32:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1311 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/templates/adc_lld.c | 20 +------------------- os/io/templates/adc_lld.h | 7 +++++-- 2 files changed, 6 insertions(+), 21 deletions(-) (limited to 'os/io/templates') diff --git a/os/io/templates/adc_lld.c b/os/io/templates/adc_lld.c index f8fdb609a..d45817778 100644 --- a/os/io/templates/adc_lld.c +++ b/os/io/templates/adc_lld.c @@ -70,29 +70,12 @@ void adc_lld_stop(ADCDriver *adcp) { /** * @brief Starts an ADC conversion. - * @details Starts a conversion operation, there are two kind of conversion - * modes: - * - LINEAR, this mode is activated when the @p callback - * parameter is set to @p NULL, in this mode the buffer is filled - * once and then the conversion stops automatically. - * - CIRCULAR, when a callback function is defined the - * conversion never stops and the buffer is filled circularly. - * During the conversion the callback function is invoked when - * the buffer is 50% filled and when the buffer is 100% filled, - * this way is possible to process the conversion stream in real - * time. This kind of conversion can only be stopped by explicitly - * invoking @p adcStopConversion(). - * . * * @param[in] adcp pointer to the @p ADCDriver object * @param[in] grpp pointer to a @p ADCConversionGroup object * @param[out] samples pointer to the samples buffer * @param[in] depth buffer depth (matrix rows number). The buffer depth * must be one or an even number. - * @param[in] callback pointer to the conversion callback function - * @return The operation status. - * @retval FALSE the conversion has been started. - * @retval TRUE the driver is busy, conversion not started. * * @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 @@ -102,8 +85,7 @@ void adc_lld_stop(ADCDriver *adcp) { void adc_lld_start_conversion(ADCDriver *adcp, ADCConversionGroup *grpp, void *samples, - size_t depth, - adccallback_t callback) { + size_t depth) { } diff --git a/os/io/templates/adc_lld.h b/os/io/templates/adc_lld.h index 897ebbf2e..23e06f89e 100644 --- a/os/io/templates/adc_lld.h +++ b/os/io/templates/adc_lld.h @@ -91,6 +91,10 @@ typedef struct { * @brief Semaphore for completion synchronization. */ Semaphore ac_sem; + /** + * @brief Current callback function or @p NULL. + */ + adccallback_t ad_callback; /* End of the mandatory fields.*/ } ADCDriver; @@ -107,8 +111,7 @@ extern "C" { void adc_lld_start_conversion(ADCDriver *adcp, ADCConversionGroup *grpp, void *samples, - size_t depth, - adccallback_t callback); + size_t depth); void adc_lld_stop_conversion(ADCDriver *adcp); #ifdef __cplusplus } -- cgit v1.2.3