37#ifndef DRIVER_BME688_H
38#define DRIVER_BME688_H
207 uint8_t (*
iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
208 uint8_t (*
iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
211 uint8_t (*
spi_read)(uint8_t reg, uint8_t *buf, uint16_t len);
212 uint8_t (*
spi_write)(uint8_t reg, uint8_t *buf, uint16_t len);
288#define DRIVER_BME688_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
296#define DRIVER_BME688_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
304#define DRIVER_BME688_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
312#define DRIVER_BME688_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC
320#define DRIVER_BME688_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
328#define DRIVER_BME688_LINK_SPI_INIT(HANDLE, FUC) (HANDLE)->spi_init = FUC
336#define DRIVER_BME688_LINK_SPI_DEINIT(HANDLE, FUC) (HANDLE)->spi_deinit = FUC
344#define DRIVER_BME688_LINK_SPI_READ(HANDLE, FUC) (HANDLE)->spi_read = FUC
352#define DRIVER_BME688_LINK_SPI_WRITE(HANDLE, FUC) (HANDLE)->spi_write = FUC
360#define DRIVER_BME688_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
368#define DRIVER_BME688_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
376#define DRIVER_BME688_LINK_RECEIVE_CALLBACK(HANDLE, FUC) (HANDLE)->receive_callback = FUC
497 uint32_t *temperature_raw,
float *temperature_c,
498 uint32_t *pressure_raw,
float *pressure_pa,
499 uint32_t *humidity_raw,
float *humidity_percentage,
500 uint16_t *adc_raw, uint8_t *adc_range,
float *ohms, uint8_t *index);
522 uint32_t *temperature_raw,
float *temperature_c,
523 uint32_t *pressure_raw,
float *pressure_pa,
524 uint32_t *humidity_raw,
float *humidity_percentage);
uint8_t bme688_set_filter(bme688_handle_t *handle, bme688_filter_t filter)
set filter
uint8_t bme688_get_temperature_oversampling(bme688_handle_t *handle, bme688_oversampling_t *oversampling)
get temperature oversampling
uint8_t bme688_set_interface(bme688_handle_t *handle, bme688_interface_t interface)
set the interface
uint8_t bme688_soft_reset(bme688_handle_t *handle)
soft reset
bme688_mode_t
bme688 mode enumeration definition
uint8_t bme688_get_mode(bme688_handle_t *handle, bme688_mode_t *mode)
get mode
uint8_t bme688_get_humidity_oversampling(bme688_handle_t *handle, bme688_oversampling_t *oversampling)
get humidity oversampling
bme688_address_t
bme688 address enumeration definition
uint8_t bme688_set_addr_pin(bme688_handle_t *handle, bme688_address_t addr_pin)
set the iic address pin
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_get_measuring_status(bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
get measuring status
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_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
uint8_t bme688_set_heater_profile(bme688_handle_t *handle, bme688_heater_profile_t profile)
set heater profile
uint8_t bme688_get_run_gas(bme688_handle_t *handle, bme688_bool_t *enable)
get run gas status
uint8_t bme688_get_resistance_heater(bme688_handle_t *handle, uint8_t index, uint8_t *reg)
get resistance heater
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(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
bme688_heater_profile_t
bme688 heater profile enumeration definition
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_get_gas_measuring_status(bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
get gas measuring status
uint8_t bme688_set_temperature_oversampling(bme688_handle_t *handle, bme688_oversampling_t oversampling)
set temperature oversampling
uint8_t bme688_set_mode(bme688_handle_t *handle, bme688_mode_t mode)
set mode
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_parallel_config(bme688_handle_t *handle, bme688_parallel_config_t *config)
parallel config
uint8_t bme688_set_run_gas(bme688_handle_t *handle, bme688_bool_t enable)
enable or disable run gas
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_gas_measuring_index(bme688_handle_t *handle, bme688_section_t section, uint8_t *index)
get gas measuring index
uint8_t bme688_get_heater_off(bme688_handle_t *handle, bme688_bool_t *enable)
get heater off status
uint8_t bme688_set_spi_wire(bme688_handle_t *handle, bme688_spi_wire_t spi)
set spi wire
uint8_t bme688_get_filter(bme688_handle_t *handle, bme688_filter_t *filter)
get filter
bme688_status_t
bme688 status enumeration definition
uint8_t bme688_get_heater_profile(bme688_handle_t *handle, bme688_heater_profile_t *profile)
get heater profile
uint8_t bme688_set_idac_heater(bme688_handle_t *handle, uint8_t index, uint8_t reg)
set idac heater
bme688_filter_t
bme688 filter enumeration definition
uint8_t bme688_init(bme688_handle_t *handle)
initialize the chip
uint8_t bme688_info(bme688_info_t *info)
get chip's information
uint8_t bme688_get_idac_heater(bme688_handle_t *handle, uint8_t index, uint8_t *reg)
get idac heater
uint8_t bme688_get_interface(bme688_handle_t *handle, bme688_interface_t *interface)
get the interface
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_set_spi_wire_3_data_interrupt(bme688_handle_t *handle, bme688_bool_t enable)
enable or disable spi wire3 data interrupt
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
struct bme688_info_s bme688_info_t
bme688 information structure definition
uint8_t bme688_set_gas_wait(bme688_handle_t *handle, uint8_t index, uint8_t reg)
set gas wait
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_get_gas_wait_shared(bme688_handle_t *handle, uint8_t *reg)
get gas wait shared
uint8_t bme688_deinit(bme688_handle_t *handle)
close the chip
uint8_t bme688_set_resistance_heater(bme688_handle_t *handle, uint8_t index, uint8_t reg)
set resistance heater
uint8_t bme688_get_new_data_status(bme688_handle_t *handle, bme688_section_t section, bme688_bool_t *enable)
get new data status
bme688_section_t
bme688 section enumeration definition
uint8_t bme688_get_gas_wait(bme688_handle_t *handle, uint8_t index, uint8_t *reg)
get gas wait
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_read_humidity(bme688_handle_t *handle, bme688_section_t section, uint32_t *humidity_raw, float *humidity_percentage)
read the humidity data
uint8_t bme688_get_addr_pin(bme688_handle_t *handle, bme688_address_t *addr_pin)
get the iic address pin
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_set_heater_off(bme688_handle_t *handle, bme688_bool_t enable)
enable or disable heater off
bme688_bool_t
bme688 bool enumeration definition
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_get_pressure_oversampling(bme688_handle_t *handle, bme688_oversampling_t *oversampling)
get pressure oversampling
bme688_interface_t
bme688 interface enumeration definition
bme688_oversampling_t
bme688 oversampling enumeration definition
uint8_t bme688_set_gas_wait_shared(bme688_handle_t *handle, uint8_t reg)
set gas wait shared
struct bme688_parallel_data_s bme688_parallel_data_t
bme688 parallel data structure definition
uint8_t bme688_set_humidity_oversampling(bme688_handle_t *handle, bme688_oversampling_t oversampling)
set humidity oversampling
uint8_t bme688_set_pressure_oversampling(bme688_handle_t *handle, bme688_oversampling_t oversampling)
set pressure oversampling
struct bme688_parallel_config_s bme688_parallel_config_t
bme688 parallel config structure definition
uint8_t bme688_get_sub_measurement_index(bme688_handle_t *handle, bme688_section_t section, uint8_t *ind)
get sub measurement index
bme688_spi_wire_t
bme688 spi wire enumeration definition
uint8_t bme688_get_spi_wire(bme688_handle_t *handle, bme688_spi_wire_t *spi)
get spi wire
struct bme688_handle_s bme688_handle_t
bme688 handle structure definition
@ BME688_ADDRESS_ADO_HIGH
@ BME688_HEATER_PROFILE_FORCED_STEP_8_PARALLEL_STEP_0_7
@ BME688_HEATER_PROFILE_FORCED_STEP_2_PARALLEL_STEP_0_1
@ BME688_HEATER_PROFILE_FORCED_STEP_1_PARALLEL_STEP_0
@ BME688_HEATER_PROFILE_FORCED_STEP_6_PARALLEL_STEP_0_5
@ BME688_HEATER_PROFILE_FORCED_STEP_4_PARALLEL_STEP_0_3
@ BME688_HEATER_PROFILE_FORCED_STEP_7_PARALLEL_STEP_0_6
@ BME688_HEATER_PROFILE_FORCED_STEP_3_PARALLEL_STEP_0_2
@ BME688_HEATER_PROFILE_FORCED_NO_STEP_PARALLEL_STEP_0_9
@ BME688_HEATER_PROFILE_FORCED_STEP_5_PARALLEL_STEP_0_4
@ BME688_HEATER_PROFILE_FORCED_STEP_9_PARALLEL_STEP_0_8
@ BME688_HEATER_PROFILE_FORCED_STEP_0_PARALLEL_NO_STEP
@ BME688_STATUS_CHANNEL_DATA
@ BME688_STATUS_SEQUENCE_LOST
@ BME688_FILTER_COEFF_127
@ BME688_OVERSAMPLING_x16
@ BME688_OVERSAMPLING_SKIP
uint8_t bme688_get_reg(bme688_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
get the chip register
uint8_t bme688_set_reg(bme688_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
set the chip register
bme688 handle structure definition
uint8_t parallel_sequence_trigger[3]
uint8_t(* spi_init)(void)
void(* receive_callback)(uint8_t status, bme688_parallel_data_t *data, uint8_t len)
void(* delay_ms)(uint32_t ms)
uint8_t(* spi_read)(uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* spi_write)(uint8_t reg, uint8_t *buf, uint16_t len)
bme688_parallel_data_t parallel_data[10]
uint8_t parallel_data_len
void(* debug_print)(const char *const fmt,...)
uint8_t parallel_sequence_number[3]
uint8_t(* iic_init)(void)
uint8_t(* spi_deinit)(void)
uint16_t parallel_data_flag
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
bme688 information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v
bme688 parallel config structure definition
const float * heater_temp_prof
const uint8_t * heater_dur_prof
bme688 parallel data structure definition
float humidity_percentage