From: Bosch Sensortec Date: Mon, 10 Feb 2020 09:23:49 +0000 (+0100) Subject: Cleaned macros and defaulted to using floating point compensation X-Git-Url: http://git.itanic.dy.fi/?p=BME280_driver;a=commitdiff_plain;h=56de40696f1033d4282f7b69729896ccd0e97524 Cleaned macros and defaulted to using floating point compensation --- diff --git a/README.md b/README.md index ce5eb36..312aeff 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,6 @@ This package contains the Bosch Sensortec's BME280 pressure sensor driver (senso The sensor driver package includes bme280.c, bme280.h and bme280_defs.h files. -## Version -File | Version | Date ---------------|---------|------------ -bme280.c | 3.4.2 | 21 Jan 2020 -bme280.h | 3.4.2 | 21 Jan 2020 -bme280_defs.h | 3.4.2 | 21 Jan 2020 ## Integration details * Integrate bme280.h, bme280_defs.h and bme280.c file in to the project. @@ -300,6 +294,4 @@ int8_t user_i2c_write(uint8_t dev_id, uint8_t reg_addr, uint8_t *reg_data, uint1 return rslt; } -``` - -## Copyright (C) 2016 - 2017 Bosch Sensortec GmbH \ No newline at end of file +``` \ No newline at end of file diff --git a/bme280.c b/bme280.c index 0fcc1d7..c3eabb5 100644 --- a/bme280.c +++ b/bme280.c @@ -30,9 +30,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * -* @file bme280.c -* @date 21/01/2020 -* @version 3.4.2 +* @file bme280.c +* @date 2020-01-24 +* @version v3.4.3 * */ @@ -1203,7 +1203,7 @@ static int32_t compensate_temperature(const struct bme280_uncomp_data *uncomp_da return temperature; } -#ifdef BME280_64BIT_ENABLE +#ifndef BME280_32BIT_ENABLE /* 64 bit compensation for pressure data */ /*! * @brief This internal API is used to compensate the raw pressure data and @@ -1254,7 +1254,7 @@ static uint32_t compensate_pressure(const struct bme280_uncomp_data *uncomp_data return pressure; } -#else +#else /* 32 bit compensation for pressure data */ /*! * @brief This internal API is used to compensate the raw pressure data and diff --git a/bme280.h b/bme280.h index cfb96e7..9f9f5af 100644 --- a/bme280.h +++ b/bme280.h @@ -30,9 +30,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * -* @file bme280.h -* @date 21/01/2020 -* @version 3.4.2 +* @file bme280.h +* @date 2020-01-24 +* @version v3.4.3 * */ diff --git a/bme280_defs.h b/bme280_defs.h index 900115d..cf141cd 100644 --- a/bme280_defs.h +++ b/bme280_defs.h @@ -30,9 +30,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * -* @file bme280_defs.h -* @date 21/01/2020 -* @version 3.4.2 +* @file bme280_defs.h +* @date 2020-01-24 +* @version v3.4.3 * */ @@ -93,14 +93,11 @@ /********************************************************/ -#ifndef BME280_FLOAT_ENABLE - -/* #define BME280_FLOAT_ENABLE */ +#ifndef BME280_64BIT_ENABLE /* Check if 64-bit integer (using BME280_64BIT_ENABLE) is enabled */ +#ifndef BME280_32BIT_ENABLE /* Check if 32-bit integer (using BME280_32BIT_ENABLE) is enabled */ +#ifndef BME280_FLOAT_ENABLE /* If any of the integer data types not enabled then enable BME280_FLOAT_ENABLE */ +#define BME280_FLOAT_ENABLE #endif - -#ifndef BME280_FLOAT_ENABLE -#ifndef BME280_64BIT_ENABLE -#define BME280_64BIT_ENABLE #endif #endif diff --git a/examples/linux_userspace.c b/examples/linux_userspace.c index c360eb0..62c8eb5 100644 --- a/examples/linux_userspace.c +++ b/examples/linux_userspace.c @@ -1,40 +1,9 @@ -/** -* Copyright (c) 2020 Bosch Sensortec GmbH. All rights reserved. -* -* BSD-3-Clause -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* -* 2. Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* -* 3. Neither the name of the copyright holder nor the names of its -* contributors may be used to endorse or promote products derived from -* this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -* -* @file linux_userspace.c -* @date 10/01/2020 -* @version -* -*/ +/* + * Copyright (C) 2020 Bosch Sensortec GmbH + * + * The license is available at root folder + * + */ /*! * @ingroup bme280GroupExample diff --git a/selftest/bme280_selftest.c b/selftest/bme280_selftest.c index 9afbc55..4bce46c 100644 --- a/selftest/bme280_selftest.c +++ b/selftest/bme280_selftest.c @@ -30,9 +30,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * -* @file bme280_selftest.c -* @date 21/01/2020 -* @version 3.4.2 +* @file bme280_selftest.c +* @date 2020-01-24 +* @version v3.4.3 * */ diff --git a/selftest/bme280_selftest.h b/selftest/bme280_selftest.h index adb6d1c..e1908db 100644 --- a/selftest/bme280_selftest.h +++ b/selftest/bme280_selftest.h @@ -30,9 +30,9 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * -* @file bme280_selftest.h -* @date 21/01/2020 -* @version 3.4.2 +* @file bme280_selftest.h +* @date 2020-01-24 +* @version v3.4.3 * */