BME68X Sensor API header file.
More...
Go to the source code of this file.
|
| 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) |
| |
BME68X Sensor API header file.
- Copyright
- (c) 2023 Bosch Sensortec GmbH. All rights reserved.
- 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.
◆ bme68x_get_conf()
| int8_t bme68x_get_conf |
( |
struct bme68x_conf * | conf, |
|
|
struct bme68x_dev * | dev ) |
◆ bme68x_get_data()
| int8_t bme68x_get_data |
( |
uint8_t | op_mode, |
|
|
struct bme68x_data * | data, |
|
|
uint8_t * | n_data, |
|
|
struct bme68x_dev * | dev ) |
◆ 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.
◆ bme68x_get_meas_dur()
| uint32_t bme68x_get_meas_dur |
( |
const uint8_t | op_mode, |
|
|
struct bme68x_conf * | conf, |
|
|
struct bme68x_dev * | dev ) |
◆ bme68x_get_op_mode()
| int8_t bme68x_get_op_mode |
( |
uint8_t * | op_mode, |
|
|
struct bme68x_dev * | dev ) |
◆ 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_addr | Starting register address to read from. |
| reg_data | Pointer to the buffer to store the read data. |
| len | Number of bytes to read. |
| dev | Pointer to the device structure. |
- Returns
- 0 on success, or a negative error code.
Definition at line 318 of file bme68x.c.
◆ 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
-
| dev | Pointer to the device structure. |
- Returns
- 0 on success, or a negative error code.
Definition at line 215 of file bme68x.c.
◆ bme68x_selftest_check()
| int8_t bme68x_selftest_check |
( |
const struct bme68x_dev * | dev | ) |
|
◆ 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
-
| conf | Pointer to the configuration structure. |
| dev | Pointer to the device structure. |
- Returns
- 0 on success, or a negative error code.
Definition at line 398 of file bme68x.c.
◆ bme68x_set_heatr_conf()
| int8_t bme68x_set_heatr_conf |
( |
uint8_t | op_mode, |
|
|
const struct bme68x_heatr_conf * | conf, |
|
|
struct bme68x_dev * | dev ) |
◆ bme68x_set_op_mode()
| int8_t bme68x_set_op_mode |
( |
const uint8_t | op_mode, |
|
|
struct bme68x_dev * | dev ) |
◆ 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_addr | Array of register addresses to be written. |
| reg_data | Array of data bytes to be written. |
| len | Number of registers to write. |
| dev | Pointer to the device structure. |
- Returns
- 0 on success, or a negative error code.
Definition at line 253 of file bme68x.c.
◆ bme68x_soft_reset()
| int8_t bme68x_soft_reset |
( |
struct bme68x_dev * | dev | ) |
|
Triggers a software reset on the BME68X sensor.
- Parameters
-
| dev | Pointer to the device structure. |
- Returns
- 0 on success, or a negative error code.
Definition at line 353 of file bme68x.c.