summaryrefslogtreecommitdiff
path: root/test/motion_lid.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-05-30 11:52:28 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-10 03:40:19 +0000
commita7c4132d2581ec7fa0155d414c2c3e0b9729b34c (patch)
treea26cf1a1b925532e4e573f69ae40fa77cf7a3f59 /test/motion_lid.c
parentb21efba26afaa1a8c5e7e7e8a71f31a51cbc230c (diff)
downloadchrome-ec-a7c4132d2581ec7fa0155d414c2c3e0b9729b34c.tar.gz
driver: bmi160: Add FIFO and interrupt support
Add FIFO support, where bmi160 hardware FIFO is copied in local fifo. Add rudimentary support for single/double tap and lift detection. BUG=chrome-os-partner:39900 BRANCH=smaug TEST=Check on F411 that FIFO data is retrieved and correct. Check on Smaug as well, with proper kernel the collect the FIFO: - check that increasing sampling_frequency we are collecting the FIFO less often - check no frames are lost. - check tap/lift interrupts are working - if latency is less than 100ms, check we are collecting much faster. Change-Id: Ic2317c27fad0ef31dacd6e18cd5f71ccd2cec807 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/274227
Diffstat (limited to 'test/motion_lid.c')
-rw-r--r--test/motion_lid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/motion_lid.c b/test/motion_lid.c
index 62b7cbf3eb..84a539e226 100644
--- a/test/motion_lid.c
+++ b/test/motion_lid.c
@@ -158,6 +158,8 @@ static int test_lid_angle(void)
lid->xyz[Z] = 1000;
sample = *lpc_status & EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK;
task_wake(TASK_ID_MOTIONSENSE);
+ msleep(5);
+ task_wake(TASK_ID_MOTIONSENSE);
while ((*lpc_status & EC_MEMMAP_ACC_STATUS_SAMPLE_ID_MASK) == sample)
msleep(5);
TEST_ASSERT(motion_lid_get_angle() == 0);