summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/accelgyro.h13
-rw-r--r--include/config.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h
index 2d415621d1..0d00116ed6 100644
--- a/include/accelgyro.h
+++ b/include/accelgyro.h
@@ -152,6 +152,19 @@ struct accelgyro_saved_data_t {
uint16_t scale[3];
};
+/* Calibration data */
+struct als_calibration_t {
+ /*
+ * Scale, uscale, and offset are used to correct the raw 16 bit ALS
+ * data and then to convert it to 32 bit using the following equations:
+ * raw_value += offset;
+ * adjusted_value = raw_value * scale + raw_value * uscale / 10000;
+ */
+ uint16_t scale;
+ uint16_t uscale;
+ int16_t offset;
+};
+
#define SENSOR_APPLY_SCALE(_input, _scale) \
(((_input) * (_scale)) / MOTION_SENSE_DEFAULT_SCALE)
diff --git a/include/config.h b/include/config.h
index 86f6447157..116b8d962c 100644
--- a/include/config.h
+++ b/include/config.h
@@ -257,6 +257,9 @@
/* Check if the device revision is supported */
#undef CONFIG_ALS_SI114X_CHECK_REVISION
+/* Define to include the clear channel driver for the tcs3400 light sensor */
+#undef CONFIG_ALS_TCS3400
+
/*
* Define the event to raise when a sensor interrupt triggers.
* Must be within TASK_EVENT_MOTION_INTERRUPT_MASK.
@@ -265,6 +268,7 @@
#undef CONFIG_ACCEL_LSM6DSM_INT_EVENT
#undef CONFIG_ACCEL_LSM6DSO_INT_EVENT
#undef CONFIG_ALS_SI114X_INT_EVENT
+#undef CONFIG_ALS_TCS3400_INT_EVENT
/*
* Enable Si114x to operate in polling mode. This config is used in conjunction