|  | LibDriver BME680
    | 
driver bme680 source file More...
#include "driver_bme680.h"Go to the source code of this file.
| Functions | |
| uint8_t | bme680_set_addr_pin (bme680_handle_t *handle, bme680_address_t addr_pin) | 
| set the iic address pin | |
| uint8_t | bme680_get_addr_pin (bme680_handle_t *handle, bme680_address_t *addr_pin) | 
| get the iic address pin | |
| uint8_t | bme680_set_interface (bme680_handle_t *handle, bme680_interface_t interface) | 
| set the interface | |
| uint8_t | bme680_get_interface (bme680_handle_t *handle, bme680_interface_t *interface) | 
| get the interface | |
| uint8_t | bme680_init (bme680_handle_t *handle) | 
| initialize the chip | |
| uint8_t | bme680_deinit (bme680_handle_t *handle) | 
| close the chip | |
| uint8_t | bme680_set_idac_heat (bme680_handle_t *handle, uint8_t index, uint8_t reg) | 
| set idac heat | |
| uint8_t | bme680_get_idac_heat (bme680_handle_t *handle, uint8_t index, uint8_t *reg) | 
| get idac heat | |
| uint8_t | bme680_set_resistance_heat (bme680_handle_t *handle, uint8_t index, uint8_t reg) | 
| set resistance heat | |
| uint8_t | bme680_get_resistance_heat (bme680_handle_t *handle, uint8_t index, uint8_t *reg) | 
| get resistance heat | |
| uint8_t | bme680_set_gas_wait (bme680_handle_t *handle, uint8_t index, uint8_t reg) | 
| set gas wait | |
| uint8_t | bme680_get_gas_wait (bme680_handle_t *handle, uint8_t index, uint8_t *reg) | 
| get gas wait | |
| uint8_t | bme680_soft_reset (bme680_handle_t *handle) | 
| soft reset | |
| uint8_t | bme680_get_new_data_status (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get new data status | |
| uint8_t | bme680_get_gas_measuring_status (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get gas measuring status | |
| uint8_t | bme680_get_measuring_status (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get measuring status | |
| uint8_t | bme680_get_gas_measuring_index (bme680_handle_t *handle, uint8_t *index) | 
| get gas measuring index | |
| uint8_t | bme680_get_gas_valid_status (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get gas valid status | |
| uint8_t | bme680_get_heater_stability_status (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get heater stability status | |
| uint8_t | bme680_set_spi_wire_3_data_interrupt (bme680_handle_t *handle, bme680_bool_t enable) | 
| enable or disable spi wire3 data interrupt | |
| uint8_t | bme680_get_spi_wire_3_data_interrupt (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get spi wire3 data interrupt status | |
| uint8_t | bme680_set_humidity_oversampling (bme680_handle_t *handle, bme680_oversampling_t oversampling) | 
| set humidity oversampling | |
| uint8_t | bme680_get_humidity_oversampling (bme680_handle_t *handle, bme680_oversampling_t *oversampling) | 
| get humidity oversampling | |
| uint8_t | bme680_set_temperature_oversampling (bme680_handle_t *handle, bme680_oversampling_t oversampling) | 
| set temperature oversampling | |
| uint8_t | bme680_get_temperature_oversampling (bme680_handle_t *handle, bme680_oversampling_t *oversampling) | 
| get temperature oversampling | |
| uint8_t | bme680_set_pressure_oversampling (bme680_handle_t *handle, bme680_oversampling_t oversampling) | 
| set pressure oversampling | |
| uint8_t | bme680_get_pressure_oversampling (bme680_handle_t *handle, bme680_oversampling_t *oversampling) | 
| get pressure oversampling | |
| uint8_t | bme680_set_mode (bme680_handle_t *handle, bme680_mode_t mode) | 
| set mode | |
| uint8_t | bme680_get_mode (bme680_handle_t *handle, bme680_mode_t *mode) | 
| get mode | |
| uint8_t | bme680_set_filter (bme680_handle_t *handle, bme680_filter_t filter) | 
| set filter | |
| uint8_t | bme680_get_filter (bme680_handle_t *handle, bme680_filter_t *filter) | 
| get filter | |
| uint8_t | bme680_set_spi_wire (bme680_handle_t *handle, bme680_spi_wire_t spi) | 
| set spi wire | |
| uint8_t | bme680_get_spi_wire (bme680_handle_t *handle, bme680_spi_wire_t *spi) | 
| get spi wire | |
| uint8_t | bme680_set_heat_off (bme680_handle_t *handle, bme680_bool_t enable) | 
| enable or disable heat off | |
| uint8_t | bme680_get_heat_off (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get heat off status | |
| uint8_t | bme680_set_run_gas (bme680_handle_t *handle, bme680_bool_t enable) | 
| enable or disable run gas | |
| uint8_t | bme680_get_run_gas (bme680_handle_t *handle, bme680_bool_t *enable) | 
| get run gas status | |
| uint8_t | bme680_set_convert_index (bme680_handle_t *handle, uint8_t index) | 
| set convert index | |
| uint8_t | bme680_get_convert_index (bme680_handle_t *handle, uint8_t *index) | 
| get convert index | |
| uint8_t | bme680_resistance_heat_convert_to_register (bme680_handle_t *handle, float degree_celsius, uint8_t *reg) | 
| convert the resistance heat to the register raw data | |
| uint8_t | bme680_idac_heat_convert_to_register (bme680_handle_t *handle, float ma, uint8_t *reg) | 
| convert the idac heat to the register raw data | |
| uint8_t | bme680_idac_heat_convert_to_data (bme680_handle_t *handle, uint8_t reg, float *ma) | 
| convert the register raw data to idac heat | |
| uint8_t | bme680_gas_wait_convert_to_register (bme680_handle_t *handle, uint16_t ms, uint8_t *reg) | 
| convert the gas wait to the register raw data | |
| uint8_t | bme680_read_gas_resistance (bme680_handle_t *handle, uint16_t *adc_raw, uint8_t *adc_range, float *ohms, uint8_t *index) | 
| read the gas resistance | |
| uint8_t | bme680_read_pressure (bme680_handle_t *handle, uint32_t *pressure_raw, float *pressure_pa) | 
| read the pressure data | |
| uint8_t | bme680_read_temperature (bme680_handle_t *handle, uint32_t *temperature_raw, float *temperature_c) | 
| read the temperature data | |
| uint8_t | bme680_read_humidity (bme680_handle_t *handle, uint32_t *humidity_raw, float *humidity_percentage) | 
| read the humidity data | |
| uint8_t | bme680_read_temperature_pressure_humidity (bme680_handle_t *handle, uint32_t *temperature_raw, float *temperature_c, uint32_t *pressure_raw, float *pressure_pa, uint32_t *humidity_raw, float *humidity_percentage) | 
| read the temperature pressure and humidity data | |
| uint8_t | bme680_read (bme680_handle_t *handle, uint32_t *temperature_raw, float *temperature_c, uint32_t *pressure_raw, float *pressure_pa, uint32_t *humidity_raw, float *humidity_percentage, uint16_t *adc_raw, uint8_t *adc_range, float *ohms, uint8_t *index) | 
| read the temperature pressure humidity and gas resistance | |
| uint8_t | bme680_set_reg (bme680_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) | 
| set the chip register | |
| uint8_t | bme680_get_reg (bme680_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len) | 
| get the chip register | |
| uint8_t | bme680_info (bme680_info_t *info) | 
| get chip's information | |
driver bme680 source file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description | 
|---|---|---|---|
| 2025/07/15 | 1.0 | Shifeng Li | first upload | 
Definition in file driver_bme680.c.
| #define BME680_REG_CONFIG 0x75 | 
config register
Definition at line 94 of file driver_bme680.c.
| #define BME680_REG_CTRL_GAS_0 0x70 | 
control gas0 register
Definition at line 98 of file driver_bme680.c.
| #define BME680_REG_CTRL_GAS_1 0x71 | 
control gas1 register
Definition at line 97 of file driver_bme680.c.
| #define BME680_REG_CTRL_HUM 0x72 | 
control humidity register
Definition at line 96 of file driver_bme680.c.
| #define BME680_REG_CTRL_MEAS 0x74 | 
control meas register
Definition at line 95 of file driver_bme680.c.
| #define BME680_REG_EAS_STATUS_0 0x1D | 
eas status 0 register
Definition at line 112 of file driver_bme680.c.
| #define BME680_REG_GAS_R_LSB 0x2B | 
gas r lsb register
Definition at line 102 of file driver_bme680.c.
| #define BME680_REG_GAS_R_MSB 0x2A | 
gas r msb register
Definition at line 103 of file driver_bme680.c.
| #define BME680_REG_GAS_WAIT_X 0x64 | 
gas wait x register
Definition at line 99 of file driver_bme680.c.
| #define BME680_REG_HUM_LSB 0x26 | 
hum lsb register
Definition at line 104 of file driver_bme680.c.
| #define BME680_REG_HUM_MSB 0x25 | 
hum msb register
Definition at line 105 of file driver_bme680.c.
| #define BME680_REG_ID 0xD0 | 
id register
Definition at line 93 of file driver_bme680.c.
| #define BME680_REG_IDAC_HEAT_X 0x50 | 
idac heat x register
Definition at line 101 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_G1 0xED | 
NVM PAR G1 register
Definition at line 84 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_G2_H 0xEC | 
NVM PAR G2 high register
Definition at line 86 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_G2_L 0xEB | 
NVM PAR G2 low register
Definition at line 85 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_G3 0xEE | 
NVM PAR G3 register
Definition at line 87 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H1_H 0xE3 | 
NVM PAR H1 high register
Definition at line 76 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H1_L 0xE2 | 
NVM PAR H1 low register
Definition at line 75 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H2_H 0xE1 | 
NVM PAR H2 high register
Definition at line 78 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H2_L 0xE2 | 
NVM PAR H2 low register
Definition at line 77 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H3 0xE4 | 
NVM PAR H3 register
Definition at line 79 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H4 0xE5 | 
NVM PAR H4 register
Definition at line 80 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H5 0xE6 | 
NVM PAR H5 register
Definition at line 81 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H6 0xE7 | 
NVM PAR H6 register
Definition at line 82 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_H7 0xE8 | 
NVM PAR H7 register
Definition at line 83 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P10 0xA0 | 
NVM PAR P10 register
Definition at line 74 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P1_H 0x8F | 
NVM PAR P1 high register
Definition at line 60 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P1_L 0x8E | 
NVM PAR P1 low register
Definition at line 59 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P2_H 0x91 | 
NVM PAR P2 high register
Definition at line 62 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P2_L 0x90 | 
NVM PAR P2 low register
Definition at line 61 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P3 0x92 | 
NVM PAR P3 register
Definition at line 63 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P4_H 0x95 | 
NVM PAR P4 high register
Definition at line 65 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P4_L 0x94 | 
NVM PAR P4 low register
Definition at line 64 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P5_H 0x97 | 
NVM PAR P5 high register
Definition at line 67 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P5_L 0x96 | 
NVM PAR P5 low register
Definition at line 66 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P6 0x99 | 
NVM PAR P6 register
Definition at line 68 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P7 0x98 | 
NVM PAR P7 register
Definition at line 69 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P8_H 0x9D | 
NVM PAR P8 high register
Definition at line 71 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P8_L 0x9C | 
NVM PAR P8 low register
Definition at line 70 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P9_H 0x9F | 
NVM PAR P9 high register
Definition at line 73 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_P9_L 0x9E | 
NVM PAR P9 low register
Definition at line 72 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_T1_H 0xEA | 
NVM PAR T1 high register
Definition at line 55 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_T1_L 0xE9 | 
| #define BME680_REG_NVM_PAR_T2_H 0x8B | 
NVM PAR T2 high register
Definition at line 57 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_T2_L 0x8A | 
NVM PAR T2 low register
Definition at line 56 of file driver_bme680.c.
| #define BME680_REG_NVM_PAR_T3 0x8C | 
NVM PAR T3 register
Definition at line 58 of file driver_bme680.c.
| #define BME680_REG_NVM_RANGE_SWITCH 0x04 | 
NVM RANGE SWITCH ERROR register
Definition at line 90 of file driver_bme680.c.
| #define BME680_REG_NVM_RES_HEAT_RANGE 0x02 | 
NVM RES HEAT RANGE register
Definition at line 88 of file driver_bme680.c.
| #define BME680_REG_NVM_RES_HEAT_VAL 0x00 | 
NVM RES HEAT VAL register
Definition at line 89 of file driver_bme680.c.
| #define BME680_REG_PRESS_LSB 0x20 | 
press lsb register
Definition at line 110 of file driver_bme680.c.
| #define BME680_REG_PRESS_MSB 0x1F | 
press msb register
Definition at line 111 of file driver_bme680.c.
| #define BME680_REG_PRESS_XLSB 0x21 | 
press xlsb register
Definition at line 109 of file driver_bme680.c.
| #define BME680_REG_RES_HEAT_X 0x5A | 
res heat x register
Definition at line 100 of file driver_bme680.c.
| #define BME680_REG_RESET 0xE0 | 
reset register
Definition at line 92 of file driver_bme680.c.
| #define BME680_REG_STATUS 0x73 | 
status register
Definition at line 91 of file driver_bme680.c.
| #define BME680_REG_TEMP_LSB 0x23 | 
temp lsb register
Definition at line 107 of file driver_bme680.c.
| #define BME680_REG_TEMP_MSB 0x22 | 
temp msb register
Definition at line 108 of file driver_bme680.c.
| #define BME680_REG_TEMP_XLSB 0x24 | 
temp xlsb register
Definition at line 106 of file driver_bme680.c.
| #define CHIP_NAME "Bosch BME680" | 
| #define DRIVER_VERSION 1000 | 
driver version
Definition at line 49 of file driver_bme680.c.
| #define MANUFACTURER_NAME "Bosch" | 
manufacturer name
Definition at line 43 of file driver_bme680.c.
| #define MAX_CURRENT 0.849f | 
chip max current
Definition at line 46 of file driver_bme680.c.
| #define SUPPLY_VOLTAGE_MAX 3.6f | 
chip max supply voltage
Definition at line 45 of file driver_bme680.c.
| #define SUPPLY_VOLTAGE_MIN 1.71f | 
chip min supply voltage
Definition at line 44 of file driver_bme680.c.
| #define TEMPERATURE_MAX 85.0f | 
chip max operating temperature
Definition at line 48 of file driver_bme680.c.
| #define TEMPERATURE_MIN -40.0f | 
chip min operating temperature
Definition at line 47 of file driver_bme680.c.