Workshop example

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Embed: (wiki syntax)

« Back to documentation index

LPS22HB_driver.h File Reference

LPS22HB_driver.h File Reference

LPS22HB driver header file. More...

Go to the source code of this file.

Data Structures

struct  LPS22HB_InterruptDiffStatus_st
 LPS22HB Interrupt Differential Status. More...
struct  LPS22HB_DataStatus_st
 LPS22HB Pressure and Temperature data status. More...
struct  LPS22HB_FifoStatus_st
 LPS22HB Fifo Satus. More...
struct  LPS22HB_ConfigTypeDef_st
 LPS22HB Configuration structure definition. More...
struct  LPS22HB_InterruptTypeDef_st
 LPS22HB Interrupt structure definition . More...
struct  LPS22HB_FIFOTypeDef_st
 LPS22HB FIFO structure definition. More...
struct  LPS22HB_MeasureTypeDef_st
 LPS22HB Measure Type definition. More...
struct  LPS22HB_driverVersion_st
 LPS22HB Driver Version Info structure definition. More...

Enumerations

enum  LPS22HB_Error_et
 

Error type.

More...
enum  LPS22HB_State_et
 

Enable/Disable type.

More...
enum  LPS22HB_BitStatus_et
 

Bit status type.

More...
enum  LPS22HB_PowerMode_et { LPS22HB_LowNoise = (uint8_t)0x00, LPS22HB_LowPower = (uint8_t)0x01 }
 

LPS22HB Power/Noise Mode configuration.

More...
enum  LPS22HB_Odr_et {
  LPS22HB_ODR_ONE_SHOT = (uint8_t)0x00, LPS22HB_ODR_1HZ = (uint8_t)0x10, LPS22HB_ODR_10HZ = (uint8_t)0x20, LPS22HB_ODR_25HZ = (uint8_t)0x30,
  LPS22HB_ODR_50HZ = (uint8_t)0x40, LPS22HB_ODR_75HZ = (uint8_t)0x50
}
 

Output data rate configuration.

More...
enum  LPS22HB_LPF_Cutoff_et { LPS22HB_ODR_9 = (uint8_t)0x00, LPS22HB_ODR_20 = (uint8_t)0x04 }
 

Low Pass Filter Cutoff Configuration.

More...
enum  LPS22HB_Bdu_et { LPS22HB_BDU_CONTINUOUS_UPDATE = (uint8_t)0x00, LPS22HB_BDU_NO_UPDATE = (uint8_t)0x02 }
 

Block data update.

More...
enum  LPS22HB_SPIMode_et
 

LPS22HB Spi Mode configuration.

More...
enum  LPS22HB_InterruptActiveLevel_et
 

LPS22HB Interrupt Active Level Configuration (on High or Low)

More...
enum  LPS22HB_OutputType_et
 

LPS22HB Push-pull/Open Drain selection on Interrupt pads.

More...
enum  LPS22HB_OutputSignalConfig_et
 

Data Signal on INT pad control bits.

More...
enum  LPS22HB_CTE_et
 

LPS22HB Clock Tree configuration.

More...
enum  LPS22HB_FifoMode_et {
  LPS22HB_FIFO_BYPASS_MODE = (uint8_t)0x00, LPS22HB_FIFO_MODE = (uint8_t)0x20, LPS22HB_FIFO_STREAM_MODE = (uint8_t)0x40, LPS22HB_FIFO_TRIGGER_STREAMTOFIFO_MODE = (uint8_t)0x60,
  LPS22HB_FIFO_TRIGGER_BYPASSTOSTREAM_MODE = (uint8_t)0x80, LPS22HB_FIFO_TRIGGER_BYPASSTOFIFO_MODE = (uint8_t)0xE0
}
 

LPS22HB Fifo Mode.

More...

Functions

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.
LPS22HB_Error_et LPS22HB_Get_DriverVersion (LPS22HB_driverVersion_st *Version)
 Get the LPS22HB driver version.
LPS22HB_Error_et LPS22HB_Init (void *handle)
 Initialization function for LPS22HB.
LPS22HB_Error_et LPS22HB_DeInit (void *handle)
 DeInit the LPS2Hb driver.
LPS22HB_Error_et LPS22HB_Get_DeviceID (void *handle, uint8_t *deviceid)
 Read identification code by WHO_AM_I register.
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 Update mode.
LPS22HB_Error_et LPS22HB_Get_Bdu (void *handle, LPS22HB_Bdu_et *bdu)
 Get Block Data Update 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_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 BOOT.
LPS22HB_Error_et LPS22HB_Set_FifoModeUse (void *handle, LPS22HB_State_et status)
 Enable or Disable FIFO.
LPS22HB_Error_et LPS22HB_Set_FifoWatermarkLevelUse (void *handle, LPS22HB_State_et status)
 Enable or 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_StartOneShotMeasurement (void *handle)
 Set One Shot bit to start a new conversion (ODR mode has to be 000)
LPS22HB_Error_et LPS22HB_Set_I2C (void *handle, LPS22HB_State_et i2cstate)
 Enable/Disable I2C.
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)
 Set Push-pull/open drain selection on interrupt pads.
LPS22HB_Error_et LPS22HB_Set_InterruptControlConfig (void *handle, LPS22HB_OutputSignalConfig_et config)
 Set Data signal on INT1 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.
LPS22HB_Error_et LPS22HB_ResetAutoRifP (void *handle)
 Disable AutoRifP.
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.
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)
 Read LPS22HB output register, and calculate the raw temperature.
LPS22HB_Error_et LPS22HB_Get_Temperature (void *handle, int16_t *Tout)
 Read 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.
LPS22HB_Error_et LPS22HB_Set_PressureThreshold (void *handle, int16_t P_ths)
 Set the threshold value used for pressure interrupt generation.
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 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_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.
LPS22HB_Error_et LPS22HB_Set_ClockTreeConfifuration (void *handle, LPS22HB_CTE_et mode)
 Clock Tree Confoguration.

Detailed Description

LPS22HB driver header file.

Author:
HESA Application Team
Version:
V1.1
Date:
10-August-2016
Attention:

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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 LPS22HB_driver.h.