diff options
author | Yuval Peress <peress@chromium.org> | 2019-07-15 14:10:11 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-03 20:36:04 +0000 |
commit | dfbc632cd5b5a856086249253a98bc83d8942a29 (patch) | |
tree | 9f0359115a96ca0efe66905b5f6b1be644367430 /board/flapjack | |
parent | 083788ac19505f07bfe57a4d8b54a3b11b7554b3 (diff) | |
download | chrome-ec-dfbc632cd5b5a856086249253a98bc83d8942a29.tar.gz |
config: Refactor CONFIG_ACCEL_FIFO to enable use of IS_ENABLED
This change allows us to use the IS_ENABLED condition to replace
the various ifdef guards around the CONFIG_ACCEL_FIFO
BUG=b:137758297,chromium:981990
BRANCH=None
TEST=buildall and CTS tests on Arcada
Change-Id: I65d36bac19855e51c830a33e6f3812575e8d15d9
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704164
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'board/flapjack')
-rw-r--r-- | board/flapjack/board.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/board/flapjack/board.h b/board/flapjack/board.h index a7420a55eb..353f3a62b3 100644 --- a/board/flapjack/board.h +++ b/board/flapjack/board.h @@ -114,10 +114,17 @@ #define CONFIG_TABLET_MODE #define CONFIG_TABLET_MODE_SWITCH +/* + * Only include the sensor fifo in the RW section (since the motion task is only + * included there). + */ #ifdef SECTION_IS_RW +/* Enable sensor fifo, must also define the _SIZE and _THRES */ +#define CONFIG_ACCEL_FIFO /* FIFO size is in power of 2. */ -#define CONFIG_ACCEL_FIFO 256 -#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3) +#define CONFIG_ACCEL_FIFO_SIZE 256 +/* Depends on how fast the AP boots and typical ODRs. */ +#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO_SIZE / 3) #endif /* SECTION_IS_RW */ /* Wireless Power Charger Config */ |