summaryrefslogtreecommitdiff
path: root/test/math_util.c
diff options
context:
space:
mode:
authorSheng-Liang Song <ssl@chromium.org>2014-08-13 14:17:07 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-26 03:05:55 +0000
commit7d40063d46aa9a8b6146355ee9be9db775af7f0d (patch)
treeaed9ecdc51ff99d1dcb9b259e6727577986d2be6 /test/math_util.c
parentc598e1ac06c4ceddf28399081ed669eaaa533ae9 (diff)
downloadchrome-ec-7d40063d46aa9a8b6146355ee9be9db775af7f0d.tar.gz
samus: added gyro support for lsm6ds0
Changed motion_sense task to assume sensors are unpowered in G3 and re-initialize sensors every time coming out of G3. Added EC command line test utils as well. Fixed some bug during unit tests. BUG=chrome-os-partner:27313,27320 BRANCH=ToT TEST=Verified on Samus. Tested with accel EC CLIs accelread, accelrange, accelrate, accelres Tested accelcalib, a ACCEL calibration util, and it succeeded. Tested sysfs interface: cd /sys/bus/iio/devices/iio:device1 cat in_accel_*_gyro_raw Signed-off-by: Sheng-Liang Song <ssl@chromium.org> Change-Id: I5752b00c03e1942c790ea4f28610fda83fa2dcbc Reviewed-on: https://chromium-review.googlesource.com/211484 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'test/math_util.c')
-rw-r--r--test/math_util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/math_util.c b/test/math_util.c
index e69005fcbc..3c5a3fae01 100644
--- a/test/math_util.c
+++ b/test/math_util.c
@@ -6,7 +6,7 @@
*/
#include <math.h>
-
+#include <stdio.h>
#include "math_util.h"
#include "motion_sense.h"
#include "test_util.h"
@@ -14,7 +14,7 @@
/*****************************************************************************/
/* Need to define motion sensor globals just to compile. */
-const struct motion_sensor_t motion_sensors[] = {};
+struct motion_sensor_t motion_sensors[] = {};
const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
/*****************************************************************************/
@@ -41,7 +41,6 @@ static int test_acos(void)
return EC_SUCCESS;
}
-
void run_test(void)
{
test_reset();