summaryrefslogtreecommitdiff
path: root/include/accelgyro.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2014-10-30 15:02:37 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-18 05:19:08 +0000
commit4b154c6f956d0d30e78d7f1d2c5b6867dbfbf8f0 (patch)
treefe1f0e3aea34410b8b5fdfde5cbc907eee27f132 /include/accelgyro.h
parent89442037be2ebd83be57b68bfabeaf2ad0367171 (diff)
downloadchrome-ec-4b154c6f956d0d30e78d7f1d2c5b6867dbfbf8f0.tar.gz
motion: Add decoding for MOTION_CMD_DUMP v1 command
MOTIONSENSE_CMD_DUMP is deprecated, replaced with MOTIONSENSE_CMD_GET_DATA Also use vector_3_t instead of x,y,z ectool motionsense commands only work with newer firmware, to handle a dynamic number of sensors. - The host sends the number of sensor it has allocated space for. - If 0, the EC just sends the number of sensors available - Otherwise returns sensor information up to the limit imposed by the host. Remove MOTIONSENSE_GET_STATUS: not needed. It is only useful for LPC, to guarantee atomicity of the data. Remove MOTIONSENSE_GET_DATA: not needed since we increase the version number of MOTIONSENSE command. BUG=chrome-os-partner:31071,chromium:430792 BRANCH=ToT TEST=Compile. On a firmware that support the new command: /usr/sbin/ectool --name=cros_sh motionsense Motion sensing active Sensor 0: 92 15 1030 Sensor 1: -94 -63 718 /usr/sbin/ectool --name=cros_sh motionsense active 0 On a machine with older firmware (samus), check these functions are not working anymore. Change-Id: I64b62afff96670fb93457760d43d4e64e26e029f Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226880 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/accelgyro.h')
-rw-r--r--include/accelgyro.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h
index 6118f6dc0c..5ac486c660 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -27,15 +27,10 @@ struct accelgyro_drv {
* three accelerations come back in counts, where ACCEL_G can be used
* to convert counts to engineering units.
* @s Pointer to sensor data.
- * @x_acc Pointer to store X-axis acceleration (in counts).
- * @y_acc Pointer to store Y-axis acceleration (in counts).
- * @z_acc Pointer to store Z-axis acceleration (in counts).
+ * @v Vector to store acceleration (in units of counts).
* @return EC_SUCCESS if successful, non-zero if error.
*/
- int (*read)(const struct motion_sensor_t *s,
- int *x_acc,
- int *y_acc,
- int *z_acc);
+ int (*read)(const struct motion_sensor_t *s, vector_3_t v);
/**
* Setter and getter methods for the sensor range. The sensor range