aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/templates
diff options
context:
space:
mode:
Diffstat (limited to 'os/io/templates')
-rw-r--r--os/io/templates/adc_lld.c20
-rw-r--r--os/io/templates/adc_lld.h7
2 files changed, 6 insertions, 21 deletions
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:
- * - <b>LINEAR</b>, 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.
- * - <b>CIRCULAR</b>, 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
}