summaryrefslogtreecommitdiff
path: root/common/motion_sense_fifo.c
diff options
context:
space:
mode:
authorYuval Peress <peress@google.com>2022-04-05 21:30:06 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-06 15:44:42 +0000
commit47e51bbb819b2966c2920bb47eb09bda70603843 (patch)
treefc0f936cbddf00ccf7d7a502ae3256bd83eb4dea /common/motion_sense_fifo.c
parent3b9284b13cc4be2f2a8283ff2e63c23b3564a31b (diff)
downloadchrome-ec-47e51bbb819b2966c2920bb47eb09bda70603843.tar.gz
motion_sense_fifo: Add tests for the get_info function
Verify that all the fields returned by the get_info function are correctly filled per several different test scenarios. BRANCH=none BUG=b:224614211 TEST=make run-motion_sense_fifo -j Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Ib544e3f1acbca21eb0d8a2bf7bf8ecf351a0a172 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572852 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common/motion_sense_fifo.c')
-rw-r--r--common/motion_sense_fifo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/motion_sense_fifo.c b/common/motion_sense_fifo.c
index 244032d10a..5743d0fdcb 100644
--- a/common/motion_sense_fifo.c
+++ b/common/motion_sense_fifo.c
@@ -575,6 +575,7 @@ void motion_sense_fifo_get_info(
fifo_lost = 0;
}
+/* LCOV_EXCL_START - function cannot be tested due to limitations with mkbp */
static int motion_sense_get_next_event(uint8_t *out)
{
union ec_response_get_next_data *data =
@@ -583,7 +584,7 @@ static int motion_sense_get_next_event(uint8_t *out)
motion_sense_fifo_get_info(&data->sensor_fifo.info, 0);
return sizeof(data->sensor_fifo);
}
-
+/* LCOV_EXCL_STOP */
DECLARE_EVENT_SOURCE(EC_MKBP_EVENT_SENSOR_FIFO, motion_sense_get_next_event);
inline int motion_sense_fifo_over_thres(void)