summaryrefslogtreecommitdiff
path: root/driver/baro_bmp280.h
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: motion_sense: Remove driver data structure externsShawn Nematbakhsh2017-06-151-1/+0
| | | | | | | | | | | | | | | Driver data structs are now accessed through the drv_data pointer. BUG=chromium:733352 BRANCH=None TEST=`make buildall -j` Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I8fedb425708a08ae6900ade6f17967fe2bc75ebf Reviewed-on: https://chromium-review.googlesource.com/537217 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* common: sensors: add extra sensor attributesNick Vaccaro2017-05-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | Adds min_frequency and max_frequency to struct motion_sensor_t. New attributes min_frequency and max_frequency are now returned in ectool's MOTIONSENSE_CMD_INFO response. Incremented ectool's MOTIONSENSE_CMD_INFO version to version 3. Add constants for MIN_FREQUENCY and MAX_FREQUENCY to each sensor's header file. BRANCH=none BUG=chromium:615059 TEST=build/boot and verify MOTIONSENSE_CMD_INFO response on kevin, make buildall -j passes. Change-Id: I66db9715c122ef6bb4665ad5d086a9ecc9c7c93a Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/482703 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* i2c: Add i2ctest console commandVijay Hiremath2016-09-231-0/+5
| | | | | | | | | | | | | | | | | | Added i2ctest console command to test the reliability of the I2C. By reading/writing to the known registers this tests provides the number of successful read and writes. BUG=chrome-os-partner:57487 TEST=Enabled the i2ctest config on Reef and tested the i2c read/writes. BRANCH=none Change-Id: I9e27ff96f2b85422933bc590d112a083990e2dfb Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/290427 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
* driver: bmp280: set_data_rate rate in mHz.Gwendal Grignou2016-09-151-4/+6
| | | | | | | | | | | | | | | | | The argument is mHz not ms. BUG=chrome-os-partner:57117,b:27849483 BRANCH=reef TEST=Using frequency sysfs parameter check the returned value is close to the requested value. It will be greater than the requested frequency. It maxes out at 76Hz when frequency is greater than 13.5Hz. Check Androsensor reports pressure. Change-Id: Ie40ac0f0a83d1578b5b66097d85a9124ec8e4c54 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/385083 Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* driver: bmp280: Add rangeGwendal Grignou2016-09-091-2/+3
| | | | | | | | | | | | | | | | | | | | Data from the sensor (in Pa) does not fit in 16 bits. Add set_range/get_range to allow the AP to set the precision. For pressure around ~1000 hPa, we need to right shift by 2 bits. BUG=chrome-os-partner:57117 BRANCH=reef TEST=Check data is not truncated anymore: > accelrange 4 Range for sensor 4: 262144 (Pa ~= 2621 hPa) > accelread 4 Current data 4: 24030 0 0 Last calib. data 4: 24030 0 0 (x4 = 961.2 hPa) Change-Id: I3f7280336e5120d903116612c9c830f4150d2ed7 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/382323 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* barometer: Add barometer driver for BMP280 in ECDivya Sasidharan2016-08-241-0/+205
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>