aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/platforms/STM32/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/platforms/STM32/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/platforms/STM32/adc_lld.h')
-rw-r--r--os/io/platforms/STM32/adc_lld.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/os/io/platforms/STM32/adc_lld.h b/os/io/platforms/STM32/adc_lld.h
index 7c3249741..8b16e1aa3 100644
--- a/os/io/platforms/STM32/adc_lld.h
+++ b/os/io/platforms/STM32/adc_lld.h
@@ -63,6 +63,8 @@
/**
* @brief ADC1 DMA error hook.
+ * @note The default action for DMA errors is a system halt because DMA error
+ * can only happen because programming errors.
*/
#if !defined(STM32_ADC1_DMA_ERROR_HOOK) || defined(__DOXYGEN__)
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
@@ -100,6 +102,11 @@ typedef void (*adccallback_t)(adcsample_t *buffer, size_t n);
*/
typedef struct {
/**
+ * @brief Enables the circular buffer mode for the group.
+ */
+ bool_t acg_circular;
+ /* End of the mandatory fields.*/
+ /**
* @brief Number of the analog channels belonging to the conversion group.
*/
adc_channels_num_t acg_num_channels;
@@ -140,6 +147,7 @@ typedef struct {
/**
* @brief Driver configuration structure.
+ * @note It could be empty on some architectures.
*/
typedef struct {
/* * <----------
@@ -164,13 +172,25 @@ typedef struct {
*/
const ADCConfig *ad_config;
/**
- * @brief Semaphore for completion synchronization.
+ * @brief Synchronization semaphore.
*/
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.*/
/**
* @brief Pointer to the ADCx registers block.
@@ -190,20 +210,19 @@ typedef struct {
/* External declarations. */
/*===========================================================================*/
+/** @cond never*/
#ifdef __cplusplus
extern "C" {
#endif
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
}
#endif
+/** @endcond*/
#endif /* _ADC_LLD_H_ */