summaryrefslogtreecommitdiff
path: root/include/accelgyro.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/accelgyro.h')
-rw-r--r--include/accelgyro.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h
index 5ac486c660..723efa569c 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -77,6 +77,20 @@ struct accelgyro_drv {
int (*get_data_rate)(const struct motion_sensor_t *s,
int *rate);
+
+ /**
+ * Setter and getter methods for the sensor offset.
+ * @s Pointer to sensor data.
+ * @offset: offset to apply to raw data.
+ * @temp: temperature when calibration was done.
+ * @return EC_SUCCESS if successful, non-zero if error.
+ */
+ int (*set_offset)(const struct motion_sensor_t *s,
+ const int16_t *offset,
+ int16_t temp);
+ int (*get_offset)(const struct motion_sensor_t *s,
+ int16_t *offset,
+ int16_t *temp);
#ifdef CONFIG_ACCEL_INTERRUPTS
/**
* Setup a one-time accel interrupt. If the threshold is low enough, the