diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-04-09 10:56:57 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-11 09:32:36 -0700 |
commit | 7299e370e6c2ad7c86c90d9882a69c85958f24c7 (patch) | |
tree | 655580994f6db77fce6da9a6a2d166f5754e9599 /board/flapjack/board.h | |
parent | 0edf521353afda4e3975352489d62a03df1927e8 (diff) | |
download | chrome-ec-7299e370e6c2ad7c86c90d9882a69c85958f24c7.tar.gz |
Flapjack: Use board_read_id to read BATT_ID
This patch makes Flapjack read BATT_ID using board_read_id. There is
no functional changes.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/126770302
BRANCH=none
TEST=Buildall
Change-Id: Iae60f36d6df25cb1aa910fecd721d0740ebe29c0
Reviewed-on: https://chromium-review.googlesource.com/1559104
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'board/flapjack/board.h')
-rw-r--r-- | board/flapjack/board.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/flapjack/board.h b/board/flapjack/board.h index 1c41659577..ebe887d3cb 100644 --- a/board/flapjack/board.h +++ b/board/flapjack/board.h @@ -279,6 +279,15 @@ void emmc_cmd_interrupt(enum gpio_signal signal); void board_reset_pd_mcu(void); +#define ADC_MARGIN_MV 56 /* Simply assume 1800/16/2 */ + +struct mv_to_id { + int id; + int median_mv; +}; + +int board_read_id(enum adc_channel, const struct mv_to_id *table, int size); + #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */ |