From 8957c5264880bc0c8db34b591ceeca6752db57c8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 7 Nov 2009 10:29:32 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1272 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/templates/adc_lld.h | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) (limited to 'os/io/templates/adc_lld.h') diff --git a/os/io/templates/adc_lld.h b/os/io/templates/adc_lld.h index 6fde9c181..db67a65cd 100644 --- a/os/io/templates/adc_lld.h +++ b/os/io/templates/adc_lld.h @@ -35,20 +35,6 @@ /* Driver constants. */ /*===========================================================================*/ -/** - * @brief Linear buffering mode. - * @details In the linear buffering mode the buffer is filled one time and - * then the operation automatically stops. - */ -#define ADC_GROUP_BUFFER_LINEAR 0 - -/** - * @brief Circular buffering mode. - * @details In the circular buffering mode the buffer is filled one time and - * then the operation automatically starts again. - */ -#define ADC_GROUP_BUFFER_CIRCULAR 1 - /*===========================================================================*/ /* Driver data structures and types. */ /*===========================================================================*/ @@ -82,32 +68,10 @@ typedef void (*adccallback_t)(adcsample_t *buffer, * operation. */ typedef struct { - /** - * @brief Group mode flags. - */ - uint_least8_t acg_mode; - /** * @brief Number of the analog channels belonging to the conversion group. */ adc_channels_num_t acg_num_channels; - - /** - * @brief Samples buffer depth. - * @note The buffer depth must be an even number or one. The 50% callback - * behavior for buffers with odd depth is unspecified. - */ - adc_buffer_depth_t acg_buffer_depth; - - /** - * @brief Data streaming callback. - * @details This callback is invoked at 50% and 100% buffer fill level in - * order to allow realtime processing of the conversion results - * when the circular buffer mode is selected. - * @note The 50% callback is only invoked if @p acg_num_samples is greater - * than 1. - */ - adccallback_t acg_callback; } ADCConversionGroup; /** @@ -148,7 +112,9 @@ extern "C" { void adc_lld_stop(ADCDriver *adcp); void adc_lld_start_conversion(ADCDriver *adcp, ADCConversionGroup *grpp, - void *samples); + void *samples, + size_t depth, + adccallback_t callback); void adc_lld_stop_conversion(ADCDriver *adcp); #ifdef __cplusplus } -- cgit v1.2.3