LibDriver BME688
Loading...
Searching...
No Matches
bme688 base driver function

bme688 base driver modules More...

Collaboration diagram for bme688 base driver function:

Data Structures

struct  bme688_parallel_data_s
 bme688 parallel data structure definition More...
struct  bme688_parallel_config_s
 bme688 parallel config structure definition More...
struct  bme688_handle_s
 bme688 handle structure definition More...
struct  bme688_info_s
 bme688 information structure definition More...

Typedefs

typedef struct bme688_parallel_data_s bme688_parallel_data_t
 bme688 parallel data structure definition
typedef struct bme688_parallel_config_s bme688_parallel_config_t
 bme688 parallel config structure definition
typedef struct bme688_handle_s bme688_handle_t
 bme688 handle structure definition
typedef struct bme688_info_s bme688_info_t
 bme688 information structure definition

Enumerations

enum  bme688_bool_t { BME688_BOOL_FALSE = 0x00 , BME688_BOOL_TRUE = 0x01 }
 bme688 bool enumeration definition More...
enum  bme688_interface_t { BME688_INTERFACE_IIC = 0x00 , BME688_INTERFACE_SPI = 0x01 }
 bme688 interface enumeration definition More...
enum  bme688_address_t { BME688_ADDRESS_ADO_LOW = (0x76 << 1) , BME688_ADDRESS_ADO_HIGH = (0x77 << 1) }
 bme688 address enumeration definition More...
enum  bme688_oversampling_t {
  BME688_OVERSAMPLING_SKIP = 0x00 , BME688_OVERSAMPLING_x1 = 0x01 , BME688_OVERSAMPLING_x2 = 0x02 , BME688_OVERSAMPLING_x4 = 0x03 ,
  BME688_OVERSAMPLING_x8 = 0x04 , BME688_OVERSAMPLING_x16 = 0x05
}
 bme688 oversampling enumeration definition More...
enum  bme688_mode_t { BME688_MODE_SLEEP = 0x00 , BME688_MODE_FORCED = 0x01 , BME688_MODE_PARALLEL = 0x02 }
 bme688 mode enumeration definition More...
enum  bme688_filter_t {
  BME688_FILTER_OFF = 0x00 , BME688_FILTER_COEFF_1 = 0x01 , BME688_FILTER_COEFF_3 = 0x02 , BME688_FILTER_COEFF_7 = 0x03 ,
  BME688_FILTER_COEFF_15 = 0x04 , BME688_FILTER_COEFF_31 = 0x05 , BME688_FILTER_COEFF_63 = 0x06 , BME688_FILTER_COEFF_127 = 0x07
}
 bme688 filter enumeration definition More...
enum  bme688_spi_wire_t { BME688_SPI_WIRE_4 = 0x00 , BME688_SPI_WIRE_3 = 0x01 }
 bme688 spi wire enumeration definition More...
enum  bme688_heater_profile_t {
  BME688_HEATER_PROFILE_FORCED_STEP_0_PARALLEL_NO_STEP = 0x00 , BME688_HEATER_PROFILE_FORCED_STEP_1_PARALLEL_STEP_0 = 0x01 , BME688_HEATER_PROFILE_FORCED_STEP_2_PARALLEL_STEP_0_1 = 0x02 , BME688_HEATER_PROFILE_FORCED_STEP_3_PARALLEL_STEP_0_2 = 0x03 ,
  BME688_HEATER_PROFILE_FORCED_STEP_4_PARALLEL_STEP_0_3 = 0x04 , BME688_HEATER_PROFILE_FORCED_STEP_5_PARALLEL_STEP_0_4 = 0x05 , BME688_HEATER_PROFILE_FORCED_STEP_6_PARALLEL_STEP_0_5 = 0x06 , BME688_HEATER_PROFILE_FORCED_STEP_7_PARALLEL_STEP_0_6 = 0x07 ,
  BME688_HEATER_PROFILE_FORCED_STEP_8_PARALLEL_STEP_0_7 = 0x08 , BME688_HEATER_PROFILE_FORCED_STEP_9_PARALLEL_STEP_0_8 = 0x09 , BME688_HEATER_PROFILE_FORCED_NO_STEP_PARALLEL_STEP_0_9 = 0x0A
}
 bme688 heater profile enumeration definition More...
enum  bme688_section_t { BME688_SECTION_0 = 0x00 , BME688_SECTION_1 = 0x01 , BME688_SECTION_2 = 0x02 }
 bme688 section enumeration definition More...
enum  bme688_status_t { BME688_STATUS_CHANNEL_DATA = 0x00 , BME688_STATUS_ALL_DATA = 0x01 , BME688_STATUS_SEQUENCE_LOST = 0x02 }
 bme688 status enumeration definition More...

Functions

uint8_t bme688_info (bme688_info_t *info)
 get chip's information
uint8_t bme688_set_interface (bme688_handle_t *handle, bme688_interface_t interface)
 set the interface
uint8_t bme688_get_interface (bme688_handle_t *handle, bme688_interface_t *interface)
 get the interface
uint8_t bme688_set_addr_pin (bme688_handle_t *handle, bme688_address_t addr_pin)
 set the iic address pin
uint8_t bme688_get_addr_pin (bme688_handle_t *handle, bme688_address_t *addr_pin)
 get the iic address pin
uint8_t bme688_init (bme688_handle_t *handle)
 initialize the chip
uint8_t bme688_deinit (bme688_handle_t *handle)
 close the chip
uint8_t bme688_read (bme688_handle_t *handle, bme688_section_t section, 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 bme688_read_temperature_pressure_humidity (bme688_handle_t *handle, bme688_section_t section, 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 bme688_read_pressure (bme688_handle_t *handle, bme688_section_t section, uint32_t *pressure_raw, float *pressure_pa)
 read the pressure data
uint8_t bme688_read_temperature (bme688_handle_t *handle, bme688_section_t section, uint32_t *temperature_raw, float *temperature_c)
 read the temperature data
uint8_t bme688_read_humidity (bme688_handle_t *handle, bme688_section_t section, uint32_t *humidity_raw, float *humidity_percentage)
 read the humidity data
uint8_t bme688_read_gas_resistance (bme688_handle_t *handle, bme688_section_t section, uint16_t *adc_raw, uint8_t *adc_range, float *ohms, uint8_t *index)
 read the gas resistance
uint8_t bme688_parallel_progress (bme688_handle_t *handle)
 parallel progress
uint8_t bme688_parallel_reset (bme688_handle_t *handle)
 parallel reset
uint8_t bme688_parallel_config (bme688_handle_t *handle, bme688_parallel_config_t *config)
 parallel config
uint8_t bme688_get_new_data_status (bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
 get new data status
uint8_t bme688_get_gas_measuring_status (bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
 get gas measuring status
uint8_t bme688_get_measuring_status (bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
 get measuring status
uint8_t bme688_get_gas_measuring_index (bme688_handle_t *handle, bme688_section_t section, uint8_t *index)
 get gas measuring index
uint8_t bme688_get_gas_valid_status (bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
 get gas valid status
uint8_t bme688_get_heater_stability_status (bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
 get heater stability status
uint8_t bme688_get_sub_measurement_index (bme688_handle_t *handle, bme688_section_t section, uint8_t *ind)
 get sub measurement index
uint8_t bme688_set_idac_heater (bme688_handle_t *handle, uint8_t index, uint8_t reg)
 set idac heater
uint8_t bme688_get_idac_heater (bme688_handle_t *handle, uint8_t index, uint8_t *reg)
 get idac heater
uint8_t bme688_set_resistance_heater (bme688_handle_t *handle, uint8_t index, uint8_t reg)
 set resistance heater
uint8_t bme688_get_resistance_heater (bme688_handle_t *handle, uint8_t index, uint8_t *reg)
 get resistance heater
uint8_t bme688_set_gas_wait (bme688_handle_t *handle, uint8_t index, uint8_t reg)
 set gas wait
uint8_t bme688_get_gas_wait (bme688_handle_t *handle, uint8_t index, uint8_t *reg)
 get gas wait
uint8_t bme688_set_gas_wait_shared (bme688_handle_t *handle, uint8_t reg)
 set gas wait shared
uint8_t bme688_get_gas_wait_shared (bme688_handle_t *handle, uint8_t *reg)
 get gas wait shared
uint8_t bme688_soft_reset (bme688_handle_t *handle)
 soft reset
uint8_t bme688_set_spi_wire_3_data_interrupt (bme688_handle_t *handle, bme688_bool_t enable)
 enable or disable spi wire3 data interrupt
uint8_t bme688_get_spi_wire_3_data_interrupt (bme688_handle_t *handle, bme688_bool_t *enable)
 get spi wire3 data interrupt status
uint8_t bme688_set_humidity_oversampling (bme688_handle_t *handle, bme688_oversampling_t oversampling)
 set humidity oversampling
uint8_t bme688_get_humidity_oversampling (bme688_handle_t *handle, bme688_oversampling_t *oversampling)
 get humidity oversampling
uint8_t bme688_set_temperature_oversampling (bme688_handle_t *handle, bme688_oversampling_t oversampling)
 set temperature oversampling
uint8_t bme688_get_temperature_oversampling (bme688_handle_t *handle, bme688_oversampling_t *oversampling)
 get temperature oversampling
uint8_t bme688_set_pressure_oversampling (bme688_handle_t *handle, bme688_oversampling_t oversampling)
 set pressure oversampling
uint8_t bme688_get_pressure_oversampling (bme688_handle_t *handle, bme688_oversampling_t *oversampling)
 get pressure oversampling
uint8_t bme688_set_mode (bme688_handle_t *handle, bme688_mode_t mode)
 set mode
uint8_t bme688_get_mode (bme688_handle_t *handle, bme688_mode_t *mode)
 get mode
uint8_t bme688_set_filter (bme688_handle_t *handle, bme688_filter_t filter)
 set filter
uint8_t bme688_get_filter (bme688_handle_t *handle, bme688_filter_t *filter)
 get filter
uint8_t bme688_set_spi_wire (bme688_handle_t *handle, bme688_spi_wire_t spi)
 set spi wire
uint8_t bme688_get_spi_wire (bme688_handle_t *handle, bme688_spi_wire_t *spi)
 get spi wire
uint8_t bme688_set_heater_off (bme688_handle_t *handle, bme688_bool_t enable)
 enable or disable heater off
uint8_t bme688_get_heater_off (bme688_handle_t *handle, bme688_bool_t *enable)
 get heater off status
uint8_t bme688_set_run_gas (bme688_handle_t *handle, bme688_bool_t enable)
 enable or disable run gas
uint8_t bme688_get_run_gas (bme688_handle_t *handle, bme688_bool_t *enable)
 get run gas status
uint8_t bme688_set_heater_profile (bme688_handle_t *handle, bme688_heater_profile_t profile)
 set heater profile
uint8_t bme688_get_heater_profile (bme688_handle_t *handle, bme688_heater_profile_t *profile)
 get heater profile
uint8_t bme688_resistance_heater_convert_to_register (bme688_handle_t *handle, float degree_celsius, uint8_t *reg)
 convert the resistance heater to the register raw data
uint8_t bme688_idac_heater_convert_to_register (bme688_handle_t *handle, float ma, uint8_t *reg)
 convert the idac heater to the register raw data
uint8_t bme688_idac_heater_convert_to_data (bme688_handle_t *handle, uint8_t reg, float *ma)
 convert the register raw data to idac heater
uint8_t bme688_gas_wait_convert_to_register (bme688_handle_t *handle, uint16_t ms, uint8_t *reg)
 convert the gas wait to the register raw data
uint8_t bme688_gas_wait_shared_convert_to_register (bme688_handle_t *handle, float m, uint8_t *reg)
 convert the gas wait shared to the register raw data

Detailed Description

bme688 base driver modules

Typedef Documentation

◆ bme688_handle_t

bme688 handle structure definition

◆ bme688_info_t

typedef struct bme688_info_s bme688_info_t

bme688 information structure definition

◆ bme688_parallel_config_t

bme688 parallel config structure definition

◆ bme688_parallel_data_t

bme688 parallel data structure definition

Enumeration Type Documentation

◆ bme688_address_t

bme688 address enumeration definition

Enumerator
BME688_ADDRESS_ADO_LOW 

ADO is low

BME688_ADDRESS_ADO_HIGH 

ADO is HIGH

Definition at line 80 of file driver_bme688.h.

◆ bme688_bool_t

bme688 bool enumeration definition

Enumerator
BME688_BOOL_FALSE 

false

BME688_BOOL_TRUE 

true

Definition at line 62 of file driver_bme688.h.

◆ bme688_filter_t

bme688 filter enumeration definition

Enumerator
BME688_FILTER_OFF 

off

BME688_FILTER_COEFF_1 

coeff 1

BME688_FILTER_COEFF_3 

coeff 3

BME688_FILTER_COEFF_7 

coeff 7

BME688_FILTER_COEFF_15 

coeff 15

BME688_FILTER_COEFF_31 

coeff 31

BME688_FILTER_COEFF_63 

coeff 63

BME688_FILTER_COEFF_127 

coeff 127

Definition at line 112 of file driver_bme688.h.

◆ bme688_heater_profile_t

bme688 heater profile enumeration definition

Enumerator
BME688_HEATER_PROFILE_FORCED_STEP_0_PARALLEL_NO_STEP 

forced mode step 0, parallel mode no step

BME688_HEATER_PROFILE_FORCED_STEP_1_PARALLEL_STEP_0 

forced mode step 1, parallel mode step 0

BME688_HEATER_PROFILE_FORCED_STEP_2_PARALLEL_STEP_0_1 

forced mode step 2, parallel mode step 0 - 1

BME688_HEATER_PROFILE_FORCED_STEP_3_PARALLEL_STEP_0_2 

forced mode step 3, parallel mode step 0 - 2

BME688_HEATER_PROFILE_FORCED_STEP_4_PARALLEL_STEP_0_3 

forced mode step 4, parallel mode step 0 - 3

BME688_HEATER_PROFILE_FORCED_STEP_5_PARALLEL_STEP_0_4 

forced mode step 5, parallel mode step 0 - 4

BME688_HEATER_PROFILE_FORCED_STEP_6_PARALLEL_STEP_0_5 

forced mode step 6, parallel mode step 0 - 5

BME688_HEATER_PROFILE_FORCED_STEP_7_PARALLEL_STEP_0_6 

forced mode step 7, parallel mode step 0 - 6

BME688_HEATER_PROFILE_FORCED_STEP_8_PARALLEL_STEP_0_7 

forced mode step 8, parallel mode step 0 - 7

BME688_HEATER_PROFILE_FORCED_STEP_9_PARALLEL_STEP_0_8 

forced mode step 9, parallel mode step 0 - 8

BME688_HEATER_PROFILE_FORCED_NO_STEP_PARALLEL_STEP_0_9 

forced mode no step, parallel mode step 0 - 9

Definition at line 136 of file driver_bme688.h.

◆ bme688_interface_t

bme688 interface enumeration definition

Enumerator
BME688_INTERFACE_IIC 

iic interface

BME688_INTERFACE_SPI 

spi interface

Definition at line 71 of file driver_bme688.h.

◆ bme688_mode_t

bme688 mode enumeration definition

Enumerator
BME688_MODE_SLEEP 

sleep mode

BME688_MODE_FORCED 

forced mode

BME688_MODE_PARALLEL 

parallel mode

Definition at line 102 of file driver_bme688.h.

◆ bme688_oversampling_t

bme688 oversampling enumeration definition

Enumerator
BME688_OVERSAMPLING_SKIP 

oversampling x1

BME688_OVERSAMPLING_x1 

oversampling x1

BME688_OVERSAMPLING_x2 

oversampling x2

BME688_OVERSAMPLING_x4 

oversampling x4

BME688_OVERSAMPLING_x8 

oversampling x8

BME688_OVERSAMPLING_x16 

oversampling x16

Definition at line 89 of file driver_bme688.h.

◆ bme688_section_t

bme688 section enumeration definition

Enumerator
BME688_SECTION_0 

section 0

BME688_SECTION_1 

section 1

BME688_SECTION_2 

section 2

Definition at line 154 of file driver_bme688.h.

◆ bme688_spi_wire_t

bme688 spi wire enumeration definition

Enumerator
BME688_SPI_WIRE_4 

4 wire

BME688_SPI_WIRE_3 

3 wire

Definition at line 127 of file driver_bme688.h.

◆ bme688_status_t

bme688 status enumeration definition

Enumerator
BME688_STATUS_CHANNEL_DATA 

channel data

BME688_STATUS_ALL_DATA 

all data

BME688_STATUS_SEQUENCE_LOST 

sequence lost

Definition at line 164 of file driver_bme688.h.

Function Documentation

◆ bme688_deinit()

uint8_t bme688_deinit ( bme688_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to a bme688 handle structure
Returns
status code
  • 0 success
  • 1 iic deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 power down failed
Note
none

Definition at line 959 of file driver_bme688.c.

◆ bme688_gas_wait_convert_to_register()

uint8_t bme688_gas_wait_convert_to_register ( bme688_handle_t * handle,
uint16_t ms,
uint8_t * reg )

convert the gas wait to the register raw data

Parameters
[in]*handlepointer to a bme688 handle structure
[in]msinput ms
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 1 ms >= 0x0FC0
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2234 of file driver_bme688.c.

◆ bme688_gas_wait_shared_convert_to_register()

uint8_t bme688_gas_wait_shared_convert_to_register ( bme688_handle_t * handle,
float m,
uint8_t * reg )

convert the gas wait shared to the register raw data

Parameters
[in]*handlepointer to a bme688 handle structure
[in]minput ms
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 1 ms >= 0x0783
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2279 of file driver_bme688.c.

◆ bme688_get_addr_pin()

uint8_t bme688_get_addr_pin ( bme688_handle_t * handle,
bme688_address_t * addr_pin )

get the iic address pin

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*addr_pinpointer to an iic address pin buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 725 of file driver_bme688.c.

◆ bme688_get_filter()

uint8_t bme688_get_filter ( bme688_handle_t * handle,
bme688_filter_t * filter )

get filter

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*filterpointer to a filter buffer
Returns
status code
  • 0 success
  • 1 get filter failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1801 of file driver_bme688.c.

◆ bme688_get_gas_measuring_index()

uint8_t bme688_get_gas_measuring_index ( bme688_handle_t * handle,
bme688_section_t section,
uint8_t * index )

get gas measuring index

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*indexpointer to an index buffer
Returns
status code
  • 0 success
  • 1 get gas measuring index failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2477 of file driver_bme688.c.

◆ bme688_get_gas_measuring_status()

uint8_t bme688_get_gas_measuring_status ( bme688_handle_t * handle,
bme688_section_t section,
bme688_bool_t * enable )

get gas measuring status

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get gas measuring status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2377 of file driver_bme688.c.

◆ bme688_get_gas_valid_status()

uint8_t bme688_get_gas_valid_status ( bme688_handle_t * handle,
bme688_section_t section,
bme688_bool_t * enable )

get gas valid status

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get gas valid status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2527 of file driver_bme688.c.

◆ bme688_get_gas_wait()

uint8_t bme688_get_gas_wait ( bme688_handle_t * handle,
uint8_t index,
uint8_t * reg )

get gas wait

Parameters
[in]*handlepointer to a bme688 handle structure
[in]indexinput index
[out]*regpointer to an input register buffer
Returns
status code
  • 0 success
  • 1 get gas wait failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 index > 9
Note
none

Definition at line 1231 of file driver_bme688.c.

◆ bme688_get_gas_wait_shared()

uint8_t bme688_get_gas_wait_shared ( bme688_handle_t * handle,
uint8_t * reg )

get gas wait shared

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*regpointer to an input register buffer
Returns
status code
  • 0 success
  • 1 get gas wait shared failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1304 of file driver_bme688.c.

◆ bme688_get_heater_off()

uint8_t bme688_get_heater_off ( bme688_handle_t * handle,
bme688_bool_t * enable )

get heater off status

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get heater off failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1955 of file driver_bme688.c.

◆ bme688_get_heater_profile()

uint8_t bme688_get_heater_profile ( bme688_handle_t * handle,
bme688_heater_profile_t * profile )

get heater profile

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*profilepointer to a profile buffer
Returns
status code
  • 0 success
  • 1 get heater profile failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2117 of file driver_bme688.c.

◆ bme688_get_heater_stability_status()

uint8_t bme688_get_heater_stability_status ( bme688_handle_t * handle,
bme688_section_t section,
bme688_bool_t * enable )

get heater stability status

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get heater stability status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2577 of file driver_bme688.c.

◆ bme688_get_humidity_oversampling()

uint8_t bme688_get_humidity_oversampling ( bme688_handle_t * handle,
bme688_oversampling_t * oversampling )

get humidity oversampling

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*oversamplingpointer to a humidity oversampling buffer
Returns
status code
  • 0 success
  • 1 get humidity oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1493 of file driver_bme688.c.

◆ bme688_get_idac_heater()

uint8_t bme688_get_idac_heater ( bme688_handle_t * handle,
uint8_t index,
uint8_t * reg )

get idac heater

Parameters
[in]*handlepointer to a bme688 handle structure
[in]indexinput index
[out]*regpointer to an input register buffer
Returns
status code
  • 0 success
  • 1 get idac heater failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 index > 9
Note
none

Definition at line 1065 of file driver_bme688.c.

◆ bme688_get_interface()

uint8_t bme688_get_interface ( bme688_handle_t * handle,
bme688_interface_t * interface )

get the interface

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*interfacepointer to a chip interface buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 767 of file driver_bme688.c.

◆ bme688_get_measuring_status()

uint8_t bme688_get_measuring_status ( bme688_handle_t * handle,
bme688_section_t section,
bme688_bool_t * enable )

get measuring status

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get measuring status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2427 of file driver_bme688.c.

◆ bme688_get_mode()

uint8_t bme688_get_mode ( bme688_handle_t * handle,
bme688_mode_t * mode )

get mode

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*modepointer to a mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1724 of file driver_bme688.c.

◆ bme688_get_new_data_status()

uint8_t bme688_get_new_data_status ( bme688_handle_t * handle,
bme688_section_t section,
bme688_bool_t * enable )

get new data status

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 get new data status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2327 of file driver_bme688.c.

◆ bme688_get_pressure_oversampling()

uint8_t bme688_get_pressure_oversampling ( bme688_handle_t * handle,
bme688_oversampling_t * oversampling )

get pressure oversampling

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*oversamplingpointer to a oversampling buffer
Returns
status code
  • 0 success
  • 1 get pressure oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1647 of file driver_bme688.c.

◆ bme688_get_resistance_heater()

uint8_t bme688_get_resistance_heater ( bme688_handle_t * handle,
uint8_t index,
uint8_t * reg )

get resistance heater

Parameters
[in]*handlepointer to a bme688 handle structure
[in]indexinput index
[out]*regpointer to an input register buffer
Returns
status code
  • 0 success
  • 1 get resistance heater failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 index > 9
Note
none

Definition at line 1148 of file driver_bme688.c.

◆ bme688_get_run_gas()

uint8_t bme688_get_run_gas ( bme688_handle_t * handle,
bme688_bool_t * enable )

get run gas status

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get run gas failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2032 of file driver_bme688.c.

◆ bme688_get_spi_wire()

uint8_t bme688_get_spi_wire ( bme688_handle_t * handle,
bme688_spi_wire_t * spi )

get spi wire

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*spipointer to a spi wire buffer
Returns
status code
  • 0 success
  • 1 get spi wire failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1878 of file driver_bme688.c.

◆ bme688_get_spi_wire_3_data_interrupt()

uint8_t bme688_get_spi_wire_3_data_interrupt ( bme688_handle_t * handle,
bme688_bool_t * enable )

get spi wire3 data interrupt status

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get spi wire 3 data interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1416 of file driver_bme688.c.

◆ bme688_get_sub_measurement_index()

uint8_t bme688_get_sub_measurement_index ( bme688_handle_t * handle,
bme688_section_t section,
uint8_t * ind )

get sub measurement index

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*indpointer to an index buffer
Returns
status code
  • 0 success
  • 1 get sub measurement index failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2627 of file driver_bme688.c.

◆ bme688_get_temperature_oversampling()

uint8_t bme688_get_temperature_oversampling ( bme688_handle_t * handle,
bme688_oversampling_t * oversampling )

get temperature oversampling

Parameters
[in]*handlepointer to a bme688 handle structure
[out]*oversamplingpointer to a oversampling buffer
Returns
status code
  • 0 success
  • 1 get temperature oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1570 of file driver_bme688.c.

◆ bme688_idac_heater_convert_to_data()

uint8_t bme688_idac_heater_convert_to_data ( bme688_handle_t * handle,
uint8_t reg,
float * ma )

convert the register raw data to idac heater

Parameters
[in]*handlepointer to a bme688 handle structure
[in]regregister raw data
[out]*mapointer to a ma buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2206 of file driver_bme688.c.

◆ bme688_idac_heater_convert_to_register()

uint8_t bme688_idac_heater_convert_to_register ( bme688_handle_t * handle,
float ma,
uint8_t * reg )

convert the idac heater to the register raw data

Parameters
[in]*handlepointer to a bme688 handle structure
[in]mainput ma
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2179 of file driver_bme688.c.

◆ bme688_info()

uint8_t bme688_info ( bme688_info_t * info)

get chip's information

Parameters
[out]*infopointer to a bme688 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 4498 of file driver_bme688.c.

◆ bme688_init()

uint8_t bme688_init ( bme688_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a bme688 handle structure
Returns
status code
  • 0 success
  • 1 iic or spi initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 id is error
  • 5 get nvm calibration failed
  • 6 read calibration failed
Note
none

Definition at line 792 of file driver_bme688.c.

◆ bme688_parallel_config()

uint8_t bme688_parallel_config ( bme688_handle_t * handle,
bme688_parallel_config_t * config )

parallel config

Parameters
[in]*handlepointer to a bme688 handle structure
[in]*configpointer to a bme688 parallel config structure
Returns
status code
  • 0 success
  • 1 parallel config failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 config is invalid
  • 5 profile_len > 10
  • 6 ms >= 0x0783
Note
none

Definition at line 4337 of file driver_bme688.c.

◆ bme688_parallel_progress()

uint8_t bme688_parallel_progress ( bme688_handle_t * handle)

parallel progress

Parameters
[in]*handlepointer to a bme688 handle structure
Returns
status code
  • 0 success
  • 1 parallel progress failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 not parallel mode
  • 5 not ready
  • 6 index is invalid
  • 7 compensate failed
  • 8 gas is invalid
  • 9 heater is not stable
  • 10 sequence is lost
Note
none

Definition at line 3824 of file driver_bme688.c.

◆ bme688_parallel_reset()

uint8_t bme688_parallel_reset ( bme688_handle_t * handle)

parallel reset

Parameters
[in]*handlepointer to a bme688 handle structure
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 4300 of file driver_bme688.c.

◆ bme688_read()

uint8_t bme688_read ( bme688_handle_t * handle,
bme688_section_t section,
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

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*temperature_rawpointer to a raw temperature buffer
[out]*temperature_cpointer to a converted temperature buffer
[out]*pressure_rawpointer to a raw pressure buffer
[out]*pressure_papointer to a converted pressure buffer
[out]*humidity_rawpointer to a raw humidity buffer
[out]*humidity_percentagepointer to a converted humidity percentage buffer
[out]*adc_rawpointer to an adc raw buffer
[out]*adc_rangepointer to an adc range buffer
[out]*ohmspointer to an ohms buffer
[out]*indexpointer to a heater index buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 compensate failed
  • 5 read timeout
  • 6 gas is invalid
  • 7 heater is not stable
Note
none

Definition at line 3550 of file driver_bme688.c.

◆ bme688_read_gas_resistance()

uint8_t bme688_read_gas_resistance ( bme688_handle_t * handle,
bme688_section_t section,
uint16_t * adc_raw,
uint8_t * adc_range,
float * ohms,
uint8_t * index )

read the gas resistance

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*adc_rawpointer to an adc raw buffer
[out]*adc_rangepointer to an adc range buffer
[out]*ohmspointer to an ohms buffer
[out]*indexpointer to a heater index buffer
Returns
status code
  • 0 success
  • 1 gas resistance read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 compensate gas resistance failed
  • 5 read timeout
  • 6 gas is invalid
  • 7 heater is not stable
Note
none

Definition at line 2684 of file driver_bme688.c.

◆ bme688_read_humidity()

uint8_t bme688_read_humidity ( bme688_handle_t * handle,
bme688_section_t section,
uint32_t * humidity_raw,
float * humidity_percentage )

read the humidity data

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*humidity_rawpointer to a raw humidity buffer
[out]*humidity_percentagepointer to a converted humidity percentage buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 compensate humidity failed
  • 5 read timeout
Note
none

Definition at line 3187 of file driver_bme688.c.

◆ bme688_read_pressure()

uint8_t bme688_read_pressure ( bme688_handle_t * handle,
bme688_section_t section,
uint32_t * pressure_raw,
float * pressure_pa )

read the pressure data

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*pressure_rawpointer to a raw pressure buffer
[out]*pressure_papointer to a converted pressure buffer
Returns
status code
  • 0 success
  • 1 pressure read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 compensate pressure failed
  • 5 read timeout
Note
none

Definition at line 2873 of file driver_bme688.c.

◆ bme688_read_temperature()

uint8_t bme688_read_temperature ( bme688_handle_t * handle,
bme688_section_t section,
uint32_t * temperature_raw,
float * temperature_c )

read the temperature data

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*temperature_rawpointer to a raw temperature buffer
[out]*temperature_cpointer to a converted temperature buffer
Returns
status code
  • 0 success
  • 1 temperature read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 compensate temperature failed
  • 5 read timeout
Note
none

Definition at line 3041 of file driver_bme688.c.

◆ bme688_read_temperature_pressure_humidity()

uint8_t bme688_read_temperature_pressure_humidity ( bme688_handle_t * handle,
bme688_section_t section,
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

Parameters
[in]*handlepointer to a bme688 handle structure
[in]sectionset section
[out]*temperature_rawpointer to a raw temperature buffer
[out]*temperature_cpointer to a converted temperature buffer
[out]*pressure_rawpointer to a raw pressure buffer
[out]*pressure_papointer to a converted pressure buffer
[out]*humidity_rawpointer to a raw humidity buffer
[out]*humidity_percentagepointer to a converted humidity percentage buffer
Returns
status code
  • 0 success
  • 1 read failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 compensate failed
  • 5 read timeout
Note
none

Definition at line 3355 of file driver_bme688.c.

◆ bme688_resistance_heater_convert_to_register()

uint8_t bme688_resistance_heater_convert_to_register ( bme688_handle_t * handle,
float degree_celsius,
uint8_t * reg )

convert the resistance heater to the register raw data

Parameters
[in]*handlepointer to a bme688 handle structure
[in]degree_celsiusinput degree celsius
[out]*regpointer to a register raw buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2152 of file driver_bme688.c.

◆ bme688_set_addr_pin()

uint8_t bme688_set_addr_pin ( bme688_handle_t * handle,
bme688_address_t addr_pin )

set the iic address pin

Parameters
[in]*handlepointer to a bme688 handle structure
[in]addr_piniic address pin
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 704 of file driver_bme688.c.

◆ bme688_set_filter()

uint8_t bme688_set_filter ( bme688_handle_t * handle,
bme688_filter_t filter )

set filter

Parameters
[in]*handlepointer to a bme688 handle structure
[in]filterinput filter
Returns
status code
  • 0 success
  • 1 set filter failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1759 of file driver_bme688.c.

◆ bme688_set_gas_wait()

uint8_t bme688_set_gas_wait ( bme688_handle_t * handle,
uint8_t index,
uint8_t reg )

set gas wait

Parameters
[in]*handlepointer to a bme688 handle structure
[in]indexinput index
[in]reginput register
Returns
status code
  • 0 success
  • 1 set gas wait failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 index > 9
Note
none

Definition at line 1188 of file driver_bme688.c.

◆ bme688_set_gas_wait_shared()

uint8_t bme688_set_gas_wait_shared ( bme688_handle_t * handle,
uint8_t reg )

set gas wait shared

Parameters
[in]*handlepointer to a bme688 handle structure
[in]reginput register
Returns
status code
  • 0 success
  • 1 set gas wait shared failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1269 of file driver_bme688.c.

◆ bme688_set_heater_off()

uint8_t bme688_set_heater_off ( bme688_handle_t * handle,
bme688_bool_t enable )

enable or disable heater off

Parameters
[in]*handlepointer to a bme688 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set heater off failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1913 of file driver_bme688.c.

◆ bme688_set_heater_profile()

uint8_t bme688_set_heater_profile ( bme688_handle_t * handle,
bme688_heater_profile_t profile )

set heater profile

Parameters
[in]*handlepointer to a bme688 handle structure
[in]profileheater profile
Returns
status code
  • 0 success
  • 1 set heater profile failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2067 of file driver_bme688.c.

◆ bme688_set_humidity_oversampling()

uint8_t bme688_set_humidity_oversampling ( bme688_handle_t * handle,
bme688_oversampling_t oversampling )

set humidity oversampling

Parameters
[in]*handlepointer to a bme688 handle structure
[in]oversamplinghumidity oversampling
Returns
status code
  • 0 success
  • 1 set humidity oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1451 of file driver_bme688.c.

◆ bme688_set_idac_heater()

uint8_t bme688_set_idac_heater ( bme688_handle_t * handle,
uint8_t index,
uint8_t reg )

set idac heater

Parameters
[in]*handlepointer to a bme688 handle structure
[in]indexinput index
[in]reginput register
Returns
status code
  • 0 success
  • 1 set idac heater failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 index > 9
Note
none

Definition at line 1022 of file driver_bme688.c.

◆ bme688_set_interface()

uint8_t bme688_set_interface ( bme688_handle_t * handle,
bme688_interface_t interface )

set the interface

Parameters
[in]*handlepointer to a bme688 handle structure
[in]interfacechip interface
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 746 of file driver_bme688.c.

◆ bme688_set_mode()

uint8_t bme688_set_mode ( bme688_handle_t * handle,
bme688_mode_t mode )

set mode

Parameters
[in]*handlepointer to a bme688 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1682 of file driver_bme688.c.

◆ bme688_set_pressure_oversampling()

uint8_t bme688_set_pressure_oversampling ( bme688_handle_t * handle,
bme688_oversampling_t oversampling )

set pressure oversampling

Parameters
[in]*handlepointer to a bme688 handle structure
[in]oversamplingpressure oversampling
Returns
status code
  • 0 success
  • 1 set pressure oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1605 of file driver_bme688.c.

◆ bme688_set_resistance_heater()

uint8_t bme688_set_resistance_heater ( bme688_handle_t * handle,
uint8_t index,
uint8_t reg )

set resistance heater

Parameters
[in]*handlepointer to a bme688 handle structure
[in]indexinput index
[in]reginput register
Returns
status code
  • 0 success
  • 1 set resistance heater failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 index > 9
Note
none

Definition at line 1105 of file driver_bme688.c.

◆ bme688_set_run_gas()

uint8_t bme688_set_run_gas ( bme688_handle_t * handle,
bme688_bool_t enable )

enable or disable run gas

Parameters
[in]*handlepointer to a bme688 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set run gas failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1990 of file driver_bme688.c.

◆ bme688_set_spi_wire()

uint8_t bme688_set_spi_wire ( bme688_handle_t * handle,
bme688_spi_wire_t spi )

set spi wire

Parameters
[in]*handlepointer to a bme688 handle structure
[in]spispi wire
Returns
status code
  • 0 success
  • 1 set spi wire failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1836 of file driver_bme688.c.

◆ bme688_set_spi_wire_3_data_interrupt()

uint8_t bme688_set_spi_wire_3_data_interrupt ( bme688_handle_t * handle,
bme688_bool_t enable )

enable or disable spi wire3 data interrupt

Parameters
[in]*handlepointer to a bme688 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set spi wire 3 data interrupt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1374 of file driver_bme688.c.

◆ bme688_set_temperature_oversampling()

uint8_t bme688_set_temperature_oversampling ( bme688_handle_t * handle,
bme688_oversampling_t oversampling )

set temperature oversampling

Parameters
[in]*handlepointer to a bme688 handle structure
[in]oversamplingtemperature oversampling
Returns
status code
  • 0 success
  • 1 set temperature oversampling failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1528 of file driver_bme688.c.

◆ bme688_soft_reset()

uint8_t bme688_soft_reset ( bme688_handle_t * handle)

soft reset

Parameters
[in]*handlepointer to a bme688 handle structure
Returns
status code
  • 0 success
  • 1 soft reset failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1338 of file driver_bme688.c.