diff options
author | Diana Z <dzigterman@chromium.org> | 2019-01-15 15:53:19 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-17 20:20:49 -0800 |
commit | 9f78744fd33837a86bd4c1046fd77bd9847ffd8f (patch) | |
tree | dc981419637a2c42afbbe410dbb8297ff2ec8480 /driver/accelgyro_lsm6dsm.h | |
parent | a1bb29e2dfc756e3a9d01956dabf9bfa9030299d (diff) | |
download | chrome-ec-9f78744fd33837a86bd4c1046fd77bd9847ffd8f.tar.gz |
LSM6: Correct timestamp reporting and FIFO length
When an accelerometer sends a sample to the motion_sense task with a
timestamp, the timestamp should represent the time of the IRQ which
caused the FIFO read. This change caches a timestamp after the
accelerometer data is read to use when pushing all data from that read.
This also corrects the number of bits in the FIFO length field.
BRANCH=octopus
BUG=b:120679547
TEST=builds, phaser360 CTS pass rate unaffected
Change-Id: I220aa2e8fa23af3f7833999cdfac966e8695c831
Signed-off-by: Diana Z <dzigterman@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1413670
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver/accelgyro_lsm6dsm.h')
-rw-r--r-- | driver/accelgyro_lsm6dsm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/accelgyro_lsm6dsm.h b/driver/accelgyro_lsm6dsm.h index 763260894b..72c21fa5f3 100644 --- a/driver/accelgyro_lsm6dsm.h +++ b/driver/accelgyro_lsm6dsm.h @@ -93,7 +93,7 @@ #define LSM6DSM_FIFO_STS1_ADDR 0x3a #define LSM6DSM_FIFO_STS2_ADDR 0x3b -#define LSM6DSM_FIFO_DIFF_MASK 0x07ff +#define LSM6DSM_FIFO_DIFF_MASK 0x0fff #define LSM6DSM_FIFO_EMPTY 0x1000 #define LSM6DSM_FIFO_FULL 0x2000 #define LSM6DSM_FIFO_DATA_OVR 0x4000 |