aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/templates/adc_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-19 19:03:18 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-19 19:03:18 +0000
commit2ab27d3c01ce51a26587e6aaafcef23b2dda4afe (patch)
treea97665aa4e865b8156164478b77551aa34d281b9 /os/io/templates/adc_lld.h
parenta943eaecc7cd56c2a49521bf702b0524bb834aa1 (diff)
downloadChibiOS-2ab27d3c01ce51a26587e6aaafcef23b2dda4afe.tar.gz
ChibiOS-2ab27d3c01ce51a26587e6aaafcef23b2dda4afe.tar.bz2
ChibiOS-2ab27d3c01ce51a26587e6aaafcef23b2dda4afe.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1315 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/templates/adc_lld.h')
-rw-r--r--os/io/templates/adc_lld.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/os/io/templates/adc_lld.h b/os/io/templates/adc_lld.h
index 23e06f89e..cb790aec7 100644
--- a/os/io/templates/adc_lld.h
+++ b/os/io/templates/adc_lld.h
@@ -70,6 +70,7 @@ typedef struct {
/**
* @brief Driver configuration structure.
+ * @note It could be empty on some architectures.
*/
typedef struct {
@@ -88,13 +89,25 @@ typedef struct {
*/
const ADCConfig *ad_config;
/**
- * @brief Semaphore for completion synchronization.
+ * @brief Synchronization semaphore.
*/
- Semaphore ac_sem;
+ Semaphore ad_sem;
/**
* @brief Current callback function or @p NULL.
*/
adccallback_t ad_callback;
+ /**
+ * @brief Current samples buffer pointer or @p NULL.
+ */
+ adcsample_t *ad_samples;
+ /**
+ * @brief Current samples buffer depth or @p 0.
+ */
+ size_t ad_depth;
+ /**
+ * @brief Current conversion group pointer or @p NULL.
+ */
+ ADCConversionGroup *ad_grpp;
/* End of the mandatory fields.*/
} ADCDriver;
@@ -108,10 +121,7 @@ extern "C" {
void adc_lld_init(void);
void adc_lld_start(ADCDriver *adcp);
void adc_lld_stop(ADCDriver *adcp);
- void adc_lld_start_conversion(ADCDriver *adcp,
- ADCConversionGroup *grpp,
- void *samples,
- size_t depth);
+ void adc_lld_start_conversion(ADCDriver *adcp);
void adc_lld_stop_conversion(ADCDriver *adcp);
#ifdef __cplusplus
}