summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-04-09 00:42:30 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-09 12:10:42 +0000
commit46ccd63c1daa335e3891003dcd699d1732dfebc5 (patch)
treeb5ca18d56dc4791f7edb44dd5383443ec4dd60b4
parentf58d821a5ac305c963722997713c6fc35a4dc6f7 (diff)
downloadchrome-ec-46ccd63c1daa335e3891003dcd699d1732dfebc5.tar.gz
accel: move X,Y,Z definition
Move definition so that we can use it in accel driver. BUG=None TEST=Compile BRANCH=none Change-Id: I45d16a91d923cb0538b7fdf4110112566c87b6d0 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/269837 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/motion_lid.c5
-rw-r--r--common/motion_sense.c4
-rw-r--r--include/math_util.h4
-rw-r--r--test/motion_lid.c5
4 files changed, 4 insertions, 14 deletions
diff --git a/common/motion_lid.c b/common/motion_lid.c
index 7bf2c66ac0..1beb79febb 100644
--- a/common/motion_lid.c
+++ b/common/motion_lid.c
@@ -26,11 +26,6 @@
#define CPRINTS(format, args...) cprints(CC_MOTION_LID, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_MOTION_LID, format, ## args)
-/* For vector_3_t, define which coordinates are in which location. */
-enum {
- X, Y, Z
-};
-
/* Current acceleration vectors and current lid angle. */
static int lid_angle_deg;
static int lid_angle_is_reliable;
diff --git a/common/motion_sense.c b/common/motion_sense.c
index 27a87e9430..a4efbaa8d6 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -32,10 +32,6 @@
/* Time to wait in between failed attempts to initialize sensors */
#define TASK_MOTION_SENSE_WAIT_TIME (500 * MSEC)
-/* For vector_3_t, define which coordinates are in which location. */
-enum {
- X, Y, Z
-};
/* Bounds for setting the sensor polling interval. */
#define MIN_POLLING_INTERVAL_MS 5
diff --git a/include/math_util.h b/include/math_util.h
index dc0eb431c3..e7dcc6cbec 100644
--- a/include/math_util.h
+++ b/include/math_util.h
@@ -70,6 +70,10 @@ typedef fp_t matrix_3x3_t[3][3];
/* Integer vector */
typedef int vector_3_t[3];
+/* For vector_3_t, define which coordinates are in which location. */
+enum {
+ X, Y, Z
+};
/*
* Return absolute value of x. Note that as a macro expansion, this may have
* side effects if x includes function calls, which is why inline functions
diff --git a/test/motion_lid.c b/test/motion_lid.c
index 78ef019853..62b7cbf3eb 100644
--- a/test/motion_lid.c
+++ b/test/motion_lid.c
@@ -19,11 +19,6 @@
#include "timer.h"
#include "util.h"
-/* For vector_3_t, define which coordinates are in which location. */
-enum {
- X, Y, Z
-};
-
/*****************************************************************************/
/* Mock functions */
static int accel_init(const struct motion_sensor_t *s)