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: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_IKS01A1 by
LPS25H Class Reference
Class representing a LPS25H sensor component. More...
#include <lps25h_class.h>
Public Member Functions | |
| LPS25H (DevI2C &i2c) | |
| Constructor. | |
| virtual | ~LPS25H () |
| Destructor. | |
| virtual int | PowerOff (void) |
| Enter sensor shutdown mode. | |
| virtual int | Reset (void) |
| Reset sensor. | |
Protected Member Functions | |
| PRESSURE_StatusTypeDef | LPS25H_Init (PRESSURE_InitTypeDef *LPS25H_Init) |
| Set LPS25H Initialization. | |
| PRESSURE_StatusTypeDef | LPS25H_ReadID (uint8_t *p_id) |
| Read ID address of LPS25H. | |
| PRESSURE_StatusTypeDef | LPS25H_RebootCmd (void) |
| Reboot memory content of LPS25H. | |
| PRESSURE_StatusTypeDef | LPS25H_GetPressure (float *pfData) |
| Read LPS25H output register, and calculate the pressure in mbar. | |
| PRESSURE_StatusTypeDef | LPS25H_GetTemperature (float *pfData) |
| Read LPS25H output register, and calculate the temperature. | |
| PRESSURE_StatusTypeDef | LPS25H_PowerOff (void) |
| Enter the shutdown mode for LPS25H. | |
| void | LPS25H_SlaveAddrRemap (uint8_t SA0_Bit_Status) |
| Set the slave address according to SA0 bit. | |
| PRESSURE_StatusTypeDef | LPS25H_PowerOn (void) |
| Exit the shutdown mode for LPS25H. | |
| PRESSURE_StatusTypeDef | LPS25H_I2C_ReadRawPressure (int32_t *raw_press) |
| Read LPS25H output register, and calculate the raw pressure. | |
| PRESSURE_StatusTypeDef | LPS25H_I2C_ReadRawTemperature (int16_t *raw_data) |
| Read LPS25H output register, and calculate the raw temperature. | |
| void | LPS25H_IO_ITConfig (void) |
| Configures LPS25H interrupt lines for NUCLEO boards. | |
| PRESSURE_StatusTypeDef | LPS25H_IO_Init (void) |
| Configures LPS25H I2C interface. | |
| PRESSURE_StatusTypeDef | LPS25H_IO_Read (uint8_t *pBuffer, uint8_t RegisterAddr, uint16_t NumByteToRead) |
| Utility function to read data from LPS25H. | |
| PRESSURE_StatusTypeDef | LPS25H_IO_Write (uint8_t *pBuffer, uint8_t RegisterAddr, uint16_t NumByteToWrite) |
| Utility function to write data to LPS25H. | |
Detailed Description
Class representing a LPS25H sensor component.
Definition at line 51 of file lps25h_class.h.
Constructor & Destructor Documentation
| LPS25H | ( | DevI2C & | i2c ) |
Constructor.
- Parameters:
-
[in] i2c device I2C to be used for communication
Definition at line 56 of file lps25h_class.h.
| virtual ~LPS25H | ( | ) | [virtual] |
Destructor.
Definition at line 62 of file lps25h_class.h.
Member Function Documentation
| PRESSURE_StatusTypeDef LPS25H_GetPressure | ( | float * | pfData ) | [protected] |
Read LPS25H output register, and calculate the pressure in mbar.
- Parameters:
-
pfData the pressure value in mbar
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 196 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_GetTemperature | ( | float * | pfData ) | [protected] |
Read LPS25H output register, and calculate the temperature.
- Parameters:
-
pfData the temperature value
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 241 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_I2C_ReadRawPressure | ( | int32_t * | raw_press ) | [protected] |
Read LPS25H output register, and calculate the raw pressure.
- Parameters:
-
raw_press the pressure raw value
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 164 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_I2C_ReadRawTemperature | ( | int16_t * | raw_data ) | [protected] |
Read LPS25H output register, and calculate the raw temperature.
- Parameters:
-
raw_data the temperature raw value
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 215 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_Init | ( | PRESSURE_InitTypeDef * | LPS25H_Init ) | [protected] |
Set LPS25H Initialization.
- Parameters:
-
LPS25H_Init the configuration setting for the LPS25H
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 53 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_IO_Init | ( | void | ) | [protected] |
Configures LPS25H I2C interface.
- Returns:
- PRESSURE_OK in case of success, an error code otherwise
Definition at line 127 of file lps25h_class.h.
| void LPS25H_IO_ITConfig | ( | void | ) | [protected] |
Configures LPS25H interrupt lines for NUCLEO boards.
Definition at line 118 of file lps25h_class.h.
| PRESSURE_StatusTypeDef LPS25H_IO_Read | ( | uint8_t * | pBuffer, |
| uint8_t | RegisterAddr, | ||
| uint16_t | NumByteToRead | ||
| ) | [protected] |
Utility function to read data from LPS25H.
- Parameters:
-
[out] pBuffer pointer to the byte-array to read data in to [in] RegisterAddr specifies internal address register to read from. [in] NumByteToRead number of bytes to be read.
- Return values:
-
PRESSURE_OK if ok, PRESSURE_ERROR if an I2C error has occured
Definition at line 140 of file lps25h_class.h.
| PRESSURE_StatusTypeDef LPS25H_IO_Write | ( | uint8_t * | pBuffer, |
| uint8_t | RegisterAddr, | ||
| uint16_t | NumByteToWrite | ||
| ) | [protected] |
Utility function to write data to LPS25H.
- Parameters:
-
[in] pBuffer pointer to the byte-array data to send [in] RegisterAddr specifies internal address register to read from. [in] NumByteToWrite number of bytes to write.
- Return values:
-
PRESSURE_OK if ok, PRESSURE_ERROR if an I2C error has occured
Definition at line 161 of file lps25h_class.h.
| PRESSURE_StatusTypeDef LPS25H_PowerOff | ( | void | ) | [protected] |
Enter the shutdown mode for LPS25H.
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 285 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_PowerOn | ( | void | ) | [protected] |
Exit the shutdown mode for LPS25H.
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 258 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_ReadID | ( | uint8_t * | p_id ) | [protected] |
Read ID address of LPS25H.
- Parameters:
-
ht_id the pointer where the ID of the device is stored
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 122 of file lps25h_class.cpp.
| PRESSURE_StatusTypeDef LPS25H_RebootCmd | ( | void | ) | [protected] |
Reboot memory content of LPS25H.
- Return values:
-
PRESSURE_OK in case of success, an error code otherwise
Definition at line 136 of file lps25h_class.cpp.
| void LPS25H_SlaveAddrRemap | ( | uint8_t | SA0_Bit_Status ) | [protected] |
Set the slave address according to SA0 bit.
- Parameters:
-
SA0_Bit_Status LPS25H_SA0_LOW or LPS25H_SA0_HIGH
- Return values:
-
None
Definition at line 312 of file lps25h_class.cpp.
| virtual int PowerOff | ( | void | ) | [virtual] |
Enter sensor shutdown mode.
- Returns:
- 0 in case of success, an error code otherwise
Definition at line 73 of file lps25h_class.h.
| virtual int Reset | ( | void | ) | [virtual] |
Reset sensor.
- Returns:
- 0 in case of success, an error code otherwise
Definition at line 85 of file lps25h_class.h.
Generated on Thu Jul 14 2022 01:14:01 by
1.7.2
