summaryrefslogtreecommitdiff
path: root/driver/mag_bmm150.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-08-18 12:37:33 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-24 19:08:40 +0000
commit3a7e5132737424ca5d6847247136e25bc5aa548c (patch)
tree718e394bb6bff580dc4f33f96bfdd96a8c04db54 /driver/mag_bmm150.h
parent69bd4ce351ca56a3141281bf25431a07ea10512f (diff)
downloadchrome-ec-3a7e5132737424ca5d6847247136e25bc5aa548c.tar.gz
driver: bmi160: use rotation matrix to handle offsets.
Store offsets using sensors axis, not the device axis. Therefore apply rot_standard_ref to the offset vector before get and rot_standard_ref^-1 before set. BRANCH=smaug TEST=using mag sensor, check the offset are applied to the right axis and store correctly. BUG=chromium:517675 Change-Id: I95c8ef2a62603890184412674e7bde91ebecd288 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/294596 Reviewed-by: Sheng-liang Song <ssl@chromium.org>
Diffstat (limited to 'driver/mag_bmm150.h')
-rw-r--r--driver/mag_bmm150.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/driver/mag_bmm150.h b/driver/mag_bmm150.h
index 1bbf998f6a..f3a0a38f50 100644
--- a/driver/mag_bmm150.h
+++ b/driver/mag_bmm150.h
@@ -103,11 +103,9 @@ void bmm150_normalize(const struct motion_sensor_t *s,
uint8_t *data);
int bmm150_set_offset(const struct motion_sensor_t *s,
- const int16_t *offset,
- int16_t temp);
+ const vector_3_t offset);
int bmm150_get_offset(const struct motion_sensor_t *s,
- int16_t *offset,
- int16_t *temp);
+ vector_3_t offset);
#endif /* __CROS_EC_MAG_BMM150_H */