Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
bmp3_regs.h File Reference

Sensor driver for BMP280 sensor register definition. More...

#include "std.h"
+ Include dependency graph for bmp3_regs.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bmp3_reg_calib_data
 Register Trim Variables. More...
 
struct  bmp3_quantized_calib_data
 Quantized Trim Variables. More...
 

Macros

#define BMP3_I2C_ADDR   0xEC
 I2C addresses (8 bits) More...
 
#define BMP3_I2C_ADDR_ALT   0xEE
 
BMP3 chip identifier
#define BMP3_CHIP_ID   0x50
 
Register Address
#define BMP3_CHIP_ID_ADDR   0x00
 
#define BMP3_ERR_REG_ADDR   0x02
 
#define BMP3_SENS_STATUS_REG_ADDR   0x03
 
#define BMP3_DATA_ADDR   0x04
 
#define BMP3_EVENT_ADDR   0x10
 
#define BMP3_INT_STATUS_REG_ADDR   0x11
 
#define BMP3_FIFO_LENGTH_ADDR   0x12
 
#define BMP3_FIFO_DATA_ADDR   0x14
 
#define BMP3_FIFO_WM_ADDR   0x15
 
#define BMP3_FIFO_CONFIG_1_ADDR   0x17
 
#define BMP3_FIFO_CONFIG_2_ADDR   0x18
 
#define BMP3_INT_CTRL_ADDR   0x19
 
#define BMP3_IF_CONF_ADDR   0x1A
 
#define BMP3_PWR_CTRL_ADDR   0x1B
 
#define BMP3_OSR_ADDR   0X1C
 
#define BMP3_ODR_ADDR   0X1D
 
#define BMP3_CONFIG_ADDR   0X1F
 
#define BMP3_CALIB_DATA_ADDR   0x31
 
#define BMP3_CMD_ADDR   0x7E
 
Power mode macros
#define BMP3_SLEEP_MODE   0x00
 
#define BMP3_FORCED_MODE   0x01
 
#define BMP3_NORMAL_MODE   0x03
 
Over sampling macros
#define BMP3_NO_OVERSAMPLING   0x00
 
#define BMP3_OVERSAMPLING_2X   0x01
 
#define BMP3_OVERSAMPLING_4X   0x02
 
#define BMP3_OVERSAMPLING_8X   0x03
 
#define BMP3_OVERSAMPLING_16X   0x04
 
#define BMP3_OVERSAMPLING_32X   0x05
 
Filter setting macros
#define BMP3_IIR_FILTER_DISABLE   0x00
 
#define BMP3_IIR_FILTER_COEFF_1   0x01
 
#define BMP3_IIR_FILTER_COEFF_3   0x02
 
#define BMP3_IIR_FILTER_COEFF_7   0x03
 
#define BMP3_IIR_FILTER_COEFF_15   0x04
 
#define BMP3_IIR_FILTER_COEFF_31   0x05
 
#define BMP3_IIR_FILTER_COEFF_63   0x06
 
#define BMP3_IIR_FILTER_COEFF_127   0x07
 
Odr setting macros
#define BMP3_ODR_200_HZ   0x00
 
#define BMP3_ODR_100_HZ   0x01
 
#define BMP3_ODR_50_HZ   0x02
 
#define BMP3_ODR_25_HZ   0x03
 
#define BMP3_ODR_12_5_HZ   0x04
 
#define BMP3_ODR_6_25_HZ   0x05
 
#define BMP3_ODR_3_1_HZ   0x06
 
#define BMP3_ODR_1_5_HZ   0x07
 
#define BMP3_ODR_0_78_HZ   0x08
 
#define BMP3_ODR_0_39_HZ   0x09
 
#define BMP3_ODR_0_2_HZ   0x0A
 
#define BMP3_ODR_0_1_HZ   0x0B
 
#define BMP3_ODR_0_05_HZ   0x0C
 
#define BMP3_ODR_0_02_HZ   0x0D
 
#define BMP3_ODR_0_01_HZ   0x0E
 
#define BMP3_ODR_0_006_HZ   0x0F
 
#define BMP3_ODR_0_003_HZ   0x10
 
#define BMP3_ODR_0_001_HZ   0x11
 
Sensor component selection macros
#define BMP3_PRESS   0x01
 
#define BMP3_TEMP   0x02
 
#define BMP3_ALL   0x03
 
Macro to combine two 8 bit data's to form a 16 bit data
#define BMP3_CONCAT_BYTES(msb, lsb)   (((uint16_t)msb << 8) | (uint16_t)lsb)
 

Macros related to size

#define BMP3_CALIB_DATA_LEN   21
 
#define BMP3_P_AND_T_HEADER_DATA_LEN   7
 
#define BMP3_P_OR_T_HEADER_DATA_LEN   4
 
#define BMP3_P_T_DATA_LEN   6
 
#define BMP3_P_DATA_LEN   3
 
#define BMP3_T_DATA_LEN   3
 
#define BMP3_SENSOR_TIME_LEN   3
 
#define BMP3_DOUBLE_PRECISION_COMPENSATION   1
 Use double, single (float) or integer for temperature and pressure compensation. More...
 
#define BMP3_SINGLE_PRECISION_COMPENSATION   2
 
#define BMP3_INTEGER_COMPENSATION   3
 
#define BMP3_COMPENSATION   BMP3_SINGLE_PRECISION_COMPENSATION
 By default use single precision compensation. More...
 
enum  Bmp3Status { BMP3_STATUS_UNINIT , BMP3_STATUS_GET_CALIB , BMP3_STATUS_CONFIGURE , BMP3_STATUS_READ_DATA }
 Status enum. More...
 

Detailed Description

Sensor driver for BMP280 sensor register definition.

Sensor driver for BMP3 sensor register definition.

Modified for Paparazzi from SDP3 driver from BoshSensortec see https://github.com/BoschSensortec/BMP280-Sensor-API for original code and license

Modified for Paparazzi from SDP3 driver from BoshSensortec see https://github.com/BoschSensortec/BMP3-Sensor-API for original code and license

Definition in file bmp3_regs.h.


Data Structure Documentation

◆ bmp3_reg_calib_data

struct bmp3_reg_calib_data

Register Trim Variables.

Definition at line 151 of file bmp3_regs.h.

Data Fields
int16_t par_p1
int8_t par_p10
int8_t par_p11
int16_t par_p2
int8_t par_p3
int8_t par_p4
uint16_t par_p5
uint16_t par_p6
int8_t par_p7
int8_t par_p8
int16_t par_p9
uint16_t par_t1
uint16_t par_t2
int8_t par_t3
int64_t t_lin

◆ bmp3_quantized_calib_data

struct bmp3_quantized_calib_data

Quantized Trim Variables.

Definition at line 195 of file bmp3_regs.h.

Data Fields
float par_p1
float par_p10
float par_p11
float par_p2
float par_p3
float par_p4
float par_p5
float par_p6
float par_p7
float par_p8
float par_p9
float par_t1
float par_t2
float par_t3
float t_lin

Macro Definition Documentation

◆ BMP3_ALL

#define BMP3_ALL   0x03

Definition at line 110 of file bmp3_regs.h.

◆ BMP3_CALIB_DATA_ADDR

#define BMP3_CALIB_DATA_ADDR   0x31

Definition at line 61 of file bmp3_regs.h.

◆ BMP3_CALIB_DATA_LEN

#define BMP3_CALIB_DATA_LEN   21

Definition at line 116 of file bmp3_regs.h.

◆ BMP3_CHIP_ID

#define BMP3_CHIP_ID   0x50

Definition at line 41 of file bmp3_regs.h.

◆ BMP3_CHIP_ID_ADDR

#define BMP3_CHIP_ID_ADDR   0x00

Definition at line 44 of file bmp3_regs.h.

◆ BMP3_CMD_ADDR

#define BMP3_CMD_ADDR   0x7E

Definition at line 62 of file bmp3_regs.h.

◆ BMP3_COMPENSATION

#define BMP3_COMPENSATION   BMP3_SINGLE_PRECISION_COMPENSATION

By default use single precision compensation.

Definition at line 135 of file bmp3_regs.h.

◆ BMP3_CONCAT_BYTES

#define BMP3_CONCAT_BYTES (   msb,
  lsb 
)    (((uint16_t)msb << 8) | (uint16_t)lsb)

Definition at line 113 of file bmp3_regs.h.

◆ BMP3_CONFIG_ADDR

#define BMP3_CONFIG_ADDR   0X1F

Definition at line 60 of file bmp3_regs.h.

◆ BMP3_DATA_ADDR

#define BMP3_DATA_ADDR   0x04

Definition at line 47 of file bmp3_regs.h.

◆ BMP3_DOUBLE_PRECISION_COMPENSATION

#define BMP3_DOUBLE_PRECISION_COMPENSATION   1

Use double, single (float) or integer for temperature and pressure compensation.

Definition at line 127 of file bmp3_regs.h.

◆ BMP3_ERR_REG_ADDR

#define BMP3_ERR_REG_ADDR   0x02

Definition at line 45 of file bmp3_regs.h.

◆ BMP3_EVENT_ADDR

#define BMP3_EVENT_ADDR   0x10

Definition at line 48 of file bmp3_regs.h.

◆ BMP3_FIFO_CONFIG_1_ADDR

#define BMP3_FIFO_CONFIG_1_ADDR   0x17

Definition at line 53 of file bmp3_regs.h.

◆ BMP3_FIFO_CONFIG_2_ADDR

#define BMP3_FIFO_CONFIG_2_ADDR   0x18

Definition at line 54 of file bmp3_regs.h.

◆ BMP3_FIFO_DATA_ADDR

#define BMP3_FIFO_DATA_ADDR   0x14

Definition at line 51 of file bmp3_regs.h.

◆ BMP3_FIFO_LENGTH_ADDR

#define BMP3_FIFO_LENGTH_ADDR   0x12

Definition at line 50 of file bmp3_regs.h.

◆ BMP3_FIFO_WM_ADDR

#define BMP3_FIFO_WM_ADDR   0x15

Definition at line 52 of file bmp3_regs.h.

◆ BMP3_FORCED_MODE

#define BMP3_FORCED_MODE   0x01

Definition at line 66 of file bmp3_regs.h.

◆ BMP3_I2C_ADDR

#define BMP3_I2C_ADDR   0xEC

I2C addresses (8 bits)

Definition at line 37 of file bmp3_regs.h.

◆ BMP3_I2C_ADDR_ALT

#define BMP3_I2C_ADDR_ALT   0xEE

Definition at line 38 of file bmp3_regs.h.

◆ BMP3_IF_CONF_ADDR

#define BMP3_IF_CONF_ADDR   0x1A

Definition at line 56 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_COEFF_1

#define BMP3_IIR_FILTER_COEFF_1   0x01

Definition at line 79 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_COEFF_127

#define BMP3_IIR_FILTER_COEFF_127   0x07

Definition at line 85 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_COEFF_15

#define BMP3_IIR_FILTER_COEFF_15   0x04

Definition at line 82 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_COEFF_3

#define BMP3_IIR_FILTER_COEFF_3   0x02

Definition at line 80 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_COEFF_31

#define BMP3_IIR_FILTER_COEFF_31   0x05

Definition at line 83 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_COEFF_63

#define BMP3_IIR_FILTER_COEFF_63   0x06

Definition at line 84 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_COEFF_7

#define BMP3_IIR_FILTER_COEFF_7   0x03

Definition at line 81 of file bmp3_regs.h.

◆ BMP3_IIR_FILTER_DISABLE

#define BMP3_IIR_FILTER_DISABLE   0x00

Definition at line 78 of file bmp3_regs.h.

◆ BMP3_INT_CTRL_ADDR

#define BMP3_INT_CTRL_ADDR   0x19

Definition at line 55 of file bmp3_regs.h.

◆ BMP3_INT_STATUS_REG_ADDR

#define BMP3_INT_STATUS_REG_ADDR   0x11

Definition at line 49 of file bmp3_regs.h.

◆ BMP3_INTEGER_COMPENSATION

#define BMP3_INTEGER_COMPENSATION   3

Definition at line 129 of file bmp3_regs.h.

◆ BMP3_NO_OVERSAMPLING

#define BMP3_NO_OVERSAMPLING   0x00

Definition at line 70 of file bmp3_regs.h.

◆ BMP3_NORMAL_MODE

#define BMP3_NORMAL_MODE   0x03

Definition at line 67 of file bmp3_regs.h.

◆ BMP3_ODR_0_001_HZ

#define BMP3_ODR_0_001_HZ   0x11

Definition at line 105 of file bmp3_regs.h.

◆ BMP3_ODR_0_003_HZ

#define BMP3_ODR_0_003_HZ   0x10

Definition at line 104 of file bmp3_regs.h.

◆ BMP3_ODR_0_006_HZ

#define BMP3_ODR_0_006_HZ   0x0F

Definition at line 103 of file bmp3_regs.h.

◆ BMP3_ODR_0_01_HZ

#define BMP3_ODR_0_01_HZ   0x0E

Definition at line 102 of file bmp3_regs.h.

◆ BMP3_ODR_0_02_HZ

#define BMP3_ODR_0_02_HZ   0x0D

Definition at line 101 of file bmp3_regs.h.

◆ BMP3_ODR_0_05_HZ

#define BMP3_ODR_0_05_HZ   0x0C

Definition at line 100 of file bmp3_regs.h.

◆ BMP3_ODR_0_1_HZ

#define BMP3_ODR_0_1_HZ   0x0B

Definition at line 99 of file bmp3_regs.h.

◆ BMP3_ODR_0_2_HZ

#define BMP3_ODR_0_2_HZ   0x0A

Definition at line 98 of file bmp3_regs.h.

◆ BMP3_ODR_0_39_HZ

#define BMP3_ODR_0_39_HZ   0x09

Definition at line 97 of file bmp3_regs.h.

◆ BMP3_ODR_0_78_HZ

#define BMP3_ODR_0_78_HZ   0x08

Definition at line 96 of file bmp3_regs.h.

◆ BMP3_ODR_100_HZ

#define BMP3_ODR_100_HZ   0x01

Definition at line 89 of file bmp3_regs.h.

◆ BMP3_ODR_12_5_HZ

#define BMP3_ODR_12_5_HZ   0x04

Definition at line 92 of file bmp3_regs.h.

◆ BMP3_ODR_1_5_HZ

#define BMP3_ODR_1_5_HZ   0x07

Definition at line 95 of file bmp3_regs.h.

◆ BMP3_ODR_200_HZ

#define BMP3_ODR_200_HZ   0x00

Definition at line 88 of file bmp3_regs.h.

◆ BMP3_ODR_25_HZ

#define BMP3_ODR_25_HZ   0x03

Definition at line 91 of file bmp3_regs.h.

◆ BMP3_ODR_3_1_HZ

#define BMP3_ODR_3_1_HZ   0x06

Definition at line 94 of file bmp3_regs.h.

◆ BMP3_ODR_50_HZ

#define BMP3_ODR_50_HZ   0x02

Definition at line 90 of file bmp3_regs.h.

◆ BMP3_ODR_6_25_HZ

#define BMP3_ODR_6_25_HZ   0x05

Definition at line 93 of file bmp3_regs.h.

◆ BMP3_ODR_ADDR

#define BMP3_ODR_ADDR   0X1D

Definition at line 59 of file bmp3_regs.h.

◆ BMP3_OSR_ADDR

#define BMP3_OSR_ADDR   0X1C

Definition at line 58 of file bmp3_regs.h.

◆ BMP3_OVERSAMPLING_16X

#define BMP3_OVERSAMPLING_16X   0x04

Definition at line 74 of file bmp3_regs.h.

◆ BMP3_OVERSAMPLING_2X

#define BMP3_OVERSAMPLING_2X   0x01

Definition at line 71 of file bmp3_regs.h.

◆ BMP3_OVERSAMPLING_32X

#define BMP3_OVERSAMPLING_32X   0x05

Definition at line 75 of file bmp3_regs.h.

◆ BMP3_OVERSAMPLING_4X

#define BMP3_OVERSAMPLING_4X   0x02

Definition at line 72 of file bmp3_regs.h.

◆ BMP3_OVERSAMPLING_8X

#define BMP3_OVERSAMPLING_8X   0x03

Definition at line 73 of file bmp3_regs.h.

◆ BMP3_P_AND_T_HEADER_DATA_LEN

#define BMP3_P_AND_T_HEADER_DATA_LEN   7

Definition at line 117 of file bmp3_regs.h.

◆ BMP3_P_DATA_LEN

#define BMP3_P_DATA_LEN   3

Definition at line 120 of file bmp3_regs.h.

◆ BMP3_P_OR_T_HEADER_DATA_LEN

#define BMP3_P_OR_T_HEADER_DATA_LEN   4

Definition at line 118 of file bmp3_regs.h.

◆ BMP3_P_T_DATA_LEN

#define BMP3_P_T_DATA_LEN   6

Definition at line 119 of file bmp3_regs.h.

◆ BMP3_PRESS

#define BMP3_PRESS   0x01

Definition at line 108 of file bmp3_regs.h.

◆ BMP3_PWR_CTRL_ADDR

#define BMP3_PWR_CTRL_ADDR   0x1B

Definition at line 57 of file bmp3_regs.h.

◆ BMP3_SENS_STATUS_REG_ADDR

#define BMP3_SENS_STATUS_REG_ADDR   0x03

Definition at line 46 of file bmp3_regs.h.

◆ BMP3_SENSOR_TIME_LEN

#define BMP3_SENSOR_TIME_LEN   3

Definition at line 122 of file bmp3_regs.h.

◆ BMP3_SINGLE_PRECISION_COMPENSATION

#define BMP3_SINGLE_PRECISION_COMPENSATION   2

Definition at line 128 of file bmp3_regs.h.

◆ BMP3_SLEEP_MODE

#define BMP3_SLEEP_MODE   0x00

Definition at line 65 of file bmp3_regs.h.

◆ BMP3_T_DATA_LEN

#define BMP3_T_DATA_LEN   3

Definition at line 121 of file bmp3_regs.h.

◆ BMP3_TEMP

#define BMP3_TEMP   0x02

Definition at line 109 of file bmp3_regs.h.

Enumeration Type Documentation

◆ Bmp3Status

enum Bmp3Status

Status enum.

Enumerator
BMP3_STATUS_UNINIT 
BMP3_STATUS_GET_CALIB 
BMP3_STATUS_CONFIGURE 
BMP3_STATUS_READ_DATA 

Definition at line 141 of file bmp3_regs.h.