diff options
author | Divya Sasidharan <divya.s.sasidharan@intel.com> | 2016-08-08 17:04:57 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-08-24 17:40:34 -0700 |
commit | 1bebf37965d2d017e306cf0191bf323ce97d9c67 (patch) | |
tree | 09f90ab50bd5688cda50828e89303d2f53453f92 /include | |
parent | 671613ec4a4d76d72579e99676083d0c46077f64 (diff) | |
download | chrome-ec-1bebf37965d2d017e306cf0191bf323ce97d9c67.tar.gz |
barometer: Add barometer driver for BMP280 in EC
BMP280 driver API is designed to work with motion
sensor task. The sensor sampling parameters are
configured optimally for handheld device in accordance
with BMP280 spec recommendation.
BUG=None
BRANCH=master
TEST=Tested on amenia; with appropriate .odr in board file
test command "accelread 4" returns raw pressure
value in Pa; accelinfo on 4000 shows Pa value.
Change-Id: I3f4c0c33a77dd317aa1425624d3cc7f4ec6b45a1
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/351660
Commit-Ready: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 3 | ||||
-rw-r--r-- | include/ec_commands.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index a315d1c15b..86964d1617 100644 --- a/include/config.h +++ b/include/config.h @@ -57,6 +57,9 @@ #undef CONFIG_ACCELGYRO_LSM6DS0 #undef CONFIG_ACCELGYRO_BMI160 +/* Specify barometer attached */ +#undef CONFIG_BARO_BMP280 + /* * Use the old standard reference frame for accelerometers. The old * reference frame is: diff --git a/include/ec_commands.h b/include/ec_commands.h index 4f5b130833..c1abb72b6b 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1795,6 +1795,7 @@ enum motionsensor_type { MOTIONSENSE_TYPE_PROX = 3, MOTIONSENSE_TYPE_LIGHT = 4, MOTIONSENSE_TYPE_ACTIVITY = 5, + MOTIONSENSE_TYPE_BARO = 6, MOTIONSENSE_TYPE_MAX, }; @@ -1816,6 +1817,7 @@ enum motionsensor_chip { MOTIONSENSE_CHIP_KX022 = 6, MOTIONSENSE_CHIP_L3GD20H = 7, MOTIONSENSE_CHIP_BMA255 = 8, + MOTIONSENSE_CHIP_BMP280 = 9, }; struct ec_response_motion_sensor_data { |