![]() |
Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
|
Sensor driver for BMP3 sensor. More...
#include <stdint.h>#include <stddef.h>

Go to the source code of this file.
Data Structures | |
| struct | bmp3_reg_calib_data |
| Register Trim Variables. More... | |
| struct | bmp3_adv_settings |
| bmp3 advance settings More... | |
| struct | bmp3_odr_filter_settings |
| bmp3 odr and filter settings More... | |
| struct | bmp3_sens_status |
| bmp3 sensor status flags More... | |
| struct | bmp3_int_status |
| bmp3 interrupt status flags More... | |
| struct | bmp3_err_status |
| bmp3 error status flags More... | |
| struct | bmp3_status |
| bmp3 status flags More... | |
| struct | bmp3_int_ctrl_settings |
| bmp3 interrupt pin settings More... | |
| struct | bmp3_settings |
| bmp3 device settings More... | |
| struct | bmp3_fifo_data |
| bmp3 fifo frame More... | |
| struct | bmp3_fifo_settings |
| bmp3 fifo configuration More... | |
| struct | bmp3_quantized_calib_data |
| Quantized Trim Variables. More... | |
| struct | bmp3_calib_data |
| Calibration data. More... | |
| struct | bmp3_data |
| bmp3 sensor structure which comprises of temperature and pressure data. More... | |
| struct | bmp3_uncomp_data |
| bmp3 sensor structure which comprises of un-compensated temperature and pressure data. More... | |
| struct | bmp3_dev |
| bmp3 device structure More... | |
Macros related to size | |
| #define | BMP3_LEN_CALIB_DATA UINT8_C(21) |
| #define | BMP3_LEN_P_AND_T_HEADER_DATA UINT8_C(7) |
| #define | BMP3_LEN_P_OR_T_HEADER_DATA UINT8_C(4) |
| #define | BMP3_LEN_P_T_DATA UINT8_C(6) |
| #define | BMP3_LEN_GEN_SETT UINT8_C(7) |
| #define | BMP3_LEN_P_DATA UINT8_C(3) |
| #define | BMP3_LEN_T_DATA UINT8_C(3) |
| #define | BMP3_LEN_SENSOR_TIME UINT8_C(3) |
| #define | BMP3_FIFO_MAX_FRAMES UINT8_C(73) |
| #define | BMP3_POWER_CNTL UINT16_C(0x0006) |
| #define | BMP3_ODR_FILTER UINT16_C(0x00F0) |
| #define | BMP3_INT_CTRL UINT16_C(0x0708) |
| #define | BMP3_ADV_SETT UINT16_C(0x1800) |
| #define | BMP3_FIFO_CONFIG_1 UINT16_C(0x003E) |
| #define | BMP3_FIFO_CONFIG_2 UINT16_C(0x00C0) |
| #define | BMP3_FIFO_INT_CTRL UINT16_C(0x0300) |
| #define | BMP3_FIFO_TEMP_PRESS_FRAME UINT8_C(0x94) |
| #define | BMP3_FIFO_TEMP_FRAME UINT8_C(0x90) |
| #define | BMP3_FIFO_PRESS_FRAME UINT8_C(0x84) |
| #define | BMP3_FIFO_TIME_FRAME UINT8_C(0xA0) |
| #define | BMP3_FIFO_ERROR_FRAME UINT8_C(0x44) |
| #define | BMP3_FIFO_CONFIG_CHANGE UINT8_C(0x48) |
| #define | BMP3_FIFO_EMPTY_FRAME UINT8_C(0x80) |
| #define | BMP3_SENSORTIME_OVERHEAD_BYTES UINT8_C(20) |
| enum | bmp3_intf { BMP3_SPI_INTF , BMP3_I2C_INTF } |
| Interface selection Enums. More... | |
| typedef BMP3_INTF_RET_TYPE(* | bmp3_read_fptr_t) (uint8_t reg_addr, uint8_t *read_data, uint32_t len, void *intf_ptr) |
| Type definitions. | |
| typedef BMP3_INTF_RET_TYPE(* | bmp3_write_fptr_t) (uint8_t reg_addr, const uint8_t *read_data, uint32_t len, void *intf_ptr) |
| Bus communication function pointer which should be mapped to the platform specific write functions of the user. | |
| typedef void(* | bmp3_delay_us_fptr_t) (uint32_t period, void *intf_ptr) |
| Delay function pointer which should be mapped to delay function of the user. | |
Sensor driver for BMP3 sensor.
Copyright (c) 2022 Bosch Sensortec GmbH. All rights reserved.
BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
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 bmp3_defs.h.
| #define BMP390_CHIP_ID UINT8_C(0x60) |
Definition at line 133 of file bmp3_defs.h.
| #define BMP3_ADC_CONV_TIME UINT16_C(2000) |
Definition at line 142 of file bmp3_defs.h.
| #define BMP3_ADDR_I2C_PRIM UINT8_C(0x76) |
Definition at line 128 of file bmp3_defs.h.
| #define BMP3_ADDR_I2C_SEC UINT8_C(0x77) |
Definition at line 129 of file bmp3_defs.h.
| #define BMP3_ADV_SETT UINT16_C(0x1800) |
Advance settings
Definition at line 459 of file bmp3_defs.h.
| #define BMP3_CHIP_ID UINT8_C(0x50) |
Definition at line 132 of file bmp3_defs.h.
| #define BMP3_CMD_RDY UINT8_C(0x10) |
Definition at line 171 of file bmp3_defs.h.
| #define BMP3_CONCAT_BYTES | ( | msb, | |
| lsb | |||
| ) | (((uint16_t)msb << 8) | (uint16_t)lsb) |
Definition at line 418 of file bmp3_defs.h.
| #define BMP3_DISABLE UINT8_C(0x00) |
Definition at line 183 of file bmp3_defs.h.
| #define BMP3_DRDY_PRESS UINT8_C(0x20) |
Definition at line 172 of file bmp3_defs.h.
| #define BMP3_DRDY_TEMP UINT8_C(0x40) |
Definition at line 173 of file bmp3_defs.h.
| #define BMP3_E_CMD_EXEC_FAILED INT8_C(-4) |
Definition at line 264 of file bmp3_defs.h.
| #define BMP3_E_COMM_FAIL INT8_C(-2) |
Definition at line 262 of file bmp3_defs.h.
| #define BMP3_E_CONFIGURATION_ERR INT8_C(-5) |
Definition at line 265 of file bmp3_defs.h.
| #define BMP3_E_DEV_NOT_FOUND INT8_C(-7) |
Definition at line 267 of file bmp3_defs.h.
| #define BMP3_E_FIFO_WATERMARK_NOT_REACHED INT8_C(-8) |
Definition at line 268 of file bmp3_defs.h.
| #define BMP3_E_INVALID_LEN INT8_C(-6) |
Definition at line 266 of file bmp3_defs.h.
| #define BMP3_E_INVALID_ODR_OSR_SETTINGS INT8_C(-3) |
Definition at line 263 of file bmp3_defs.h.
| #define BMP3_E_NULL_PTR INT8_C(-1) |
Definition at line 261 of file bmp3_defs.h.
| #define BMP3_ENABLE UINT8_C(0x01) |
Definition at line 182 of file bmp3_defs.h.
| #define BMP3_ERR_CMD UINT8_C(0x02) |
Definition at line 167 of file bmp3_defs.h.
| #define BMP3_ERR_CMD_MSK UINT8_C(0x02) |
Definition at line 330 of file bmp3_defs.h.
| #define BMP3_ERR_CMD_POS UINT8_C(0x01) |
Definition at line 331 of file bmp3_defs.h.
| #define BMP3_ERR_CONF UINT8_C(0x04) |
Definition at line 168 of file bmp3_defs.h.
| #define BMP3_ERR_CONF_MSK UINT8_C(0x04) |
Definition at line 333 of file bmp3_defs.h.
| #define BMP3_ERR_CONF_POS UINT8_C(0x02) |
Definition at line 334 of file bmp3_defs.h.
| #define BMP3_ERR_FATAL UINT8_C(0x01) |
Definition at line 166 of file bmp3_defs.h.
| #define BMP3_ERR_FATAL_MSK UINT8_C(0x01) |
Definition at line 328 of file bmp3_defs.h.
| #define BMP3_FIFO_CONFIG_1 UINT16_C(0x003E) |
FIFO settings
Mask for fifo_mode, fifo_stop_on_full, fifo_time_en, fifo_press_en and fifo_temp_en settings
Definition at line 465 of file bmp3_defs.h.
| #define BMP3_FIFO_CONFIG_2 UINT16_C(0x00C0) |
Mask for fifo_sub_sampling and data_select settings
Definition at line 468 of file bmp3_defs.h.
| #define BMP3_FIFO_CONFIG_CHANGE UINT8_C(0x48) |
FIFO configuration change header frame
Definition at line 490 of file bmp3_defs.h.
| #define BMP3_FIFO_DOWN_SAMPLING_MSK UINT8_C(0x07) |
Definition at line 380 of file bmp3_defs.h.
| #define BMP3_FIFO_EMPTY_FRAME UINT8_C(0x80) |
FIFO empty frame
Definition at line 493 of file bmp3_defs.h.
| #define BMP3_FIFO_ERROR_FRAME UINT8_C(0x44) |
FIFO error header frame
Definition at line 487 of file bmp3_defs.h.
| #define BMP3_FIFO_FILTER_EN_MSK UINT8_C(0x18) |
Definition at line 377 of file bmp3_defs.h.
| #define BMP3_FIFO_FILTER_EN_POS UINT8_C(0x03) |
Definition at line 378 of file bmp3_defs.h.
| #define BMP3_FIFO_FLUSH UINT8_C(0xB0) |
Definition at line 255 of file bmp3_defs.h.
| #define BMP3_FIFO_FULL_EN_MSK UINT8_C(0x10) |
Definition at line 385 of file bmp3_defs.h.
| #define BMP3_FIFO_FULL_EN_POS UINT8_C(0x04) |
Definition at line 386 of file bmp3_defs.h.
| #define BMP3_FIFO_FWTM_EN_MSK UINT8_C(0x08) |
Definition at line 382 of file bmp3_defs.h.
| #define BMP3_FIFO_FWTM_EN_POS UINT8_C(0x03) |
Definition at line 383 of file bmp3_defs.h.
| #define BMP3_FIFO_INT_CTRL UINT16_C(0x0300) |
Mask for fwtm_en and ffull_en settings
Definition at line 471 of file bmp3_defs.h.
| #define BMP3_FIFO_MAX_FRAMES UINT8_C(73) |
Definition at line 447 of file bmp3_defs.h.
| #define BMP3_FIFO_MODE_MSK UINT8_C(0x01) |
Definition at line 363 of file bmp3_defs.h.
| #define BMP3_FIFO_NO_SUBSAMPLING UINT8_C(0x00) |
Definition at line 204 of file bmp3_defs.h.
| #define BMP3_FIFO_PRESS_EN_MSK UINT8_C(0x08) |
Definition at line 371 of file bmp3_defs.h.
| #define BMP3_FIFO_PRESS_EN_POS UINT8_C(0x03) |
Definition at line 372 of file bmp3_defs.h.
| #define BMP3_FIFO_PRESS_FRAME UINT8_C(0x84) |
FIFO pressure header frame
Definition at line 481 of file bmp3_defs.h.
| #define BMP3_FIFO_STOP_ON_FULL_MSK UINT8_C(0x02) |
Definition at line 365 of file bmp3_defs.h.
| #define BMP3_FIFO_STOP_ON_FULL_POS UINT8_C(0x01) |
Definition at line 366 of file bmp3_defs.h.
| #define BMP3_FIFO_SUBSAMPLING_128X UINT8_C(0x07) |
Definition at line 211 of file bmp3_defs.h.
| #define BMP3_FIFO_SUBSAMPLING_16X UINT8_C(0x04) |
Definition at line 208 of file bmp3_defs.h.
| #define BMP3_FIFO_SUBSAMPLING_2X UINT8_C(0x01) |
Definition at line 205 of file bmp3_defs.h.
| #define BMP3_FIFO_SUBSAMPLING_32X UINT8_C(0x05) |
Definition at line 209 of file bmp3_defs.h.
| #define BMP3_FIFO_SUBSAMPLING_4X UINT8_C(0x02) |
Definition at line 206 of file bmp3_defs.h.
| #define BMP3_FIFO_SUBSAMPLING_64X UINT8_C(0x06) |
Definition at line 210 of file bmp3_defs.h.
| #define BMP3_FIFO_SUBSAMPLING_8X UINT8_C(0x03) |
Definition at line 207 of file bmp3_defs.h.
| #define BMP3_FIFO_TEMP_EN_MSK UINT8_C(0x10) |
Definition at line 374 of file bmp3_defs.h.
| #define BMP3_FIFO_TEMP_EN_POS UINT8_C(0x04) |
Definition at line 375 of file bmp3_defs.h.
| #define BMP3_FIFO_TEMP_FRAME UINT8_C(0x90) |
FIFO temperature header frame
Definition at line 478 of file bmp3_defs.h.
| #define BMP3_FIFO_TEMP_PRESS_FRAME UINT8_C(0x94) |
| #define BMP3_FIFO_TIME_EN_MSK UINT8_C(0x04) |
Definition at line 368 of file bmp3_defs.h.
| #define BMP3_FIFO_TIME_EN_POS UINT8_C(0x02) |
Definition at line 369 of file bmp3_defs.h.
| #define BMP3_FIFO_TIME_FRAME UINT8_C(0xA0) |
FIFO time header frame
Definition at line 484 of file bmp3_defs.h.
| #define BMP3_FLOAT_COMPENSATION |
Definition at line 106 of file bmp3_defs.h.
| #define BMP3_GET_BITS | ( | reg_data, | |
| bitname | |||
| ) |
Definition at line 429 of file bmp3_defs.h.
| #define BMP3_GET_BITS_POS_0 | ( | reg_data, | |
| bitname | |||
| ) | (reg_data & (bitname##_MSK)) |
Definition at line 433 of file bmp3_defs.h.
| #define BMP3_GET_LSB | ( | var | ) | (uint8_t)(var & BMP3_SET_LOW_BYTE) |
Definition at line 435 of file bmp3_defs.h.
| #define BMP3_GET_MSB | ( | var | ) | (uint8_t)((var & BMP3_SET_HIGH_BYTE) >> 8) |
Definition at line 436 of file bmp3_defs.h.
| #define BMP3_I2C_WDT_EN_MSK UINT8_C(0x02) |
Definition at line 399 of file bmp3_defs.h.
| #define BMP3_I2C_WDT_EN_POS UINT8_C(0x01) |
Definition at line 400 of file bmp3_defs.h.
| #define BMP3_I2C_WDT_LONG_40_MS UINT8_C(0x01) |
Definition at line 201 of file bmp3_defs.h.
| #define BMP3_I2C_WDT_SEL_MSK UINT8_C(0x04) |
Definition at line 402 of file bmp3_defs.h.
| #define BMP3_I2C_WDT_SEL_POS UINT8_C(0x02) |
Definition at line 403 of file bmp3_defs.h.
| #define BMP3_I2C_WDT_SHORT_1_25_MS UINT8_C(0x00) |
Definition at line 200 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_COEFF_1 UINT8_C(0x01) |
Definition at line 223 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_COEFF_127 UINT8_C(0x07) |
Definition at line 229 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_COEFF_15 UINT8_C(0x04) |
Definition at line 226 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_COEFF_3 UINT8_C(0x02) |
Definition at line 224 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_COEFF_31 UINT8_C(0x05) |
Definition at line 227 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_COEFF_63 UINT8_C(0x06) |
Definition at line 228 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_COEFF_7 UINT8_C(0x03) |
Definition at line 225 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_DISABLE UINT8_C(0x00) |
Definition at line 222 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_MSK UINT8_C(0x0E) |
Definition at line 353 of file bmp3_defs.h.
| #define BMP3_IIR_FILTER_POS UINT8_C(0x01) |
Definition at line 354 of file bmp3_defs.h.
| #define BMP3_INT_CTRL UINT16_C(0x0708) |
Interrupt control settings
Definition at line 456 of file bmp3_defs.h.
| #define BMP3_INT_DRDY_EN_MSK UINT8_C(0x40) |
Definition at line 396 of file bmp3_defs.h.
| #define BMP3_INT_DRDY_EN_POS UINT8_C(0x06) |
Definition at line 397 of file bmp3_defs.h.
| #define BMP3_INT_LATCH_MSK UINT8_C(0x04) |
Definition at line 393 of file bmp3_defs.h.
| #define BMP3_INT_LATCH_POS UINT8_C(0x02) |
Definition at line 394 of file bmp3_defs.h.
| #define BMP3_INT_LEVEL_MSK UINT8_C(0x02) |
Definition at line 390 of file bmp3_defs.h.
| #define BMP3_INT_LEVEL_POS UINT8_C(0x01) |
Definition at line 391 of file bmp3_defs.h.
| #define BMP3_INT_OUTPUT_MODE_MSK UINT8_C(0x01) |
Definition at line 388 of file bmp3_defs.h.
| #define BMP3_INT_PIN_ACTIVE_HIGH UINT8_C(0x01) |
Definition at line 191 of file bmp3_defs.h.
| #define BMP3_INT_PIN_ACTIVE_LOW UINT8_C(0x00) |
Definition at line 192 of file bmp3_defs.h.
| #define BMP3_INT_PIN_LATCH UINT8_C(0x01) |
Definition at line 195 of file bmp3_defs.h.
| #define BMP3_INT_PIN_NON_LATCH UINT8_C(0x00) |
Definition at line 196 of file bmp3_defs.h.
| #define BMP3_INT_PIN_OPEN_DRAIN UINT8_C(0x01) |
Definition at line 187 of file bmp3_defs.h.
| #define BMP3_INT_PIN_PUSH_PULL UINT8_C(0x00) |
Definition at line 188 of file bmp3_defs.h.
| #define BMP3_INT_STATUS_DRDY_MSK UINT8_C(0x08) |
Definition at line 410 of file bmp3_defs.h.
| #define BMP3_INT_STATUS_DRDY_POS UINT8_C(0x03) |
Definition at line 411 of file bmp3_defs.h.
| #define BMP3_INT_STATUS_FFULL_MSK UINT8_C(0x02) |
Definition at line 407 of file bmp3_defs.h.
| #define BMP3_INT_STATUS_FFULL_POS UINT8_C(0x01) |
Definition at line 408 of file bmp3_defs.h.
| #define BMP3_INT_STATUS_FWTM_MSK UINT8_C(0x01) |
Definition at line 405 of file bmp3_defs.h.
| #define BMP3_INTF_RET_SUCCESS INT8_C(0) |
The last error code from read/write interface is stored in the device structure as intf_rslt.
Definition at line 124 of file bmp3_defs.h.
| #define BMP3_INTF_RET_TYPE int8_t |
BMP3_INTF_RET_TYPE is the read/write interface return type which can be overwritten by the build system.
Definition at line 117 of file bmp3_defs.h.
| #define BMP3_LEN_CALIB_DATA UINT8_C(21) |
Definition at line 439 of file bmp3_defs.h.
| #define BMP3_LEN_GEN_SETT UINT8_C(7) |
Definition at line 443 of file bmp3_defs.h.
| #define BMP3_LEN_P_AND_T_HEADER_DATA UINT8_C(7) |
Definition at line 440 of file bmp3_defs.h.
| #define BMP3_LEN_P_DATA UINT8_C(3) |
Definition at line 444 of file bmp3_defs.h.
| #define BMP3_LEN_P_OR_T_HEADER_DATA UINT8_C(4) |
Definition at line 441 of file bmp3_defs.h.
| #define BMP3_LEN_P_T_DATA UINT8_C(6) |
Definition at line 442 of file bmp3_defs.h.
| #define BMP3_LEN_SENSOR_TIME UINT8_C(3) |
Definition at line 446 of file bmp3_defs.h.
| #define BMP3_LEN_T_DATA UINT8_C(3) |
Definition at line 445 of file bmp3_defs.h.
| #define BMP3_MAX_PRES_DOUBLE 125000.0f |
Definition at line 325 of file bmp3_defs.h.
| #define BMP3_MAX_PRES_INT UINT64_C(12500000) |
Definition at line 323 of file bmp3_defs.h.
| #define BMP3_MAX_TEMP_DOUBLE 85.0f |
Definition at line 319 of file bmp3_defs.h.
| #define BMP3_MAX_TEMP_INT INT64_C(8500) |
Definition at line 317 of file bmp3_defs.h.
| #define BMP3_MIN_PRES_DOUBLE 30000.0f |
Definition at line 324 of file bmp3_defs.h.
| #define BMP3_MIN_PRES_INT UINT64_C(3000000) |
Definition at line 322 of file bmp3_defs.h.
| #define BMP3_MIN_TEMP_DOUBLE -40.0f |
Definition at line 318 of file bmp3_defs.h.
| #define BMP3_MIN_TEMP_INT INT64_C(-4000) |
Definition at line 316 of file bmp3_defs.h.
| #define BMP3_MODE_FORCED UINT8_C(0x01) |
Definition at line 177 of file bmp3_defs.h.
| #define BMP3_MODE_NORMAL UINT8_C(0x03) |
Definition at line 178 of file bmp3_defs.h.
| #define BMP3_MODE_SLEEP UINT8_C(0x00) |
Definition at line 176 of file bmp3_defs.h.
| #define BMP3_NO_OVERSAMPLING UINT8_C(0x00) |
Definition at line 214 of file bmp3_defs.h.
| #define BMP3_ODR_0_001_HZ UINT8_C(0x11) |
Definition at line 249 of file bmp3_defs.h.
| #define BMP3_ODR_0_003_HZ UINT8_C(0x10) |
Definition at line 248 of file bmp3_defs.h.
| #define BMP3_ODR_0_006_HZ UINT8_C(0x0F) |
Definition at line 247 of file bmp3_defs.h.
| #define BMP3_ODR_0_01_HZ UINT8_C(0x0E) |
Definition at line 246 of file bmp3_defs.h.
| #define BMP3_ODR_0_02_HZ UINT8_C(0x0D) |
Definition at line 245 of file bmp3_defs.h.
| #define BMP3_ODR_0_05_HZ UINT8_C(0x0C) |
Definition at line 244 of file bmp3_defs.h.
| #define BMP3_ODR_0_1_HZ UINT8_C(0x0B) |
Definition at line 243 of file bmp3_defs.h.
| #define BMP3_ODR_0_2_HZ UINT8_C(0x0A) |
Definition at line 242 of file bmp3_defs.h.
| #define BMP3_ODR_0_39_HZ UINT8_C(0x09) |
Definition at line 241 of file bmp3_defs.h.
| #define BMP3_ODR_0_78_HZ UINT8_C(0x08) |
Definition at line 240 of file bmp3_defs.h.
| #define BMP3_ODR_100_HZ UINT8_C(0x01) |
Definition at line 233 of file bmp3_defs.h.
| #define BMP3_ODR_12_5_HZ UINT8_C(0x04) |
Definition at line 236 of file bmp3_defs.h.
| #define BMP3_ODR_1_5_HZ UINT8_C(0x07) |
Definition at line 239 of file bmp3_defs.h.
| #define BMP3_ODR_200_HZ UINT8_C(0x00) |
Definition at line 232 of file bmp3_defs.h.
| #define BMP3_ODR_25_HZ UINT8_C(0x03) |
Definition at line 235 of file bmp3_defs.h.
| #define BMP3_ODR_3_1_HZ UINT8_C(0x06) |
Definition at line 238 of file bmp3_defs.h.
| #define BMP3_ODR_50_HZ UINT8_C(0x02) |
Definition at line 234 of file bmp3_defs.h.
| #define BMP3_ODR_6_25_HZ UINT8_C(0x05) |
Definition at line 237 of file bmp3_defs.h.
| #define BMP3_ODR_FILTER UINT16_C(0x00F0) |
Odr and filter settings
Definition at line 453 of file bmp3_defs.h.
| #define BMP3_ODR_MSK UINT8_C(0x1F) |
Definition at line 356 of file bmp3_defs.h.
| #define BMP3_OK INT8_C(0) |
Definition at line 258 of file bmp3_defs.h.
| #define BMP3_OP_MODE_MSK UINT8_C(0x30) |
Definition at line 345 of file bmp3_defs.h.
| #define BMP3_OP_MODE_POS UINT8_C(0x04) |
Definition at line 346 of file bmp3_defs.h.
| #define BMP3_OVERSAMPLING_16X UINT8_C(0x04) |
Definition at line 218 of file bmp3_defs.h.
| #define BMP3_OVERSAMPLING_2X UINT8_C(0x01) |
Definition at line 215 of file bmp3_defs.h.
| #define BMP3_OVERSAMPLING_32X UINT8_C(0x05) |
Definition at line 219 of file bmp3_defs.h.
| #define BMP3_OVERSAMPLING_4X UINT8_C(0x02) |
Definition at line 216 of file bmp3_defs.h.
| #define BMP3_OVERSAMPLING_8X UINT8_C(0x03) |
Definition at line 217 of file bmp3_defs.h.
| #define BMP3_POWER_CNTL UINT16_C(0x0006) |
Power control settings
Definition at line 450 of file bmp3_defs.h.
| #define BMP3_PRESS UINT8_C(1) |
Definition at line 311 of file bmp3_defs.h.
| #define BMP3_PRESS_EN_MSK UINT8_C(0x01) |
Definition at line 348 of file bmp3_defs.h.
| #define BMP3_PRESS_OS_MSK UINT8_C(0x07) |
Definition at line 358 of file bmp3_defs.h.
| #define BMP3_PRESS_TEMP UINT8_C(3) |
Definition at line 313 of file bmp3_defs.h.
| #define BMP3_REG_CALIB_DATA UINT8_C(0x31) |
Definition at line 162 of file bmp3_defs.h.
| #define BMP3_REG_CHIP_ID UINT8_C(0x00) |
Definition at line 145 of file bmp3_defs.h.
| #define BMP3_REG_CMD UINT8_C(0x7E) |
Definition at line 163 of file bmp3_defs.h.
| #define BMP3_REG_CONFIG UINT8_C(0x1F) |
Definition at line 161 of file bmp3_defs.h.
| #define BMP3_REG_DATA UINT8_C(0x04) |
Definition at line 148 of file bmp3_defs.h.
| #define BMP3_REG_ERR UINT8_C(0x02) |
Definition at line 146 of file bmp3_defs.h.
| #define BMP3_REG_EVENT UINT8_C(0x10) |
Definition at line 149 of file bmp3_defs.h.
| #define BMP3_REG_FIFO_CONFIG_1 UINT8_C(0x17) |
Definition at line 154 of file bmp3_defs.h.
| #define BMP3_REG_FIFO_CONFIG_2 UINT8_C(0x18) |
Definition at line 155 of file bmp3_defs.h.
| #define BMP3_REG_FIFO_DATA UINT8_C(0x14) |
Definition at line 152 of file bmp3_defs.h.
| #define BMP3_REG_FIFO_LENGTH UINT8_C(0x12) |
Definition at line 151 of file bmp3_defs.h.
| #define BMP3_REG_FIFO_WM UINT8_C(0x15) |
Definition at line 153 of file bmp3_defs.h.
| #define BMP3_REG_IF_CONF UINT8_C(0x1A) |
Definition at line 157 of file bmp3_defs.h.
| #define BMP3_REG_INT_CTRL UINT8_C(0x19) |
Definition at line 156 of file bmp3_defs.h.
| #define BMP3_REG_INT_STATUS UINT8_C(0x11) |
Definition at line 150 of file bmp3_defs.h.
| #define BMP3_REG_ODR UINT8_C(0x1D) |
Definition at line 160 of file bmp3_defs.h.
| #define BMP3_REG_OSR UINT8_C(0X1C) |
Definition at line 159 of file bmp3_defs.h.
| #define BMP3_REG_PWR_CTRL UINT8_C(0x1B) |
Definition at line 158 of file bmp3_defs.h.
| #define BMP3_REG_SENS_STATUS UINT8_C(0x03) |
Definition at line 147 of file bmp3_defs.h.
| #define BMP3_SEL_ALL UINT16_C(0x7FF) |
Definition at line 293 of file bmp3_defs.h.
| #define BMP3_SEL_DRDY_EN UINT16_C(1 << 3) |
Definition at line 283 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_DOWN_SAMPLING UINT16_C(1 << 6) |
Definition at line 303 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_FILTER_EN UINT16_C(1 << 7) |
Definition at line 304 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_FULL_EN UINT16_C(1 << 9) |
Definition at line 306 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_FWTM_EN UINT16_C(1 << 8) |
Definition at line 305 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_MODE UINT16_C(1 << 1) |
Definition at line 298 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_PRESS_EN UINT16_C(1 << 4) |
Definition at line 301 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_STOP_ON_FULL_EN UINT16_C(1 << 2) |
Definition at line 299 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_TEMP_EN UINT16_C(1 << 5) |
Definition at line 302 of file bmp3_defs.h.
| #define BMP3_SEL_FIFO_TIME_EN UINT16_C(1 << 3) |
Definition at line 300 of file bmp3_defs.h.
| #define BMP3_SEL_I2C_WDT UINT16_C(1 << 12) |
Definition at line 292 of file bmp3_defs.h.
| #define BMP3_SEL_I2C_WDT_EN UINT16_C(1 << 11) |
Definition at line 291 of file bmp3_defs.h.
| #define BMP3_SEL_IIR_FILTER UINT16_C(1 << 6) |
Definition at line 286 of file bmp3_defs.h.
| #define BMP3_SEL_LATCH UINT16_C(1 << 10) |
Definition at line 290 of file bmp3_defs.h.
| #define BMP3_SEL_LEVEL UINT16_C(1 << 9) |
Definition at line 289 of file bmp3_defs.h.
| #define BMP3_SEL_ODR UINT16_C(1 << 7) |
Definition at line 287 of file bmp3_defs.h.
| #define BMP3_SEL_OUTPUT_MODE UINT16_C(1 << 8) |
Definition at line 288 of file bmp3_defs.h.
| #define BMP3_SEL_PRESS_EN UINT16_C(1 << 1) |
Definition at line 281 of file bmp3_defs.h.
| #define BMP3_SEL_PRESS_OS UINT16_C(1 << 4) |
Definition at line 284 of file bmp3_defs.h.
| #define BMP3_SEL_TEMP_EN UINT16_C(1 << 2) |
Definition at line 282 of file bmp3_defs.h.
| #define BMP3_SEL_TEMP_OS UINT16_C(1 << 5) |
Definition at line 285 of file bmp3_defs.h.
| #define BMP3_SENSORTIME_OVERHEAD_BYTES UINT8_C(20) |
FIFO sensortime overhead byte count
Definition at line 496 of file bmp3_defs.h.
| #define BMP3_SET_BITS | ( | reg_data, | |
| bitname, | |||
| data | |||
| ) |
Definition at line 420 of file bmp3_defs.h.
| #define BMP3_SET_BITS_POS_0 | ( | reg_data, | |
| bitname, | |||
| data | |||
| ) |
Definition at line 425 of file bmp3_defs.h.
| #define BMP3_SET_HIGH_BYTE UINT16_C(0xFF00) |
Definition at line 415 of file bmp3_defs.h.
| #define BMP3_SET_LOW_BYTE UINT16_C(0x00FF) |
Definition at line 414 of file bmp3_defs.h.
| #define BMP3_SETTLE_TIME_PRESS UINT16_C(392) |
Definition at line 136 of file bmp3_defs.h.
| #define BMP3_SETTLE_TIME_TEMP UINT16_C(313) |
Definition at line 139 of file bmp3_defs.h.
| #define BMP3_SOFT_RESET UINT8_C(0xB6) |
Definition at line 252 of file bmp3_defs.h.
| #define BMP3_STATUS_CMD_RDY_MSK UINT8_C(0x10) |
Definition at line 336 of file bmp3_defs.h.
| #define BMP3_STATUS_CMD_RDY_POS UINT8_C(0x04) |
Definition at line 337 of file bmp3_defs.h.
| #define BMP3_STATUS_DRDY_PRESS_MSK UINT8_C(0x20) |
Definition at line 339 of file bmp3_defs.h.
| #define BMP3_STATUS_DRDY_PRESS_POS UINT8_C(0x05) |
Definition at line 340 of file bmp3_defs.h.
| #define BMP3_STATUS_DRDY_TEMP_MSK UINT8_C(0x40) |
Definition at line 342 of file bmp3_defs.h.
| #define BMP3_STATUS_DRDY_TEMP_POS UINT8_C(0x06) |
Definition at line 343 of file bmp3_defs.h.
| #define BMP3_TEMP UINT8_C(2) |
Definition at line 312 of file bmp3_defs.h.
| #define BMP3_TEMP_EN_MSK UINT8_C(0x02) |
Definition at line 350 of file bmp3_defs.h.
| #define BMP3_TEMP_EN_POS UINT8_C(0x01) |
Definition at line 351 of file bmp3_defs.h.
| #define BMP3_TEMP_OS_MSK UINT8_C(0x38) |
Definition at line 360 of file bmp3_defs.h.
| #define BMP3_TEMP_OS_POS UINT8_C(0x03) |
Definition at line 361 of file bmp3_defs.h.
| #define BMP3_W_INVALID_FIFO_REQ_FRAME_CNT INT8_C(2) |
Definition at line 272 of file bmp3_defs.h.
| #define BMP3_W_MAX_PRES INT8_C(6) |
Definition at line 276 of file bmp3_defs.h.
| #define BMP3_W_MAX_TEMP INT8_C(4) |
Definition at line 274 of file bmp3_defs.h.
| #define BMP3_W_MIN_PRES INT8_C(5) |
Definition at line 275 of file bmp3_defs.h.
| #define BMP3_W_MIN_TEMP INT8_C(3) |
Definition at line 273 of file bmp3_defs.h.
| #define BMP3_W_SENSOR_NOT_ENABLED INT8_C(1) |
Definition at line 271 of file bmp3_defs.h.
| #define FALSE UINT8_C(0) |
Definition at line 97 of file bmp3_defs.h.
| #define INT16_C | ( | x | ) | S16_C(x) |
Definition at line 68 of file bmp3_defs.h.
| #define INT32_C | ( | x | ) | S32_C(x) |
Definition at line 73 of file bmp3_defs.h.
| #define INT64_C | ( | x | ) | S64_C(x) |
Definition at line 78 of file bmp3_defs.h.
| #define INT8_C | ( | x | ) | S8_C(x) |
CPP guard
Definition at line 63 of file bmp3_defs.h.
| #define NULL ((void *) 0) |
Definition at line 88 of file bmp3_defs.h.
| #define TRUE UINT8_C(1) |
Definition at line 93 of file bmp3_defs.h.
| #define UINT16_C | ( | x | ) | U16_C(x) |
Definition at line 69 of file bmp3_defs.h.
| #define UINT32_C | ( | x | ) | U32_C(x) |
Definition at line 74 of file bmp3_defs.h.
| #define UINT64_C | ( | x | ) | U64_C(x) |
Definition at line 79 of file bmp3_defs.h.
| #define UINT8_C | ( | x | ) | U8_C(x) |
Definition at line 64 of file bmp3_defs.h.
| typedef void(* bmp3_delay_us_fptr_t) (uint32_t period, void *intf_ptr) |
Delay function pointer which should be mapped to delay function of the user.
| [in] | period | : Delay in microseconds. |
| [in,out] | intf_ptr | : Void pointer that can enable the linking of descriptors for interface related call backs |
Definition at line 555 of file bmp3_defs.h.
| typedef BMP3_INTF_RET_TYPE(* bmp3_read_fptr_t) (uint8_t reg_addr, uint8_t *read_data, uint32_t len, void *intf_ptr) |
Type definitions.
Bus communication function pointer which should be mapped to the platform specific read functions of the user
| [in] | reg_addr | : 8bit register address of the sensor |
| [out] | reg_data | : Data from the specified address |
| [in] | length | : Length of the reg_data array |
| [in,out] | intf_ptr | : Void pointer that can enable the linking of descriptors for interface related callbacks |
| 0 | for Success |
| Non-zero | for Failure |
Definition at line 528 of file bmp3_defs.h.
| typedef BMP3_INTF_RET_TYPE(* bmp3_write_fptr_t) (uint8_t reg_addr, const uint8_t *read_data, uint32_t len, void *intf_ptr) |
Bus communication function pointer which should be mapped to the platform specific write functions of the user.
| [in] | reg_addr | : 8bit register address of the sensor |
| [out] | reg_data | : Data to the specified address |
| [in] | length | : Length of the reg_data array |
| [in,out] | intf_ptr | : Void pointer that can enable the linking of descriptors for interface related callbacks |
| 0 | for Success |
| Non-zero | for Failure |
Definition at line 543 of file bmp3_defs.h.
| enum bmp3_intf |
Interface selection Enums.
| Enumerator | |
|---|---|
| BMP3_SPI_INTF | SPI interface |
| BMP3_I2C_INTF | I2C interface |
Definition at line 503 of file bmp3_defs.h.