summaryrefslogtreecommitdiff
path: root/board/samus_pd
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2015-04-10 17:30:29 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-04-11 03:11:02 +0000
commit007fadda59dc617976eb87bcc325af7453d11a53 (patch)
tree4f95b88f73fa1966ad2023ad68727fa8b659ba8d /board/samus_pd
parent72ca4cc9f9460c0637ea786af9f35e64c5b3da12 (diff)
downloadchrome-ec-007fadda59dc617976eb87bcc325af7453d11a53.tar.gz
stm32f0: make ADC watchdog feature modular
The ADC watchdog is about 2/3 of the ADC code size and it is not optimized out when not used because adc_read_channel() needs to stop/restart the watchdog if somebody is using it. The feature is enabled by default to keep the current behavior on STM32F0 platform, and it is turned off on samus_pd : This is saving 448 bytes of flash (and 8 bytes of RAM). Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=make buildall and check the firmware size before and after. when CONFIG_ADC_WATCHDOG is disabled, adc_enable_watchdog() is not compiled if there is any user the build will fail. Change-Id: Ie2450bc2a8fd97662322fd3ce87e93c3fece6c6f Reviewed-on: https://chromium-review.googlesource.com/265303 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Trybot-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/samus_pd')
-rw-r--r--board/samus_pd/board.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h
index da536d16e0..627fc087c2 100644
--- a/board/samus_pd/board.h
+++ b/board/samus_pd/board.h
@@ -17,6 +17,7 @@
/* Optional features */
#define CONFIG_ADC
+#undef CONFIG_ADC_WATCHDOG
#define CONFIG_BOARD_PRE_INIT
#define CONFIG_CHARGE_MANAGER
#define CONFIG_CHARGE_RAMP