summaryrefslogtreecommitdiff
path: root/include/motion_orientation.h
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 /include/motion_orientation.h
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 'include/motion_orientation.h')
-rw-r--r--include/motion_orientation.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/motion_orientation.h b/include/motion_orientation.h
new file mode 100644
index 0000000000..641f97a799
--- /dev/null
+++ b/include/motion_orientation.h
@@ -0,0 +1,24 @@
+/* Copyright 2020 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* header for an orientation sensor. */
+#ifndef __CROS_EC_MOTION_ORIENTATION_H
+#define __CROS_EC_MOTION_ORIENTATION_H
+
+#include "chipset.h"
+#include "common.h"
+#include "ec_commands.h"
+#include "motion_sense.h"
+
+enum motionsensor_orientation motion_orientation_remap(
+ const struct motion_sensor_t *s,
+ enum motionsensor_orientation orientation);
+
+bool motion_orientation_changed(const struct motion_sensor_t *s);
+enum motionsensor_orientation *motion_orientation_ptr(
+ const struct motion_sensor_t *s);
+void motion_orientation_update(const struct motion_sensor_t *s);
+
+#endif /* __CROS_EC_MOTION_ORIENTATION_H */