summaryrefslogtreecommitdiff
path: root/driver/accelgyro_bmi160.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2020-10-21 16:11:07 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-06 01:43:08 +0000
commit851daf728dca124f4bb2b6d27238d3952be5cf2b (patch)
tree5a7725232cc1992a74340e6540fb2ba80e6b7896 /driver/accelgyro_bmi160.c
parent8dfdaa83815669c50f70332932fa35614ef2e4f6 (diff)
downloadchrome-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.c5
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