diff options
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r-- | include/motion_sense.h | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index bb5acc308c..9f971bb184 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -8,24 +8,11 @@ #ifndef __CROS_EC_MOTION_SENSE_H #define __CROS_EC_MOTION_SENSE_H +#include "chipset.h" +#include "common.h" +#include "ec_commands.h" #include "gpio.h" #include "math_util.h" -#include "chipset.h" - -enum sensor_location_t { - LOCATION_BASE = 0, - LOCATION_LID = 1, -}; - -enum sensor_type_t { - SENSOR_ACCELEROMETER = 0x1, - SENSOR_GYRO = 0x2, -}; - -enum sensor_chip_t { - SENSOR_CHIP_KXCJ9 = 0, - SENSOR_CHIP_LSM6DS0 = 1, -}; enum sensor_state { SENSOR_NOT_INITIALIZED = 0, @@ -43,9 +30,9 @@ struct motion_sensor_t { /* RO fields */ uint32_t active_mask; char *name; - enum sensor_chip_t chip; - enum sensor_type_t type; - enum sensor_location_t location; + enum motionsensor_chip chip; + enum motionsensor_type type; + enum motionsensor_location location; const struct accelgyro_drv *drv; struct mutex *mutex; void *drv_data; @@ -63,6 +50,7 @@ struct motion_sensor_t { /* state parameters */ enum sensor_state state; enum chipset_state_mask active; + vector_3_t raw_xyz; vector_3_t xyz; }; |