diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-12-15 16:42:55 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-21 14:58:56 -0800 |
commit | 8038e5f146905181ea93140184f1a350f078bdd0 (patch) | |
tree | c1f9e89a2c29c0bfe62c157bbf70af563b341bc0 /include/config.h | |
parent | 34f226422733c8d98bcfee946e1994997fa7c1e8 (diff) | |
download | chrome-ec-8038e5f146905181ea93140184f1a350f078bdd0.tar.gz |
stm32: adc: Add support for DMA continuous mode
Add support for continuously writing ADC samples to a circular buffer.
CONFIG_ADC_PROFILE_FAST_CONTINUOUS should be defined and an
appropriate sized buffer must be passed to adc_read_all_channels().
BUG=chromium:569994
TEST=Manual on snoball. Verify 'adc' continues to function (single
mode). With pending commit, verify that continuous conversion interrupt
is called at appropriate frequency and values look consistent.
BRANCH=None
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I025825d72a698f8f1f4f95a89477df791bd5e67e
Reviewed-on: https://chromium-review.googlesource.com/318505
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r-- | include/config.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/config.h b/include/config.h index 1ca46f1d98..24daae1b34 100644 --- a/include/config.h +++ b/include/config.h @@ -84,13 +84,25 @@ /* Compile chip support for analog-to-digital convertor */ #undef CONFIG_ADC -/* ADC sample time selection. The value is chip-dependent. */ +/* + * ADC sample time selection. The value is chip-dependent. + * TODO: Replace this with CONFIG_ADC_PROFILE entries. + */ #undef CONFIG_ADC_SAMPLE_TIME /* Include the ADC analog watchdog feature in the ADC code */ #define CONFIG_ADC_WATCHDOG /* + * Chip-dependent ADC configuration - select one. + * SINGLE - Sample all inputs once when requested. + * FAST_CONTINUOUS - Sample all inputs continuously using DMA, with minimal + * sample time. + */ +#define CONFIG_ADC_PROFILE_SINGLE +#undef CONFIG_ADC_PROFILE_FAST_CONTINUOUS + +/* * Some ALS modules may be connected to the EC. We need the command, and * specific drivers for each module. */ |