| BlueNRG-1 SDK drivers APIs

- Main Page
- Modules
- Classes
- Files

Modules | Macros
LPS25HB_Exported_Defines
SDK EVAL BlueNRG1 » LPS25HB » LPS25HB SENSOR LIB

## Modules

| LPS25HB_Power_Mode_Selection_CTRL_REG1
| LPS25HB_Output_Data_Rate_Selection_CTRL_REG1
| LPS25HB_Interrupt_Circuit_Enable_CTRL_REG1
| LPS25HB_Block_Data_Update_CTRL_REG1
| LPS25HB_SPI_Serial_Interface_Mode_Selection_CTRL_REG1
| LPS25HB_Refresh_Registers_Flash_Memory_CTRL_REG2
| LPS25HB_Pressure_Resolution_Selection_RES_CONF
| LPS25HB_Temperature_Resolution_Selection_RES_CONF

## Macros

#define | NULL (void *) 0
#define | LPS25HB_REF_P_XL_ADDR 0x08
| Reference pressure (LSB data) More...
#define | LPS25HB_REF_P_L_ADDR 0x09
| Reference pressure (middle part) More...
#define | LPS25HB_REF_P_H_ADDR 0x0A
| Reference pressure (MSB part) More...
#define | LPS25HB_WHO_AM_I_ADDR 0x0F
| Device identifier register. More...
#define | LPS25HB_RES_CONF_ADDR 0x10
| Pressure and temperature resolution mode register. More...
#define | LPS25HB_CTRL_REG1_ADDR 0x20
| Pressure sensor control register 1. More...
#define | LPS25HB_CTRL_REG2_ADDR 0x21
| Pressure sensor control register 2. More...
#define | LPS25HB_CTRL_REG3_ADDR 0x22
| Pressure sensor control register 3. More...
#define | LPS25HB_CTRL_REG4_ADDR 0x23
| Pressure sensor control register 4. More...
#define | LPS25HB_INT_CFG_REG_ADDR 0x24
| Interrupt configuration Register. More...
#define | LPS25HB_INT_SOURCE_REG_ADDR 0x25
| Interrupt source Register. More...
#define | LPS25HB_THS_P_LOW_REG_ADDR 0x30
| Threshold pressure (LSB) More...
#define | LPS25HB_THS_P_HIGH_REG_ADDR 0x31
| Threshold pressure (MSB) More...
#define | LPS25HB_STATUS_REG_ADDR 0x27
| Status Register. More...
#define | LPS25HB_PRESS_POUT_XL_ADDR 0x28
| Pressure data (LSB). More...
#define | LPS25HB_PRESS_OUT_L_ADDR 0x29
| Pressure data (Middle part). More...
#define | LPS25HB_PRESS_OUT_H_ADDR 0x2A
| Pressure data (MSB). More...
#define | LPS25HB_TEMP_OUT_L_ADDR 0x2B
| Temperature data (LSB). More...
#define | LPS25HB_TEMP_OUT_H_ADDR 0x2C
| Temperature data (MSB). More...
#define | LPS25HB_CTRL_FIFO_ADDR 0x2E
| FIFO control register. More...
#define | LPS25HB_STATUS_FIFO_ADDR 0x2F
| FIFO Status register. More...
#define | LPS25HB_RPDS_TRIM_L_ADDR 0x39
| Pressure offset register. More...
#define | LPS25HB_RPDS_TRIM_H_ADDR 0x3A
| Pressure offset register. More...
#define | LPS25HB_I2C_MULTIPLEBYTE_CMD ((uint8_t)0x80)
| Multiple Byte. Mask for enabling multiple byte read/write command. More...
#define | LPS25HB_ADDRESS_LOW 0x5C
| Device Address. More...
#define | LPS25HB_ADDRESS_HIGH 0x5B
#define | I_AM_LPS25HB ((uint8_t)0xBD)
| Device Identifier. Default value of the WHO_AM_I register. More...
#define | LPS25HB_SA0_LOW ((uint8_t)0x00)
#define | LPS25HB_SA0_HIGH ((uint8_t)0x01)

## Detailed Description

## Macro Definition Documentation

#define I_AM_LPS25HB ((uint8_t)0xBD)

Device Identifier. Default value of the WHO_AM_I register.

Definition at line 422 of file LPS25HB.h.

#define LPS25HB_ADDRESS_HIGH 0x5B

Definition at line 416 of file LPS25HB.h.

#define LPS25HB_ADDRESS_LOW 0x5C

Device Address.

Definition at line 415 of file LPS25HB.h.

#define LPS25HB_CTRL_FIFO_ADDR 0x2E

FIFO control register.

1 Read/write
2 Default value: 0x00
3 7:5 F_MODE2, F_MODE1, F_MODE0: FIFO mode selection.
4 FM2 | FM1 | FM0 | FIFO MODE
5 ---------------------------------------------------
6 0 | 0 | 0 | BYPASS MODE
7 0 | 0 | 1 | FIFO MODE. Stops collecting data when full
8 0 | 1 | 0 | STREAM MODE: Keep the newest measurements in the FIFO
9 0 | 1 | 1 | STREAM MODE until trigger deasserted, then change to FIFO MODE
10 1 | 0 | 0 | BYPASS MODE until trigger deasserted, then STREAM MODE
11 1 | 0 | 1 | Reserved
12 1 | 1 | 0 | FIFO_MEAN MODE: Fifo is used to generate a running average filtered pressure
13 1 | 1 | 1 | BYPASS mode until trigger deasserted, then FIFO MODE
14
15 4:0 FIFO Mean Mode Sample size
16 WTM_POINT4 | WTM_POINT4 | WTM_POINT4 | WTM_POINT4 | WTM_POINT4 | Sample Size
17 ----------------------------------------------------------------------------------
18 0 | 0 | 0 | 0 | 1 | 2
19 0 | 0 | 0 | 1 | 1 | 4
20 0 | 0 | 1 | 1 | 1 | 8
21 0 | 1 | 1 | 1 | 1 | 16
22 1 | 1 | 1 | 1 | 1 | 32
23 other values operation not guaranteed

Definition at line 366 of file LPS25HB.h.

#define LPS25HB_CTRL_REG1_ADDR 0x20

Pressure sensor control register 1.

1 Read/write
2 Default value: 0x00
3 7 PD: power down control. 0 - disable; 1 - enable
4 6:4 ODR2, ODR1, ODR0: output data rate selection.
5 ODR2 | ODR1 | ODR0 | Pressure output data-rate(Hz) | Temperature output data-rate(Hz)
6 ----------------------------------------------------------------------------------
7 0 | 0 | 0 | one shot | one shot
8 0 | 0 | 1 | 1 | 1
9 0 | 1 | 0 | 7 | 7
10 0 | 1 | 1 | 12.5 | 12.5
11 1 | 0 | 0 | 25 | 25
12 1 | 0 | 1 | Reserved | Reserved
13 1 | 1 | 0 | Reserved | Reserved
14 1 | 1 | 1 | Reserved | Reserved
15
16 3 DIFF_EN: Interrupt circuit. 0 - disable; 1 - enable
17 2 BDU: block data update. 0 - disable; 1 - enable
18 1 DELTA_EN: delta pressure. 0 - disable; 1 - enable
19 1 RESET_AZ: reset AutoZero. 0 - disable; 1 - enable ///////ALE REVIEW
20 0 SIM: SPI Serial Interface Mode selection. 0 - SPI 4-wire; 1 - SPI 3-wire ///////ALE REVIEW

Definition at line 158 of file LPS25HB.h.

#define LPS25HB_CTRL_REG2_ADDR 0x21

Pressure sensor control register 2.

1 Read/write
2 Default value: 0x00
3 7 BOOT: Reboot memory content. 0: normal mode; 1: reboot memory content
4 6 FIFO_EN: FIFO. 0: disable; 1: enable
5 5 WTM_EN: FIFO Watermark level use. 0: disable; 1: enable
6 4:3 Reserved. keep these bits at 0
7 2 SWRESET: Software reset. 0: normal mode; 1: SW reset.
8 1 AUTO_ZERO: Autozero enable. 0: normal mode; 1: autozero enable.
9 0 ONE_SHOT: One shot enable. 0: waiting for start of conversion; 1: start for a new dataset

Definition at line 174 of file LPS25HB.h.

#define LPS25HB_CTRL_REG3_ADDR 0x22

Pressure sensor control register 3.

1 Read/write
2 Default value: 0x00
3 7 INT_H_L: Interrupt. 0:active high; 1: active low.
4 6 PP_OD: Push-Pull/OpenDrain selection on interrupt pads. 0: Push-pull; 1: open drain.
5 5 Reserved
6 4:3 INT2_S2, INT2_S1: INT2 output signal selection control bits. // TO DO
7 1:0 INT1_S2, INT1_S1: data signal on INT1 pad control bits.
8 INT1(2)_S2 | INT1(2)_S1 | INT1(2) pin
9 ------------------------------------------------------
10 0 | 0 | Data signal
11 0 | 1 | Pressure high (P_high)
12 1 | 0 | Pressure low (P_low)
13 1 | 1 | P_low OR P_high

Definition at line 196 of file LPS25HB.h.

#define LPS25HB_CTRL_REG4_ADDR 0x23

Pressure sensor control register 4.

1 Read/write
2 Default value: 0x00
3 7 P2_EMPTY: Empty Signal on INT2 pin.
4 6 P2_WTM: Watermark Signal on INT2 pin.
5 5 P2_Overrun:Overrun Signal on INT2 pin.
6 4 P2_DRDY: Data Ready Signal on INT2 pin.
7 3 P1_EMPTY: Empty Signal on INT1 pin.
8 2 P1_WTM: Watermark Signal on INT1 pin.
9 1 P1_Overrunn:Overrun Signal on INT1 pin.
10 0 P1_DRDY: Data Ready Signal on INT1 pin.

Definition at line 213 of file LPS25HB.h.

#define LPS25HB_I2C_MULTIPLEBYTE_CMD ((uint8_t)0x80)

Multiple Byte. Mask for enabling multiple byte read/write command.

Definition at line 408 of file LPS25HB.h.

#define LPS25HB_INT_CFG_REG_ADDR 0x24

Interrupt configuration Register.

1 Read/write
2 Default value: 0x00.
3 7:3 Reserved.
4 2 LIR: Latch Interrupt request into INT_SOURCE register. 0 - disable; 1 - enable
5 1 PL_E: Enable interrupt generation on differential pressure low event. 0 - disable; 1 - enable
6 0 PH_E: Enable interrupt generation on differential pressure high event. 0 - disable; 1 - enable

Definition at line 226 of file LPS25HB.h.

#define LPS25HB_INT_SOURCE_REG_ADDR 0x25

Interrupt source Register.

1 Read
2 Default value: 0x00.
3 7:3 0.
4 2 IA: Interrupt Active.0: no interrupt has been generated; 1: one or more interrupt events have been generated.
5 1 PL: Differential pressure Low. 0: no interrupt has been generated; 1: Low differential pressure event has occurred.
6 0 PH: Differential pressure High. 0: no interrupt has been generated; 1: High differential pressure event has occurred.

Definition at line 239 of file LPS25HB.h.

#define LPS25HB_PRESS_OUT_H_ADDR 0x2A

Pressure data (MSB).

1 Read
2 Default value: 0x2F.
3 POUT23 - POUT16: Pressure data MSB (2's complement).
4 Pressure output data: Pout(mbar)=(PRESS_OUT_H & PRESS_OUT_L &
5 PRESS_OUT_XL)[dec]/4096.

Definition at line 314 of file LPS25HB.h.

#define LPS25HB_PRESS_OUT_L_ADDR 0x29

Pressure data (Middle part).

1 Read
2 Default value: 0x80.
3 POUT15 - POUT8: Pressure data middle part (2's complement).
4 Pressure output data: Pout(mbar)=(PRESS_OUT_H & PRESS_OUT_L &
5 PRESS_OUT_XL)[dec]/4096.

Definition at line 302 of file LPS25HB.h.

#define LPS25HB_PRESS_POUT_XL_ADDR 0x28

Pressure data (LSB).

1 Read
2 Default value: 0x00.
3 POUT7 - POUT0: Pressure data LSB (2's complement).
4 Pressure output data: Pout(mbar)=(PRESS_OUT_H & PRESS_OUT_L &
5 PRESS_OUT_XL)[dec]/4096.

Definition at line 290 of file LPS25HB.h.

#define LPS25HB_REF_P_H_ADDR 0x0A

Reference pressure (MSB part)

1 Read/write
2 Default value: 0x00
3 7:0 REF15-ODR8: Higher part of the reference pressure that
4 is sum to the sensor output pressure.

Definition at line 108 of file LPS25HB.h.

#define LPS25HB_REF_P_L_ADDR 0x09

Reference pressure (middle part)

1 Read/write
2 Default value: 0x00
3 7:0 REF15-ODR8: Middle part of the reference pressure that
4 is sum to the sensor output pressure.

Definition at line 97 of file LPS25HB.h.

#define LPS25HB_REF_P_XL_ADDR 0x08

Reference pressure (LSB data)

1 Read/write
2 Default value: 0x00
3 7:0 REF7-ODR0: Lower part of the reference pressure that
4 is sum to the sensor output pressure.

Definition at line 86 of file LPS25HB.h.

#define LPS25HB_RES_CONF_ADDR 0x10

Pressure and temperature resolution mode register.

1 Read
2 Default value: 0x05
3 [7:4] Reserved
4 [3:2] AVGP1-0: select the pressure internal average.
5 [1:0] AVGT1-0: select the temperature internal average.

Definition at line 131 of file LPS25HB.h.

#define LPS25HB_RPDS_TRIM_H_ADDR 0x3A

Pressure offset register.

1 Read/write
2 Default value: 0x00
3 7:0 RPDS23...16:Pressure Offset for 1 point calibration after soldering.

Definition at line 399 of file LPS25HB.h.

#define LPS25HB_RPDS_TRIM_L_ADDR 0x39

Pressure offset register.

1 Read/write
2 Default value: 0x00
3 7:0 RPDS15...8:Pressure Offset for 1 point calibration after soldering.

Definition at line 389 of file LPS25HB.h.

#define LPS25HB_SA0_HIGH ((uint8_t)0x01)

Definition at line 520 of file LPS25HB.h.

#define LPS25HB_SA0_LOW ((uint8_t)0x00)

Definition at line 519 of file LPS25HB.h.

#define LPS25HB_STATUS_FIFO_ADDR 0x2F

FIFO Status register.

1 Read/write
2 Default value: 0x00
3 7 WTM_FIFO: Watermark status. 0:FIFO filling is lower than watermark level; 1: FIFO is equal or higher than watermark level.
4 6 FULL_FIFO: Overrun bit status. 0 - FIFO not full; 1 -FIFO is full.
5 5 EMPTY_FIFO: Empty FIFO bit. 0 - FIFO not empty; 1 -FIFO is empty.
6 4:0 DIFF_POINT4...0: FIFOsStored data level.

Definition at line 379 of file LPS25HB.h.

#define LPS25HB_STATUS_REG_ADDR 0x27

Status Register.

1 Read
2 Default value: 0x00
3 7:6 0
4 5 P_OR: Pressure data overrun. 0: no overrun has occurred; 1: new data for pressure has overwritten the previous one.
5 4 T_OR: Temperature data overrun. 0: no overrun has occurred; 1: a new data for temperature has overwritten the previous one.
6 3:2 0
7 1 P_DA: Pressure data available. 0: new data for pressure is not yet available; 1: new data for pressure is available.
8 0 T_DA: Temperature data available. 0: new data for temperature is not yet available; 1: new data for temperature is available.

Definition at line 278 of file LPS25HB.h.

#define LPS25HB_TEMP_OUT_H_ADDR 0x2C

Temperature data (MSB).

1 Read
2 Default value: 0x00.
3 TOUT15 - TOUT8: temperature data MSB.
4 T(degC) = 42.5 + (Temp_OUTH & TEMP_OUT_L)[dec]/480.

Definition at line 336 of file LPS25HB.h.

#define LPS25HB_TEMP_OUT_L_ADDR 0x2B

Temperature data (LSB).

1 Read
2 Default value: 0x00.
3 TOUT7 - TOUT0: temperature data LSB.
4 T(degC) = 42.5 + (Temp_OUTH & TEMP_OUT_L)[dec]/480.

Definition at line 325 of file LPS25HB.h.

#define LPS25HB_THS_P_HIGH_REG_ADDR 0x31

Threshold pressure (MSB)

1 Read
2 Default value: 0x00.
3 7:0 THS15-THS8: High part of threshold value for pressure interrupt
4 generation. The complete threshold value is given by THS_P_H & THS_P_L and is
5 expressed as unsigned number. P_ths(mbar)=(THS_P_H & THS_P_L)[dec]/16.

Definition at line 263 of file LPS25HB.h.

#define LPS25HB_THS_P_LOW_REG_ADDR 0x30

Threshold pressure (LSB)

1 Read
2 Default value: 0x00.
3 7:0 THS7-THS0: Low part of threshold value for pressure interrupt
4 generation. The complete threshold value is given by THS_P_H & THS_P_L and is
5 expressed as unsigned number. P_ths(mbar)=(THS_P_H & THS_P_L)[dec]/16.

Definition at line 251 of file LPS25HB.h.

#define LPS25HB_WHO_AM_I_ADDR 0x0F

Device identifier register.

1 Read
2 Default value: 0xBD
3 7:0 This read-only register contains the device identifier that,
4 for LPS25HB, is set to 0xCA.

Definition at line 119 of file LPS25HB.h.

#define NULL (void *) 0

Definition at line 68 of file LPS25HB.h.