summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/host_cmd
diff options
context:
space:
mode:
authorTomasz Michalec <tm@semihalf.com>2022-09-02 15:19:44 +0200
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-09-06 09:44:54 +0000
commitfb47abf938c5906f3050846482900a6493518c1a (patch)
treeb3cd19fe63d622305f8dd149f473cc720696006d /zephyr/test/drivers/host_cmd
parenta787f0df273503e26748705573eb2cea48d990f0 (diff)
downloadchrome-ec-fb47abf938c5906f3050846482900a6493518c1a.tar.gz
zephyr: test: motion_sense: Clear ODR after test
When running test in random order test_set_odr may be run last. In that case, ODR is left with high value set and output is flooded with following lines: [57.013400 ms-bma255 Missed 1 data collections at 57012200 - rate: 1000] To prevent that, clear ODR in the test 'after' function. BUG=None TEST=./twister -T zephyr/test/drivers BRANCH=None Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: If66aea59429852eb31ac0473e6d3277798429f15 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3871193 Tested-by: Tomasz Michalec <tmichalec@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Auto-Submit: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Diffstat (limited to 'zephyr/test/drivers/host_cmd')
-rw-r--r--zephyr/test/drivers/host_cmd/src/motion_sense.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zephyr/test/drivers/host_cmd/src/motion_sense.c b/zephyr/test/drivers/host_cmd/src/motion_sense.c
index f2b0cd1746..26578cfdaf 100644
--- a/zephyr/test/drivers/host_cmd/src/motion_sense.c
+++ b/zephyr/test/drivers/host_cmd/src/motion_sense.c
@@ -85,6 +85,8 @@ static void host_cmd_motion_sense_after(void *fixture)
motion_sensors[0].drv = this->sensor_0_drv;
host_cmd_motion_sense_int_enable(0, &response);
motion_sensors[0].flags &= ~MOTIONSENSE_FLAG_IN_SPOOF_MODE;
+ motion_sensors[0].config[SENSOR_CONFIG_AP].odr = 0;
+ motion_sensors[0].config[SENSOR_CONFIG_AP].ec_rate = 1000 * MSEC;
}
ZTEST_SUITE(host_cmd_motion_sense, drivers_predicate_post_main,