Adafruit BME680 Library
Functions | Variables
bme680.c File Reference

Sensor driver for BME680 sensor. More...

#include "bme680.h"

Functions

int8_t bme680_init (struct bme680_dev *dev)
 This API is the entry point. It reads the chip-id and calibration data from the sensor. More...
 
int8_t bme680_get_regs (uint8_t reg_addr, uint8_t *reg_data, uint16_t len, struct bme680_dev *dev)
 This API reads the data from the given register address of the sensor. More...
 
int8_t bme680_set_regs (const uint8_t *reg_addr, const uint8_t *reg_data, uint8_t len, struct bme680_dev *dev)
 This API writes the given data to the register address of the sensor. More...
 
int8_t bme680_soft_reset (struct bme680_dev *dev)
 This API performs the soft reset of the sensor. More...
 
int8_t bme680_set_sensor_settings (uint16_t desired_settings, struct bme680_dev *dev)
 This API is used to set the oversampling, filter and T,P,H, gas selection settings in the sensor. More...
 
int8_t bme680_get_sensor_settings (uint16_t desired_settings, struct bme680_dev *dev)
 This API is used to get the oversampling, filter and T,P,H, gas selection settings in the sensor. More...
 
int8_t bme680_set_sensor_mode (struct bme680_dev *dev)
 This API is used to set the power mode of the sensor. More...
 
int8_t bme680_get_sensor_mode (struct bme680_dev *dev)
 This API is used to get the power mode of the sensor. More...
 
void bme680_set_profile_dur (uint16_t duration, struct bme680_dev *dev)
 This API is used to set the profile duration of the sensor. More...
 
void bme680_get_profile_dur (uint16_t *duration, struct bme680_dev *dev)
 This API is used to get the profile duration of the sensor. More...
 
int8_t bme680_get_sensor_data (struct bme680_field_data *data, struct bme680_dev *dev)
 This API reads the pressure, temperature and humidity and gas data from the sensor, compensates the data and store it in the bme680_data structure instance passed by the user. More...
 

Variables

uint32_t lookupTable1 [16]
 
uint32_t lookupTable2 [16]
 

Detailed Description

Sensor driver for BME680 sensor.

Variable Documentation

◆ lookupTable1

uint32_t lookupTable1[16]
Initial value:
= { UINT32_C(2147483647), UINT32_C(2147483647), UINT32_C(2147483647), UINT32_C(2147483647),
UINT32_C(2147483647), UINT32_C(2126008810), UINT32_C(2147483647), UINT32_C(2130303777), UINT32_C(2147483647),
UINT32_C(2147483647), UINT32_C(2143188679), UINT32_C(2136746228), UINT32_C(2147483647), UINT32_C(2126008810),
UINT32_C(2147483647), UINT32_C(2147483647) }

static variables Look up table for the possible gas range values

◆ lookupTable2

uint32_t lookupTable2[16]
Initial value:
= { UINT32_C(4096000000), UINT32_C(2048000000), UINT32_C(1024000000), UINT32_C(512000000),
UINT32_C(255744255), UINT32_C(127110228), UINT32_C(64000000), UINT32_C(32258064), UINT32_C(16016016), UINT32_C(
8000000), UINT32_C(4000000), UINT32_C(2000000), UINT32_C(1000000), UINT32_C(500000), UINT32_C(250000),
UINT32_C(125000) }

Look up table for the possible gas range values