364 for (i = 0; i < times; i++)
366 uint32_t temperature_raw;
367 uint32_t pressure_raw;
373 (uint32_t *)&pressure_raw, (
float *)&pressure_pa) != 0)
407 for (i = 0; i < times; i++)
409 uint32_t temperature_raw;
410 uint32_t pressure_raw;
416 (uint32_t *)&pressure_raw, (
float *)&pressure_pa) != 0)
driver bmp390 read test header file
uint8_t bmp390_set_temperature_oversampling(bmp390_handle_t *handle, bmp390_oversampling_t oversampling)
set the temperature oversampling
uint8_t bmp390_set_pressure(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the pressure
uint8_t bmp390_set_mode(bmp390_handle_t *handle, bmp390_mode_t mode)
set the chip mode
bmp390_interface_t
bmp390 interface enumeration definition
uint8_t bmp390_set_temperature(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the temperature
uint8_t bmp390_info(bmp390_info_t *info)
get chip's information
uint8_t bmp390_set_addr_pin(bmp390_handle_t *handle, bmp390_address_t addr_pin)
set the iic address pin
uint8_t bmp390_read_temperature_pressure(bmp390_handle_t *handle, uint32_t *temperature_raw, float *temperature_c, uint32_t *pressure_raw, float *pressure_pa)
read the temperature and pressure
uint8_t bmp390_set_odr(bmp390_handle_t *handle, bmp390_odr_t odr)
set the output data rate
uint8_t bmp390_init(bmp390_handle_t *handle)
initialize the chip
uint8_t bmp390_set_iic_watchdog_timer(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the iic watchdog timer
uint8_t bmp390_set_pressure_oversampling(bmp390_handle_t *handle, bmp390_oversampling_t oversampling)
set the pressure oversampling
uint8_t bmp390_set_iic_watchdog_period(bmp390_handle_t *handle, bmp390_iic_watchdog_period_t period)
set the iic watchdog period
uint8_t bmp390_deinit(bmp390_handle_t *handle)
close the chip
uint8_t bmp390_set_interface(bmp390_handle_t *handle, bmp390_interface_t interface)
set the interface
bmp390_address_t
bmp390 address enumeration definition
uint8_t bmp390_set_spi_wire(bmp390_handle_t *handle, bmp390_spi_wire_t wire)
set the spi wire
uint8_t bmp390_set_filter_coefficient(bmp390_handle_t *handle, bmp390_filter_coefficient_t coefficient)
set the filter coefficient
struct bmp390_info_s bmp390_info_t
bmp390 information structure definition
struct bmp390_handle_s bmp390_handle_t
bmp390 handle structure definition
@ BMP390_INTERRUPT_ACTIVE_LEVEL_HIGHER
@ BMP390_FIFO_DATA_SOURCE_FILTERED
@ BMP390_OVERSAMPLING_x32
@ BMP390_INTERRUPT_PIN_TYPE_PUSH_PULL
@ BMP390_FILTER_COEFFICIENT_15
@ BMP390_IIC_WATCHDOG_PERIOD_40_MS
@ BMP390_MODE_FORCED_MODE
@ BMP390_MODE_NORMAL_MODE
uint8_t bmp390_set_fifo_data_source(bmp390_handle_t *handle, bmp390_fifo_data_source_t source)
set the fifo data source
uint8_t bmp390_set_fifo_pressure_on(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the fifo pressure on
uint8_t bmp390_set_fifo_temperature_on(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the fifo temperature on
uint8_t bmp390_set_fifo(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the fifo
uint8_t bmp390_set_fifo_sensortime_on(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the fifo sensor time on
uint8_t bmp390_set_fifo_subsampling(bmp390_handle_t *handle, uint8_t subsample)
set the fifo subsampling
uint8_t bmp390_set_fifo_stop_on_full(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the fifo stopping on full
uint8_t bmp390_set_fifo_watermark(bmp390_handle_t *handle, uint16_t watermark)
set the fifo watermark
uint8_t bmp390_interface_spi_init(void)
interface spi bus init
uint8_t bmp390_interface_spi_read(uint8_t reg, uint8_t *buf, uint16_t len)
interface spi bus read
void bmp390_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t bmp390_interface_iic_deinit(void)
interface iic bus deinit
uint8_t bmp390_interface_spi_write(uint8_t reg, uint8_t *buf, uint16_t len)
interface spi bus write
uint8_t bmp390_interface_iic_init(void)
interface iic bus init
uint8_t bmp390_interface_spi_deinit(void)
interface spi bus deinit
uint8_t bmp390_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
uint8_t bmp390_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
void bmp390_interface_receive_callback(uint8_t type)
interface receive callback
void bmp390_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t bmp390_set_interrupt_fifo_watermark(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the fifo watermark interrupt
uint8_t bmp390_set_interrupt_data_ready(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the data ready interrupt
uint8_t bmp390_set_latch_interrupt_pin_and_interrupt_status(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable latching interrupt pin and interrupt status
uint8_t bmp390_set_interrupt_pin_type(bmp390_handle_t *handle, bmp390_interrupt_pin_type_t pin_type)
set the interrupt pin type
uint8_t bmp390_set_interrupt_fifo_full(bmp390_handle_t *handle, bmp390_bool_t enable)
enable or disable the fifo full interrupt
uint8_t bmp390_set_interrupt_active_level(bmp390_handle_t *handle, bmp390_interrupt_active_level_t level)
set the interrupt active level
#define DRIVER_BMP390_LINK_SPI_INIT(HANDLE, FUC)
link spi_init function
#define DRIVER_BMP390_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_BMP390_LINK_RECEIVE_CALLBACK(HANDLE, FUC)
link receive_callback function
#define DRIVER_BMP390_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_BMP390_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function
#define DRIVER_BMP390_LINK_SPI_DEINIT(HANDLE, FUC)
link spi_deinit function
#define DRIVER_BMP390_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_BMP390_LINK_SPI_WRITE(HANDLE, FUC)
link spi_write function
#define DRIVER_BMP390_LINK_INIT(HANDLE, STRUCTURE)
initialize bmp390_handle_t structure
#define DRIVER_BMP390_LINK_SPI_READ(HANDLE, FUC)
link spi_read function
#define DRIVER_BMP390_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_BMP390_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
uint8_t bmp390_read_test(bmp390_interface_t interface, bmp390_address_t addr_pin, uint32_t times)
read test
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v