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 /common/adc.c | |
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 'common/adc.c')
-rw-r--r-- | common/adc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/adc.c b/common/adc.c index 696b017788..10e9399bdb 100644 --- a/common/adc.c +++ b/common/adc.c @@ -11,6 +11,8 @@ #include "console.h" #include "util.h" +/* 'adc' console command is not supported in continuous mode */ +#ifndef CONFIG_ADC_PROFILE_FAST_CONTINUOUS static enum adc_channel find_adc_channel_by_name(const char *name) { const struct adc_t *ch = adc_channels; @@ -55,3 +57,4 @@ DECLARE_CONSOLE_COMMAND(adc, command_adc, "[name]", "Print ADC channel(s)", NULL); +#endif |