diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2020-10-21 16:11:07 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-06 01:43:08 +0000 |
commit | 851daf728dca124f4bb2b6d27238d3952be5cf2b (patch) | |
tree | 5a7725232cc1992a74340e6540fb2ba80e6b7896 /driver/accelgyro_bmi160.c | |
parent | 8dfdaa83815669c50f70332932fa35614ef2e4f6 (diff) | |
download | chrome-ec-851daf728dca124f4bb2b6d27238d3952be5cf2b.tar.gz |
motion: orientation: update interface
Enabling orientation sensor would not compile anymore.
Fix interface by replacing macros with functions.
BUG=chromium:718919
BRANCH=none
TEST=Compile when enabled on grunt and eve.
Change-Id: Ic5d6992d040cde79ef3f691db494804e160b7650
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2491266
Reviewed-by: Ching-Kang Yen <chingkang@chromium.org>
Diffstat (limited to 'driver/accelgyro_bmi160.c')
-rw-r--r-- | driver/accelgyro_bmi160.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index 2d7364889a..6a59799c23 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -17,6 +17,7 @@ #include "hwtimer.h" #include "i2c.h" #include "math_util.h" +#include "motion_orientation.h" #include "motion_sense_fifo.h" #include "spi.h" #include "task.h" @@ -513,8 +514,8 @@ static void irq_set_orientation(struct motion_sensor_t *s, default: break; } - orientation = motion_sense_remap_orientation(s, orientation); - SET_ORIENTATION(s, orientation); + orientation = motion_orientation_remap(s, orientation); + *motion_orientation_ptr(s) = orientation; } } #endif |