Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
LPS22HB_Public_Functions
[LPS22HB_DRIVER]
Functions | |
LPS22HB_Error_et | LPS22HB_Get_DeviceID (void *handle, uint8_t *deviceid) |
Read identification code by WHO_AM_I register. | |
LPS22HB_Error_et | LPS22HB_Get_DriverVersion (LPS22HB_driverVersion_st *Version) |
Get the LPS22HB driver version. | |
LPS22HB_Error_et | LPS22HB_Set_PowerMode (void *handle, LPS22HB_PowerMode_et mode) |
Set LPS22HB Low Power or Low Noise Mode Configuration. | |
LPS22HB_Error_et | LPS22HB_Get_PowerMode (void *handle, LPS22HB_PowerMode_et *mode) |
Get LPS22HB Power Mode. | |
LPS22HB_Error_et | LPS22HB_Set_Odr (void *handle, LPS22HB_Odr_et odr) |
Set LPS22HB Output Data Rate. | |
LPS22HB_Error_et | LPS22HB_Get_Odr (void *handle, LPS22HB_Odr_et *odr) |
Get LPS22HB Output Data Rate. | |
LPS22HB_Error_et | LPS22HB_Set_LowPassFilter (void *handle, LPS22HB_State_et state) |
Enable/Disale low-pass filter on LPS22HB pressure data. | |
LPS22HB_Error_et | LPS22HB_Set_LowPassFilterCutoff (void *handle, LPS22HB_LPF_Cutoff_et cutoff) |
Set low-pass filter cutoff configuration on LPS22HB pressure data. | |
LPS22HB_Error_et | LPS22HB_Set_Bdu (void *handle, LPS22HB_Bdu_et bdu) |
Set Block Data Mode It is recommended to set BDU bit to ‘1’. | |
LPS22HB_Error_et | LPS22HB_Get_Bdu (void *handle, LPS22HB_Bdu_et *bdu) |
Get Block Data Mode. | |
LPS22HB_Error_et | LPS22HB_Set_SpiInterface (void *handle, LPS22HB_SPIMode_et spimode) |
Set SPI mode: 3 Wire Interface or 4 Wire Interface. | |
LPS22HB_Error_et | LPS22HB_Set_ClockTreeConfifuration (void *handle, LPS22HB_CTE_et mode) |
Clock Tree Configuration. | |
LPS22HB_Error_et | LPS22HB_Get_SpiInterface (void *handle, LPS22HB_SPIMode_et *spimode) |
Get SPI mode: 3 Wire Interface or 4 Wire Interface. | |
LPS22HB_Error_et | LPS22HB_SwReset (void *handle) |
Software Reset. | |
LPS22HB_Error_et | LPS22HB_MemoryBoot (void *handle) |
Reboot Memory Content. | |
LPS22HB_Error_et | LPS22HB_SwResetAndMemoryBoot (void *handle) |
Software Reset ann Reboot Memory Content. | |
LPS22HB_Error_et | LPS22HB_Set_FifoModeUse (void *handle, LPS22HB_State_et status) |
Enable/Disable FIFO Mode. | |
LPS22HB_Error_et | LPS22HB_Set_FifoWatermarkLevelUse (void *handle, LPS22HB_State_et status) |
Enable/Disable FIFO Watermark Level Use. | |
LPS22HB_Error_et | LPS22HB_Set_AutomaticIncrementRegAddress (void *handle, LPS22HB_State_et status) |
Enable or Disable the Automatic increment register address during a multiple byte access with a serial interface (I2C or SPI) | |
LPS22HB_Error_et | LPS22HB_Set_I2C (void *handle, LPS22HB_State_et statei2c) |
Enable/Disable I2C Interface. | |
LPS22HB_Error_et | LPS22HB_StartOneShotMeasurement (void *handle) |
Set the one-shot bit in order to start acquisition when the ONE SHOT mode has been selected by the ODR configuration. | |
LPS22HB_Error_et | LPS22HB_Set_InterruptActiveLevel (void *handle, LPS22HB_InterruptActiveLevel_et mode) |
Set Interrupt Active on High or Low Level. | |
LPS22HB_Error_et | LPS22HB_Set_InterruptOutputType (void *handle, LPS22HB_OutputType_et output) |
Push-pull/open drain selection on interrupt pads. | |
LPS22HB_Error_et | LPS22HB_Set_InterruptControlConfig (void *handle, LPS22HB_OutputSignalConfig_et config) |
Set Data signal on INT pad control bits. | |
LPS22HB_Error_et | LPS22HB_Set_DRDYInterrupt (void *handle, LPS22HB_State_et status) |
Enable/Disable Data-ready signal on INT_DRDY pin. | |
LPS22HB_Error_et | LPS22HB_Set_FIFO_OVR_Interrupt (void *handle, LPS22HB_State_et status) |
Enable/Disable FIFO overrun interrupt on INT_DRDY pin. | |
LPS22HB_Error_et | LPS22HB_Set_FIFO_FTH_Interrupt (void *handle, LPS22HB_State_et status) |
Enable/Disable FIFO threshold (Watermark) interrupt on INT_DRDY pin. | |
LPS22HB_Error_et | LPS22HB_Set_FIFO_FULL_Interrupt (void *handle, LPS22HB_State_et status) |
Enable/Disable FIFO FULL interrupt on INT_DRDY pin. | |
LPS22HB_Error_et | LPS22HB_Set_AutoRifP (void *handle) |
Enable AutoRifP function When this function is enabled, an internal register is set with the current pressure values and the content is subtracted from the pressure output value and result is used for the interrupt generation. | |
LPS22HB_Error_et | LPS22HB_ResetAutoRifP (void *handle) |
Disable AutoRifP function the RESET_ARP bit is used to disable the AUTORIFP function. | |
LPS22HB_Error_et | LPS22HB_Set_AutoZeroFunction (void *handle) |
????? | |
LPS22HB_Error_et | LPS22HB_ResetAutoZeroFunction (void *handle) |
??? | |
LPS22HB_Error_et | LPS22HB_Set_InterruptDifferentialGeneration (void *handle, LPS22HB_State_et diff_en) |
Enable/ Disable the computing of differential pressure output (Interrupt Generation) | |
LPS22HB_Error_et | LPS22HB_Get_InterruptDifferentialGeneration (void *handle, LPS22HB_State_et *diff_en) |
Get the DIFF_EN bit value. | |
LPS22HB_Error_et | LPS22HB_LatchInterruptRequest (void *handle, LPS22HB_State_et status) |
Latch Interrupt request to the INT_SOURCE register. | |
LPS22HB_Error_et | LPS22HB_Set_PLE (void *handle, LPS22HB_State_et status) |
Enable Interrupt Generation on differential pressure Low event. | |
LPS22HB_Error_et | LPS22HB_Set_PHE (void *handle, LPS22HB_State_et status) |
Enable Interrupt Generation on differential pressure High event. | |
LPS22HB_Error_et | LPS22HB_Get_InterruptDifferentialEventStatus (void *handle, LPS22HB_InterruptDiffStatus_st *interruptsource) |
Get the Interrupt Generation on differential pressure status event and the Boot Status. | |
LPS22HB_Error_et | LPS22HB_Get_DataStatus (void *handle, LPS22HB_DataStatus_st *datastatus) |
Get the status of Pressure and Temperature data. | |
LPS22HB_Error_et | LPS22HB_Get_RawPressure (void *handle, int32_t *raw_press) |
Get the LPS22HB raw presure value The data are expressed as PRESS_OUT_H/_L/_XL in 2’s complement. | |
LPS22HB_Error_et | LPS22HB_Get_Pressure (void *handle, int32_t *Pout) |
Get the LPS22HB Pressure value in hPA. | |
LPS22HB_Error_et | LPS22HB_Get_RawTemperature (void *handle, int16_t *raw_data) |
Get the Raw Temperature value. | |
LPS22HB_Error_et | LPS22HB_Get_Temperature (void *handle, int16_t *Tout) |
Get the Temperature value in °C. | |
LPS22HB_Error_et | LPS22HB_Get_PressureThreshold (void *handle, int16_t *P_ths) |
Get the threshold value used for pressure interrupt generation (hPA). | |
LPS22HB_Error_et | LPS22HB_Set_PressureThreshold (void *handle, int16_t P_ths) |
Set the threshold value used for pressure interrupt generation (hPA). | |
LPS22HB_Error_et | LPS22HB_Set_FifoMode (void *handle, LPS22HB_FifoMode_et fifomode) |
Set Fifo Mode. | |
LPS22HB_Error_et | LPS22HB_Get_FifoMode (void *handle, LPS22HB_FifoMode_et *fifomode) |
Get Fifo Mode. | |
LPS22HB_Error_et | LPS22HB_Set_FifoWatermarkLevel (void *handle, uint8_t wtmlevel) |
Set Fifo Watermark Level. | |
LPS22HB_Error_et | LPS22HB_Get_FifoWatermarkLevel (void *handle, uint8_t *wtmlevel) |
Get FIFO Watermark Level. | |
LPS22HB_Error_et | LPS22HB_Get_FifoStatus (void *handle, LPS22HB_FifoStatus_st *status) |
Get the Fifo Status. | |
LPS22HB_Error_et | LPS22HB_Get_PressureOffsetValue (void *handle, int16_t *pressoffset) |
Get the reference pressure after soldering for computing differential pressure (hPA) | |
LPS22HB_Error_et | LPS22HB_Get_ReferencePressure (void *handle, int32_t *RefP) |
Get the Reference Pressure value It is a 24-bit data added to the sensor output measurement to detect a measured pressure beyond programmed limits. | |
LPS22HB_Error_et | LPS22HB_IsMeasurementCompleted (void *handle, uint8_t *Is_Measurement_Completed) |
Check if the single measurement has completed. | |
LPS22HB_Error_et | LPS22HB_Get_Measurement (void *handle, LPS22HB_MeasureTypeDef_st *Measurement_Value) |
Get the values of the last single measurement. | |
LPS22HB_Error_et | LPS22HB_Init (void *handle) |
Initialization function for LPS22HB. | |
LPS22HB_Error_et | LPS22HB_DeInit (void *handle) |
De initialization function for LPS22HB. | |
LPS22HB_Error_et | LPS22HB_Set_GenericConfig (void *handle, LPS22HB_ConfigTypeDef_st *pxLPS22HBInit) |
Set Generic Configuration. | |
LPS22HB_Error_et | LPS22HB_Get_GenericConfig (void *handle, LPS22HB_ConfigTypeDef_st *pxLPS22HBInit) |
Get Generic configuration. | |
LPS22HB_Error_et | LPS22HB_Set_InterruptConfig (void *handle, LPS22HB_InterruptTypeDef_st *pLPS22HBInt) |
Set Interrupt configuration. | |
LPS22HB_Error_et | LPS22HB_Get_InterruptConfig (void *handle, LPS22HB_InterruptTypeDef_st *pLPS22HBInt) |
LPS22HBGet_InterruptConfig. | |
LPS22HB_Error_et | LPS22HB_Set_FifoConfig (void *handle, LPS22HB_FIFOTypeDef_st *pLPS22HBFIFO) |
Set Fifo configuration. | |
LPS22HB_Error_et | LPS22HB_Get_FifoConfig (void *handle, LPS22HB_FIFOTypeDef_st *pLPS22HBFIFO) |
Get Fifo configuration. | |
void | LPS22HB_assert_failed (uint8_t *file, uint32_t line) |
Reports the name of the source file and the source line number where the assert_param error has occurred. |
Function Documentation
void LPS22HB_assert_failed | ( | uint8_t * | file, |
uint32_t | line | ||
) |
Reports the name of the source file and the source line number where the assert_param error has occurred.
- Parameters:
-
file,: pointer to the source file name line,: assert_param error line source number
- Return values:
-
: None
Definition at line 1737 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_DeInit | ( | void * | handle ) |
De initialization function for LPS22HB.
DeInit the LPS2Hb driver.
This function make a memory boot and clear the data output flags.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error code[LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1410 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_Bdu | ( | void * | handle, |
LPS22HB_Bdu_et * | bdu | ||
) |
Get Block Data Mode.
Get Block Data Update mode.
- Parameters:
-
*handle Device handle. Buffer to empty whit the bdu mode read from sensor
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 324 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_DataStatus | ( | void * | handle, |
LPS22HB_DataStatus_st * | datastatus | ||
) |
Get the status of Pressure and Temperature data.
- Parameters:
-
*handle Device handle. Data Status Flag: TempDataAvailable, TempDataOverrun, PressDataAvailable, PressDataOverrun
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1005 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_DeviceID | ( | void * | handle, |
uint8_t * | deviceid | ||
) |
Read identification code by WHO_AM_I register.
- Parameters:
-
*handle Device handle. Buffer to empty by Device identification Value.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 124 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_DriverVersion | ( | LPS22HB_driverVersion_st * | Version ) |
Get the LPS22HB driver version.
- Parameters:
-
None
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 138 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_FifoConfig | ( | void * | handle, |
LPS22HB_FIFOTypeDef_st * | pLPS22HBFIFO | ||
) |
Get Fifo configuration.
- Parameters:
-
*handle Device handle. Struct to empty with the configuration values
- Return values:
-
Error code[LPS22HB_ERROR, LPS22HB_OK]
< Fifo Mode Selection
< FIFO threshold/Watermark level selection
< Enable/Disable the watermark interrupt
Definition at line 1706 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_FifoMode | ( | void * | handle, |
LPS22HB_FifoMode_et * | fifomode | ||
) |
Get Fifo Mode.
- Parameters:
-
*handle Device handle. buffer to empty with fifo mode tmp
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1186 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_FifoStatus | ( | void * | handle, |
LPS22HB_FifoStatus_st * | status | ||
) |
Get the Fifo Status.
Get Fifo Status.
- Parameters:
-
*handle Device handle. Status Flag: FIFO_FTH,FIFO_EMPTY,FIFO_FULL,FIFO_OVR and level of the FIFO->FIFO_LEVEL
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1245 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_FifoWatermarkLevel | ( | void * | handle, |
uint8_t * | wtmlevel | ||
) |
Get FIFO Watermark Level.
- Parameters:
-
*handle Device handle. buffer to empty with watermak level[0,31] value read from sensor
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1229 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_GenericConfig | ( | void * | handle, |
LPS22HB_ConfigTypeDef_st * | pxLPS22HBInit | ||
) |
Get Generic configuration.
- Parameters:
-
*handle Device handle. Struct to empty with configuration values
- Return values:
-
Error code[LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1481 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_InterruptConfig | ( | void * | handle, |
LPS22HB_InterruptTypeDef_st * | pLPS22HBInt | ||
) |
LPS22HBGet_InterruptConfig.
- Parameters:
-
*handle Device handle. Struct to empty with configuration values
- Return values:
-
S Error code[LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1623 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_InterruptDifferentialEventStatus | ( | void * | handle, |
LPS22HB_InterruptDiffStatus_st * | interruptsource | ||
) |
Get the Interrupt Generation on differential pressure status event and the Boot Status.
The INT_SOURCE register is cleared by reading it.
- Parameters:
-
*handle Device handle. Status Event Flag: BOOT, PH,PL,IA
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 984 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_InterruptDifferentialGeneration | ( | void * | handle, |
LPS22HB_State_et * | diff_en | ||
) |
Get the DIFF_EN bit value.
- Parameters:
-
*handle Device handle. buffer to empty with the read value of DIFF_EN bit
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 891 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_Measurement | ( | void * | handle, |
LPS22HB_MeasureTypeDef_st * | Measurement_Value | ||
) |
Get the values of the last single measurement.
- Parameters:
-
*handle Device handle. Pressure and temperature tmp
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1353 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_Odr | ( | void * | handle, |
LPS22HB_Odr_et * | odr | ||
) |
Get LPS22HB Output Data Rate.
- Parameters:
-
*handle Device handle. Buffer to empty with Output Data Rate
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 222 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_PowerMode | ( | void * | handle, |
LPS22HB_PowerMode_et * | mode | ||
) |
Get LPS22HB Power Mode.
- Parameters:
-
*handle Device handle. Buffer to empty with Mode: Low Noise or Low Current
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 178 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_Pressure | ( | void * | handle, |
int32_t * | Pout | ||
) |
Get the LPS22HB Pressure value in hPA.
The data are expressed as PRESS_OUT_H/_L/_XL in 2’s complement. Pout(hPA)=PRESS_OUT / 4096
- Parameters:
-
*handle Device handle. The buffer to empty with the pressure value that must be divided by 100 to get the value in hPA
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1060 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_PressureOffsetValue | ( | void * | handle, |
int16_t * | pressoffset | ||
) |
Get the reference pressure after soldering for computing differential pressure (hPA)
- Parameters:
-
*handle Device handle. buffer to empty with the he pressure value (hPA)
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1276 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_PressureThreshold | ( | void * | handle, |
int16_t * | P_ths | ||
) |
Get the threshold value used for pressure interrupt generation (hPA).
Get the threshold value used for pressure interrupt generation.
THS_P=THS_P_H&THS_P_L and is expressed as unsigned number. P_ths(hPA)=(THS_P)/16.
- Parameters:
-
*handle Device handle. Buffer to empty with the pressure threshold in hPA
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1124 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_RawPressure | ( | void * | handle, |
int32_t * | raw_press | ||
) |
Get the LPS22HB raw presure value The data are expressed as PRESS_OUT_H/_L/_XL in 2’s complement.
Get the LPS22HB raw presure value.
Pout(hPA)=PRESS_OUT / 4096
- Parameters:
-
*handle Device handle. The buffer to empty with the pressure raw value
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1030 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_RawTemperature | ( | void * | handle, |
int16_t * | raw_data | ||
) |
Get the Raw Temperature value.
Read LPS22HB output register, and calculate the raw temperature.
Temperature data are expressed as TEMP_OUT_H&TEMP_OUT_L as 2’s complement number. Tout(degC)=TEMP_OUT/100
- Parameters:
-
*handle Device handle. Buffer to empty with the temperature raw tmp.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1080 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_ReferencePressure | ( | void * | handle, |
int32_t * | RefP | ||
) |
Get the Reference Pressure value It is a 24-bit data added to the sensor output measurement to detect a measured pressure beyond programmed limits.
- Parameters:
-
*handle Device handle. Buffer to empty with reference pressure value
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1299 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_SpiInterface | ( | void * | handle, |
LPS22HB_SPIMode_et * | spimode | ||
) |
Get SPI mode: 3 Wire Interface or 4 Wire Interface.
Get SPI mode: 3 Wire Interface OR 4 Wire Interface.
- Parameters:
-
*handle Device handle. Buffet to empty with spi mode read from Sensor
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 394 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Get_Temperature | ( | void * | handle, |
int16_t * | Tout | ||
) |
Get the Temperature value in °C.
Read the Temperature value in °C.
Temperature data are expressed as TEMP_OUT_H&TEMP_OUT_L as 2’s complement number. Tout(degC)=TEMP_OUT/100
- Parameters:
-
*handle Device handle. Buffer to empty with the temperature value that must be divided by 10 to get the value in °C
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1105 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Init | ( | void * | handle ) |
Initialization function for LPS22HB.
This function make a memory boot. Init the sensor with a standard basic confifuration. Low Power, ODR 25 Hz, Low Pass Filter disabled; BDU enabled; I2C enabled; NO FIFO; NO Interrupt Enabled.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error code[LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1381 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_IsMeasurementCompleted | ( | void * | handle, |
uint8_t * | Is_Measurement_Completed | ||
) |
Check if the single measurement has completed.
- Parameters:
-
*handle Device handle. the returned value is set to 1, when the measurement is completed
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1331 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_LatchInterruptRequest | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Latch Interrupt request to the INT_SOURCE register.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 909 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_MemoryBoot | ( | void * | handle ) |
Reboot Memory Content.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 432 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_ResetAutoRifP | ( | void * | handle ) |
Disable AutoRifP function the RESET_ARP bit is used to disable the AUTORIFP function.
Disable AutoRifP.
This bis i is selfdleared
- Parameters:
-
*handle Device handle.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 796 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_ResetAutoZeroFunction | ( | void * | handle ) |
???
Set ResetAutoZero Function bit
REF_P reg (@0x015..17) set pressure reference to default value RPDS reg (0x18/19).
- Parameters:
-
None
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 841 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_AutomaticIncrementRegAddress | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable or Disable the Automatic increment register address during a multiple byte access with a serial interface (I2C or SPI)
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE. Default is LPS22HB_ENABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 523 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_AutoRifP | ( | void * | handle ) |
Enable AutoRifP function When this function is enabled, an internal register is set with the current pressure values and the content is subtracted from the pressure output value and result is used for the interrupt generation.
Enable AutoRifP function.
the AutoRifP is slf creared.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 775 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_AutoZeroFunction | ( | void * | handle ) |
?????
Set AutoZero Function bit When set to ‘1’, the actual pressure output is copied in the REF_P reg (@0x15..0x17)
- Parameters:
-
None
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 819 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_Bdu | ( | void * | handle, |
LPS22HB_Bdu_et | bdu | ||
) |
Set Block Data Mode It is recommended to set BDU bit to ‘1’.
Set Block Data Update mode.
This feature avoids reading LSB and MSB related to different samples.
- Parameters:
-
*handle Device handle. LPS22HB_BDU_CONTINUOUS_UPDATE,LPS22HB_BDU_NO_UPDATE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 298 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_ClockTreeConfifuration | ( | void * | handle, |
LPS22HB_CTE_et | mode | ||
) |
Clock Tree Configuration.
Clock Tree Confoguration.
- Parameters:
-
*handle Device handle. LPS22HB_CTE_NotBalanced,LPS22HB_CTE_ABalanced
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 367 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_DRDYInterrupt | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable/Disable Data-ready signal on INT_DRDY pin.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 673 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FIFO_FTH_Interrupt | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable/Disable FIFO threshold (Watermark) interrupt on INT_DRDY pin.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 723 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FIFO_FULL_Interrupt | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable/Disable FIFO FULL interrupt on INT_DRDY pin.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 747 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FIFO_OVR_Interrupt | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable/Disable FIFO overrun interrupt on INT_DRDY pin.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 698 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FifoConfig | ( | void * | handle, |
LPS22HB_FIFOTypeDef_st * | pLPS22HBFIFO | ||
) |
Set Fifo configuration.
- Parameters:
-
*handle Device handle. Struct holding the configuration values
- Return values:
-
Error code[LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1661 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FifoMode | ( | void * | handle, |
LPS22HB_FifoMode_et | fifomode | ||
) |
Set Fifo Mode.
- Parameters:
-
*handle Device handle. Fifo Mode struct
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1162 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FifoModeUse | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable/Disable FIFO Mode.
Enable or Disable FIFO.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 476 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FifoWatermarkLevel | ( | void * | handle, |
uint8_t | wtmlevel | ||
) |
Set Fifo Watermark Level.
- Parameters:
-
*handle Device handle. Watermark level value [0 31]
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1205 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_FifoWatermarkLevelUse | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable/Disable FIFO Watermark Level Use.
Enable or Disable FIFO Watermark level use.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 499 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_GenericConfig | ( | void * | handle, |
LPS22HB_ConfigTypeDef_st * | pxLPS22HBInit | ||
) |
Set Generic Configuration.
- Parameters:
-
*handle Device handle. Struct to empty with the chosen values
- Return values:
-
Error code[LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1432 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_I2C | ( | void * | handle, |
LPS22HB_State_et | statei2c | ||
) |
Enable/Disable I2C Interface.
Enable/Disable I2C.
- Parameters:
-
*handle Device handle. State,: LPS22HB_ENABLE (reset bit)/ LPS22HB_DISABLE (set bit)
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 548 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_InterruptActiveLevel | ( | void * | handle, |
LPS22HB_InterruptActiveLevel_et | mode | ||
) |
Set Interrupt Active on High or Low Level.
- Parameters:
-
*handle Device handle. LPS22HB_ActiveHigh/LPS22HB_ActiveLow
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 599 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_InterruptConfig | ( | void * | handle, |
LPS22HB_InterruptTypeDef_st * | pLPS22HBInt | ||
) |
Set Interrupt configuration.
- Parameters:
-
*handle Device handle. Struct holding the configuration values
- Return values:
-
Error code[LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1516 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_InterruptControlConfig | ( | void * | handle, |
LPS22HB_OutputSignalConfig_et | config | ||
) |
Set Data signal on INT pad control bits.
Set Data signal on INT1 pad control bits.
- Parameters:
-
*handle Device handle. LPS22HB_DATA,LPS22HB_P_HIGH_LPS22HB_P_LOW,LPS22HB_P_LOW_HIGH
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 648 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_InterruptDifferentialGeneration | ( | void * | handle, |
LPS22HB_State_et | diff_en | ||
) |
Enable/ Disable the computing of differential pressure output (Interrupt Generation)
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE,LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 866 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_InterruptOutputType | ( | void * | handle, |
LPS22HB_OutputType_et | output | ||
) |
Push-pull/open drain selection on interrupt pads.
Set Push-pull/open drain selection on interrupt pads.
Default tmp: 0
- Parameters:
-
*handle Device handle. LPS22HB_PushPull/LPS22HB_OpenDrain
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 624 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_LowPassFilter | ( | void * | handle, |
LPS22HB_State_et | state | ||
) |
Enable/Disale low-pass filter on LPS22HB pressure data.
- Parameters:
-
*handle Device handle. state,: enable or disable
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 240 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_LowPassFilterCutoff | ( | void * | handle, |
LPS22HB_LPF_Cutoff_et | cutoff | ||
) |
Set low-pass filter cutoff configuration on LPS22HB pressure data.
- Parameters:
-
*handle Device handle. Filter Cutoff ODR/9 or ODR/20
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 267 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_Odr | ( | void * | handle, |
LPS22HB_Odr_et | odr | ||
) |
Set LPS22HB Output Data Rate.
- Parameters:
-
*handle Device handle. Output Data Rate
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 197 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_PHE | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable Interrupt Generation on differential pressure High event.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 959 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_PLE | ( | void * | handle, |
LPS22HB_State_et | status | ||
) |
Enable Interrupt Generation on differential pressure Low event.
- Parameters:
-
*handle Device handle. LPS22HB_ENABLE/LPS22HB_DISABLE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 935 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_PowerMode | ( | void * | handle, |
LPS22HB_PowerMode_et | mode | ||
) |
Set LPS22HB Low Power or Low Noise Mode Configuration.
- Parameters:
-
*handle Device handle. LPS22HB_LowNoise or LPS22HB_LowPower mode
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 154 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_PressureThreshold | ( | void * | handle, |
int16_t | P_ths | ||
) |
Set the threshold value used for pressure interrupt generation (hPA).
Set the threshold value used for pressure interrupt generation.
THS_P=THS_P_H&THS_P_L and is expressed as unsigned number. P_ths(hPA)=(THS_P)/16.
- Parameters:
-
*handle Device handle. Pressure threshold in hPA
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 1143 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_Set_SpiInterface | ( | void * | handle, |
LPS22HB_SPIMode_et | spimode | ||
) |
Set SPI mode: 3 Wire Interface or 4 Wire Interface.
Set SPI mode: 3 Wire Interface OR 4 Wire Interface.
- Parameters:
-
*handle Device handle. LPS22HB_SPI_3_WIRE,LPS22HB_SPI_4_WIRE
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
FIXME could not read before setting SPI mode
Definition at line 342 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_StartOneShotMeasurement | ( | void * | handle ) |
Set the one-shot bit in order to start acquisition when the ONE SHOT mode has been selected by the ODR configuration.
Set One Shot bit to start a new conversion (ODR mode has to be 000)
Once the measurement is done, ONE_SHOT bit will self-clear.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 575 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_SwReset | ( | void * | handle ) |
Software Reset.
Self-clearing upon completion
- Parameters:
-
*handle Device handle.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 411 of file LPS22HB_driver.c.
LPS22HB_Error_et LPS22HB_SwResetAndMemoryBoot | ( | void * | handle ) |
Software Reset ann Reboot Memory Content.
Software Reset ann BOOT.
The device is reset to the power on configuration if the SWRESET bit is set to ‘1’ + and BOOT is set to ‘1’; Self-clearing upon completion.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error Code [LPS22HB_ERROR, LPS22HB_OK]
Definition at line 454 of file LPS22HB_driver.c.
Generated on Fri Jul 15 2022 04:42:55 by
