summaryrefslogtreecommitdiff
path: root/include/motion_sense.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-09-20 14:04:03 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-10-20 22:09:05 -0700
commit7340e804a1e3ffba2f1ffb9bf826a33b8b5fb19c (patch)
treed1fb324ab8bd25d65c3b0471f52f698ac528801c /include/motion_sense.h
parentfb6e6a4b410eff13961437d9a28fe86b222e3ef1 (diff)
downloadchrome-ec-7340e804a1e3ffba2f1ffb9bf826a33b8b5fb19c.tar.gz
common: Add lightbar dimming based on outside light.
Unless the lid is closed, the ALS is used for lightbar dimming. Change the google colors depending on the light sensor result. BUG=chrome-os-partner:44400 BRANCH=smaug TEST=Check all 3 levels of brightness of the lightbar. Check value using "adb shell ectool lightbar" Check double tap color are not affected and is using full brightness. Change-Id: I7b5e2890c3557f1dd3ae719f5f82ffb5fe7b24fb Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/301216 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r--include/motion_sense.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h
index 86d3e87ab8..ed24f232fd 100644
--- a/include/motion_sense.h
+++ b/include/motion_sense.h
@@ -185,4 +185,8 @@ void motion_sense_fifo_add_unit(struct ec_response_motion_sensor_data *data,
#else
#define ALL_MOTION_SENSORS motion_sensor_count
#endif
+
+#ifdef CONFIG_ALS_LIGHTBAR_DIMMING
+#define MOTION_SENSE_LUX motion_sensors[CONFIG_ALS_LIGHTBAR_DIMMING].raw_xyz[0]
+#endif
#endif /* __CROS_EC_MOTION_SENSE_H */