Data Logger BLE Cellular Board
Loading...
Searching...
No Matches
bme68x.h File Reference

BME68X Sensor API header file. More...

#include "bme68x_defs.h"

Go to the source code of this file.

Functions

int8_t bme68x_init (struct bme68x_dev *dev)
 Initializes the BME68X sensor.
 
int8_t bme68x_set_regs (const uint8_t *reg_addr, const uint8_t *reg_data, uint32_t len, struct bme68x_dev *dev)
 This API writes the given data to the register address of the sensor.
 
int8_t bme68x_get_regs (uint8_t reg_addr, uint8_t *reg_data, uint32_t len, struct bme68x_dev *dev)
 This API reads the data from the given register address of sensor.
 
int8_t bme68x_soft_reset (struct bme68x_dev *dev)
 Triggers a software reset on the BME68X sensor.
 
int8_t bme68x_set_op_mode (const uint8_t op_mode, struct bme68x_dev *dev)
 
int8_t bme68x_get_op_mode (uint8_t *op_mode, struct bme68x_dev *dev)
 
uint32_t bme68x_get_meas_dur (const uint8_t op_mode, struct bme68x_conf *conf, struct bme68x_dev *dev)
 
int8_t bme68x_get_data (uint8_t op_mode, struct bme68x_data *data, uint8_t *n_data, struct bme68x_dev *dev)
 
int8_t bme68x_set_conf (struct bme68x_conf *conf, struct bme68x_dev *dev)
 Sets the oversampling, filter and ODR configurations of the sensor.
 
int8_t bme68x_get_conf (struct bme68x_conf *conf, struct bme68x_dev *dev)
 
int8_t bme68x_set_heatr_conf (uint8_t op_mode, const struct bme68x_heatr_conf *conf, struct bme68x_dev *dev)
 
int8_t bme68x_get_heatr_conf (const struct bme68x_heatr_conf *conf, struct bme68x_dev *dev)
 This API is used to get the gas configuration of the sensor.
 
int8_t bme68x_selftest_check (const struct bme68x_dev *dev)
 

Detailed Description

BME68X Sensor API header file.

Date
2023-02-07
Version
v4.4.8
Note
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.

Definition in file bme68x.h.

Function Documentation

◆ bme68x_get_conf()

int8_t bme68x_get_conf ( struct bme68x_conf * conf,
struct bme68x_dev * dev )

Definition at line 468 of file bme68x.c.

Here is the call graph for this function:

◆ bme68x_get_data()

int8_t bme68x_get_data ( uint8_t op_mode,
struct bme68x_data * data,
uint8_t * n_data,
struct bme68x_dev * dev )

Definition at line 591 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_get_heatr_conf()

int8_t bme68x_get_heatr_conf ( const struct bme68x_heatr_conf * conf,
struct bme68x_dev * dev )

This API is used to get the gas configuration of the sensor.

Definition at line 703 of file bme68x.c.

Here is the call graph for this function:

◆ bme68x_get_meas_dur()

uint32_t bme68x_get_meas_dur ( const uint8_t op_mode,
struct bme68x_conf * conf,
struct bme68x_dev * dev )

Definition at line 547 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_get_op_mode()

int8_t bme68x_get_op_mode ( uint8_t * op_mode,
struct bme68x_dev * dev )

Definition at line 528 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_get_regs()

int8_t bme68x_get_regs ( uint8_t reg_addr,
uint8_t * reg_data,
uint32_t len,
struct bme68x_dev * dev )

This API reads the data from the given register address of sensor.

Parameters
reg_addrStarting register address to read from.
reg_dataPointer to the buffer to store the read data.
lenNumber of bytes to read.
devPointer to the device structure.
Returns
0 on success, or a negative error code.

Definition at line 318 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_init()

int8_t bme68x_init ( struct bme68x_dev * dev)

Initializes the BME68X sensor.

This function performs a soft reset, verifies the chip ID, reads the variant ID, and retrieves calibration data from the sensor.

Parameters
devPointer to the device structure.
Returns
0 on success, or a negative error code.

Definition at line 215 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_selftest_check()

int8_t bme68x_selftest_check ( const struct bme68x_dev * dev)

Definition at line 735 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_set_conf()

int8_t bme68x_set_conf ( struct bme68x_conf * conf,
struct bme68x_dev * dev )

Sets the oversampling, filter and ODR configurations of the sensor.

Parameters
confPointer to the configuration structure.
devPointer to the device structure.
Returns
0 on success, or a negative error code.

Definition at line 398 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_set_heatr_conf()

int8_t bme68x_set_heatr_conf ( uint8_t op_mode,
const struct bme68x_heatr_conf * conf,
struct bme68x_dev * dev )

Definition at line 659 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_set_op_mode()

int8_t bme68x_set_op_mode ( const uint8_t op_mode,
struct bme68x_dev * dev )

Definition at line 496 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_set_regs()

int8_t bme68x_set_regs ( const uint8_t * reg_addr,
const uint8_t * reg_data,
uint32_t len,
struct bme68x_dev * dev )

This API writes the given data to the register address of the sensor.

Parameters
reg_addrArray of register addresses to be written.
reg_dataArray of data bytes to be written.
lenNumber of registers to write.
devPointer to the device structure.
Returns
0 on success, or a negative error code.

Definition at line 253 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bme68x_soft_reset()

int8_t bme68x_soft_reset ( struct bme68x_dev * dev)

Triggers a software reset on the BME68X sensor.

Parameters
devPointer to the device structure.
Returns
0 on success, or a negative error code.

Definition at line 353 of file bme68x.c.

Here is the call graph for this function:
Here is the caller graph for this function: