Adafruit BME680 Library
bme680.h
Go to the documentation of this file.
1 
53 #ifndef BME680_H_
54 #define BME680_H_
55 
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 
62 /* Header includes */
63 #include "bme680_defs.h"
64 
65 /* function prototype declarations */
75 int8_t bme680_init(struct bme680_dev *dev);
76 
90 int8_t bme680_set_regs(const uint8_t *reg_addr, const uint8_t *reg_data, uint8_t len, struct bme680_dev *dev);
91 
103 int8_t bme680_get_regs(uint8_t reg_addr, uint8_t *reg_data, uint16_t len, struct bme680_dev *dev);
104 
113 int8_t bme680_soft_reset(struct bme680_dev *dev);
114 
129 int8_t bme680_set_sensor_mode(struct bme680_dev *dev);
130 
145 int8_t bme680_get_sensor_mode(struct bme680_dev *dev);
146 
155 void bme680_set_profile_dur(uint16_t duration, struct bme680_dev *dev);
156 
165 void bme680_get_profile_dur(uint16_t *duration, struct bme680_dev *dev);
166 
178 int8_t bme680_get_sensor_data(struct bme680_field_data *data, struct bme680_dev *dev);
179 
207 int8_t bme680_set_sensor_settings(uint16_t desired_settings, struct bme680_dev *dev);
208 
220 int8_t bme680_get_sensor_settings(uint16_t desired_settings, struct bme680_dev *dev);
221 #ifdef __cplusplus
222 }
223 #endif /* End of CPP guard */
224 #endif /* BME680_H_ */
225 
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.
Definition: bme680.c:237
int8_t bme680_get_sensor_mode(struct bme680_dev *dev)
This API is used to get the power mode of the sensor.
Definition: bme680.c:568
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...
Definition: bme680.c:364
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...
Definition: bme680.c:482
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.
Definition: bme680.c:266
void bme680_get_profile_dur(uint16_t *duration, struct bme680_dev *dev)
This API is used to get the profile duration of the sensor.
Definition: bme680.c:606
Sensor driver for BME680 sensor.
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.
Definition: bme680.c:291
int8_t bme680_set_sensor_mode(struct bme680_dev *dev)
This API is used to set the power mode of the sensor.
Definition: bme680.c:529
void bme680_set_profile_dur(uint16_t duration, struct bme680_dev *dev)
This API is used to set the profile duration of the sensor.
Definition: bme680.c:587
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.
Definition: bme680.c:627
Sensor field data structure.
Definition: bme680_defs.h:382
int8_t bme680_soft_reset(struct bme680_dev *dev)
This API performs the soft reset of the sensor.
Definition: bme680.c:330
BME680 device structure.
Definition: bme680_defs.h:494