Cleaned macros and defaulted to using floating point compensation

This commit is contained in:
Bosch Sensortec 2020-02-10 10:23:49 +01:00 committed by Kevin Goveas
parent a0acb75c92
commit 56de40696f
7 changed files with 28 additions and 70 deletions

View File

@ -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
```

View File

@ -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

View File

@ -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
*
*/

View File

@ -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

View File

@ -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

View File

@ -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
*
*/

View File

@ -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
*
*/