|
ChibiOS 21.11.4
|

LPS22HB data structures and types. | |
| enum | lps22hb_sad_t { LPS22HB_SAD_GND = 0x5C , LPS22HB_SAD_VCC = 0x5D } |
| LPS22HB slave address. More... | |
| enum | lps22hb_odr_t { LPS22HB_ODR_PD = 0x00 , LPS22HB_ODR_1HZ = 0x10 , LPS22HB_ODR_10HZ = 0x20 , LPS22HB_ODR_25HZ = 0x30 , LPS22HB_ODR_50HZ = 0x40 , LPS22HB_ODR_75HZ = 0x50 } |
| LPS22HB output data rate and bandwidth. More... | |
| enum | lps22hb_lp_t { LPS22HB_LP_DISABLED = 0x00 , LPS22HB_LP_ODR_9 = 0x08 , LPS22HB_LP_ODR_20 = 0x0C } |
| LPS22HB pressure resolution. More... | |
| enum | lps22hb_bdu_t { LPS22HB_BDU_CONTINUOUS = 0x00 , LPS22HB_BDU_BLOCKED = 0x40 } |
| LPS22HB block data update. More... | |
| enum | lps22hb_state_t { LPS22HB_UNINIT = 0 , LPS22HB_STOP = 1 , LPS22HB_READY = 2 } |
| Driver state machine possible states. More... | |
| typedef struct LPS22HBDriver | LPS22HBDriver |
| Structure representing a LPS22HB driver. | |
| #define | _lps22hb_methods_alone |
LPS22HB specific methods. | |
| #define | _lps22hb_methods |
LPS22HB specific methods with inherited ones. | |
| #define | _lps22hb_data |
LPS22HBDriver specific data. | |
Version identification | |
| #define | EX_LPS22HB_VERSION "1.0.2" |
| LPS22HB driver version string. | |
| #define | EX_LPS22HB_MAJOR 1 |
| LPS22HB driver version major number. | |
| #define | EX_LPS22HB_MINOR 0 |
| LPS22HB driver version minor number. | |
| #define | EX_LPS22HB_PATCH 2 |
| LPS22HB driver version patch number. | |
| #define | LPS22HB_BARO_NUMBER_OF_AXES 1U |
| LPS22HB barometer subsystem characteristics. | |
| #define | LPS22HB_BARO_SENS 0.00024414f |
| #define | LPS22HB_BARO_BIAS 0.0f |
| #define | LPS22HB_THERMO_NUMBER_OF_AXES 1U |
| LPS22HB thermometer subsystem characteristics. | |
| #define | LPS22HB_THERMO_SENS 0.01f |
| #define | LPS22HB_THERMO_BIAS 0.0f |
LPS22HB communication interfaces related bit masks | |
| #define | LPS22HB_DI_MASK 0xFF |
| #define | LPS22HB_DI(n) |
| #define | LPS22HB_AD_MASK 0x3F |
| #define | LPS22HB_AD(n) |
| #define | LPS22HB_MS (1 << 6) |
| #define | LPS22HB_RW (1 << 7) |
| #define | LPS22HB_SUB_MS (1 << 7) |
LPS22HB register addresses | |
| #define | LPS22HB_AD_INT_CFG 0x0B |
| #define | LPS22HB_AD_THS_P_L 0x0C |
| #define | LPS22HB_AD_THS_P_H 0x0D |
| #define | LPS22HB_AD_WHO_AM_I 0x0F |
| #define | LPS22HB_AD_CTRL_REG1 0x10 |
| #define | LPS22HB_AD_CTRL_REG2 0x11 |
| #define | LPS22HB_AD_CTRL_REG3 0x12 |
| #define | LPS22HB_AD_FIFO_CTRL 0x14 |
| #define | LPS22HB_AD_REF_P_XL 0x15 |
| #define | LPS22HB_AD_REF_P_L 0x16 |
| #define | LPS22HB_AD_REF_P_H 0x17 |
| #define | LPS22HB_AD_RPDS_L 0x18 |
| #define | LPS22HB_AD_RPDS_H 0x19 |
| #define | LPS22HB_AD_RES_CONF 0x1A |
| #define | LPS22HB_AD_INT_SRC 0x25 |
| #define | LPS22HB_AD_FIFO_SRC 0x26 |
| #define | LPS22HB_AD_STATUS_REG 0x27 |
| #define | LPS22HB_AD_PRESS_OUT_XL 0x28 |
| #define | LPS22HB_AD_PRESS_OUT_L 0x29 |
| #define | LPS22HB_AD_PRESS_OUT_H 0x2A |
| #define | LPS22HB_AD_TEMP_OUT_L 0x2B |
| #define | LPS22HB_AD_TEMP_OUT_H 0x2C |
| #define | LPS22HB_AD_LPFP_RES 0x33 |
LPS22HB_INT_CFG register bits definitions | |
| #define | LPS22HB_INT_CFG_MASK 0xFF |
| #define | LPS22HB_INT_CFG_PHE (1 << 0) |
| #define | LPS22HB_INT_CFG_PLE (1 << 1) |
| #define | LPS22HB_INT_CFG_LIR (1 << 2) |
| #define | LPS22HB_INT_CFG_DIFF_EN (1 << 3) |
| #define | LPS22HB_INT_CFG_RESET_AZ (1 << 4) |
| #define | LPS22HB_INT_CFG_AUTOZERO (1 << 5) |
| #define | LPS22HB_INT_CFG_RESET_ARP (1 << 6) |
| #define | LPS22HB_INT_CFG_AUTORIFP (1 << 7) |
LPS22HB_CTRL_REG1 register bits definitions | |
| #define | LPS22HB_CTRL_REG1_MASK 0x7F |
| #define | LPS22HB_CTRL_REG1_SIM (1 << 0) |
| #define | LPS22HB_CTRL_REG1_BDU (1 << 1) |
| #define | LPS22HB_CTRL_REG1_LPFP_CFG (1 << 2) |
| #define | LPS22HB_CTRL_REG1_LPFP_EN (1 << 3) |
| #define | LPS22HB_CTRL_REG1_ODR0 (1 << 4) |
| #define | LPS22HB_CTRL_REG1_ODR1 (1 << 5) |
| #define | LPS22HB_CTRL_REG1_ODR2 (1 << 6) |
LPS22HB_CTRL_REG2 register bits definitions | |
| #define | LPS22HB_CTRL_REG2_MASK 0xFD |
| #define | LPS22HB_CTRL_REG2_ONE_SHOT (1 << 0) |
| #define | LPS22HB_CTRL_REG2_SWRESET (1 << 2) |
| #define | LPS22HB_CTRL_REG2_I2C_DIS (1 << 3) |
| #define | LPS22HB_CTRL_REG2_IF_ADD_INC (1 << 4) |
| #define | LPS22HB_CTRL_REG2_STOP_ON_FTH (1 << 5) |
| #define | LPS22HB_CTRL_REG2_FIFO_EN (1 << 6) |
| #define | LPS22HB_CTRL_REG2_BOOT (1 << 7) |
LPS22HB_CTRL_REG3 register bits definitions | |
| #define | LPS22HB_CTRL_REG3_MASK 0xFF |
| #define | LPS22HB_CTRL_REG3_INT_S1 (1 << 0) |
| #define | LPS22HB_CTRL_REG3_INT_S2 (1 << 1) |
| #define | LPS22HB_CTRL_REG3_DRDY (1 << 2) |
| #define | LPS22HB_CTRL_REG3_F_OVR (1 << 3) |
| #define | LPS22HB_CTRL_REG3_F_FTH (1 << 4) |
| #define | LPS22HB_CTRL_REG3_F_FSS5 (1 << 5) |
| #define | LPS22HB_CTRL_REG3_PP_OD (1 << 6) |
| #define | LPS22HB_CTRL_REG3_INT_H_L (1 << 7) |
LPS22HB_INT_SRC register bits definitions | |
| #define | LPS22HB_INT_SRC_MASK 0x87 |
| #define | LPS22HB_INT_SRC_PH (1 << 0) |
| #define | LPS22HB_INT_SRC_PL (1 << 1) |
| #define | LPS22HB_INT_SRC_IA (1 << 2) |
| #define | LPS22HB_INT_SRC_BOOT_STATUS (1 << 8) |
Configuration options | |
| #define | LPS22HB_USE_SPI FALSE |
| LPS22HB SPI interface switch. | |
| #define | LPS22HB_SHARED_SPI FALSE |
| LPS22HB shared SPI switch. | |
| #define | LPS22HB_USE_I2C TRUE |
| LPS22HB I2C interface switch. | |
| #define | LPS22HB_SHARED_I2C FALSE |
| LPS22HB shared I2C switch. | |
| #define | LPS22HB_USE_ADVANCED FALSE |
| LPS22HB advanced configurations switch. | |
Data Structures | |
| struct | LPS22HBConfig |
| LPS22HB configuration structure. More... | |
| struct | LPS22HBVMT |
LPS22HB virtual methods table. More... | |
| struct | LPS22HBDriver |
| LPS22HB 2-axis barometer/thermometer class. More... | |
Macros | |
| #define | lps22hbI2CWriteRegister(i2cp, sad, txbuf, n) |
| Writes a value into a register using I2C. | |
| #define | lps22hbBarometerGetAxesNumber(devp) |
| Return the number of axes of the BaseBarometer. | |
| #define | lps22hbBarometerReadRaw(devp, axes) |
| Retrieves raw data from the BaseBarometer. | |
| #define | lps22hbBarometerReadCooked(devp, axes) |
| Retrieves cooked data from the BaseBarometer. | |
| #define | lps22hbBarometerSetBias(devp, bp) |
| Set bias values for the BaseBarometer. | |
| #define | lps22hbBarometerResetBias(devp) |
| Reset bias values for the BaseBarometer. | |
| #define | lps22hbBarometerSetSensitivity(devp, sp) |
| Set sensitivity values for the BaseBarometer. | |
| #define | lps22hbBarometerResetSensitivity(devp) |
| Reset sensitivity values for the BaseBarometer. | |
| #define | lps22hbThermometerGetAxesNumber(devp) |
| Return the number of axes of the BaseThermometer. | |
| #define | lps22hbThermometerReadRaw(devp, axes) |
| Retrieves raw data from the BaseThermometer. | |
| #define | lps22hbThermometerReadCooked(devp, axes) |
| Retrieves cooked data from the BaseThermometer. | |
| #define | lps22hbThermometerSetBias(devp, bp) |
| Set bias values for the BaseThermometer. | |
| #define | lps22hbThermometerResetBias(devp) |
| Reset bias values for the BaseThermometer. | |
| #define | lps22hbThermometerSetSensitivity(devp, sp) |
| Set sensitivity values for the BaseThermometer. | |
| #define | lps22hbThermometerResetSensitivity(devp) |
| Reset sensitivity values for the BaseThermometer. | |
Functions | |
| static msg_t | lps22hbI2CReadRegister (I2CDriver *i2cp, lps22hb_sad_t sad, uint8_t reg, uint8_t *rxbuf, size_t n) |
| Reads registers value using I2C. | |
| static size_t | baro_get_axes_number (void *ip) |
| Return the number of axes of the BaseBarometer. | |
| static msg_t | baro_read_raw (void *ip, int32_t axes[]) |
| Retrieves raw data from the BaseBarometer. | |
| static msg_t | baro_read_cooked (void *ip, float axes[]) |
| Retrieves cooked data from the BaseBarometer. | |
| static msg_t | baro_set_bias (void *ip, float *bp) |
| Set bias values for the BaseBarometer. | |
| static msg_t | baro_reset_bias (void *ip) |
| Reset bias values for the BaseBarometer. | |
| static msg_t | baro_set_sensitivity (void *ip, float *sp) |
| Set sensitivity values for the BaseBarometer. | |
| static msg_t | baro_reset_sensitivity (void *ip) |
| Reset sensitivity values for the BaseBarometer. | |
| static size_t | thermo_get_axes_number (void *ip) |
| Return the number of axes of the BaseThermometer. | |
| static msg_t | thermo_read_raw (void *ip, int32_t axes[]) |
| Retrieves raw data from the BaseThermometer. | |
| static msg_t | thermo_read_cooked (void *ip, float *axis) |
| Retrieves cooked data from the BaseThermometer. | |
| static msg_t | thermo_set_bias (void *ip, float *bp) |
| Set bias values for the BaseThermometer. | |
| static msg_t | thermo_reset_bias (void *ip) |
| Reset bias values for the BaseThermometer. | |
| static msg_t | thermo_set_sensitivity (void *ip, float *sp) |
| Set sensitivity values for the BaseThermometer. | |
| static msg_t | thermo_reset_sensitivity (void *ip) |
| Reset sensitivity values for the BaseThermometer. | |
| void | lps22hbObjectInit (LPS22HBDriver *devp) |
| Initializes an instance. | |
| void | lps22hbStart (LPS22HBDriver *devp, const LPS22HBConfig *config) |
| Configures and activates LPS22HB Complex Driver peripheral. | |
| void | lps22hbStop (LPS22HBDriver *devp) |
| Deactivates the LPS22HB Complex Driver peripheral. | |
Variables | |
| static const struct LPS22HBVMT | vmt_device |
| static const struct BaseBarometerVMT | vmt_barometer |
| static const struct BaseThermometerVMT | vmt_thermometer |
| #define lps22hbI2CWriteRegister | ( | i2cp, | |
| sad, | |||
| txbuf, | |||
| n ) |
Writes a value into a register using I2C.
| [in] | i2cp | pointer to the I2C interface |
| [in] | sad | slave address without R bit |
| [in] | txbuf | buffer containing sub-address value in first position and values to write |
| [in] | n | size of txbuf less one (not considering the first element) |
Definition at line 84 of file lps22hb.c.
Referenced by lps22hbStart(), and lps22hbStop().
| #define EX_LPS22HB_VERSION "1.0.2" |
| #define EX_LPS22HB_MAJOR 1 |
| #define EX_LPS22HB_MINOR 0 |
| #define EX_LPS22HB_PATCH 2 |
| #define LPS22HB_BARO_NUMBER_OF_AXES 1U |
LPS22HB barometer subsystem characteristics.
Definition at line 72 of file lps22hb.h.
Referenced by baro_get_axes_number(), and lps22hbObjectInit().
| #define LPS22HB_BARO_SENS 0.00024414f |
Definition at line 74 of file lps22hb.h.
Referenced by baro_reset_bias(), baro_reset_sensitivity(), and lps22hbStart().
| #define LPS22HB_BARO_BIAS 0.0f |
Definition at line 75 of file lps22hb.h.
Referenced by lps22hbStart().
| #define LPS22HB_THERMO_NUMBER_OF_AXES 1U |
LPS22HB thermometer subsystem characteristics.
Definition at line 85 of file lps22hb.h.
Referenced by lps22hbObjectInit(), and thermo_get_axes_number().
| #define LPS22HB_THERMO_SENS 0.01f |
Definition at line 87 of file lps22hb.h.
Referenced by lps22hbStart(), and thermo_reset_sensitivity().
| #define LPS22HB_THERMO_BIAS 0.0f |
Definition at line 88 of file lps22hb.h.
Referenced by lps22hbStart(), and thermo_reset_bias().
| #define LPS22HB_AD_CTRL_REG1 0x10 |
Definition at line 113 of file lps22hb.h.
Referenced by lps22hbStart(), and lps22hbStop().
| #define LPS22HB_AD_CTRL_REG2 0x11 |
Definition at line 114 of file lps22hb.h.
Referenced by lps22hbStart().
| #define LPS22HB_AD_PRESS_OUT_XL 0x28 |
Definition at line 126 of file lps22hb.h.
Referenced by baro_read_raw().
| #define LPS22HB_AD_TEMP_OUT_L 0x2B |
Definition at line 129 of file lps22hb.h.
Referenced by thermo_read_raw().
| #define LPS22HB_CTRL_REG2_IF_ADD_INC (1 << 4) |
Definition at line 171 of file lps22hb.h.
Referenced by lps22hbStart().
| #define LPS22HB_USE_SPI FALSE |
| #define LPS22HB_SHARED_SPI FALSE |
| #define LPS22HB_USE_I2C TRUE |
| #define LPS22HB_SHARED_I2C FALSE |
| #define LPS22HB_USE_ADVANCED FALSE |
| #define _lps22hb_methods_alone |
| #define _lps22hb_methods |
| #define _lps22hb_data |
LPS22HBDriver specific data.
| #define lps22hbBarometerGetAxesNumber | ( | devp | ) |
Return the number of axes of the BaseBarometer.
| [in] | devp | pointer to LPS22HBDriver. |
| #define lps22hbBarometerReadRaw | ( | devp, | |
| axes ) |
Retrieves raw data from the BaseBarometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lps22hbBarometerReadCooked | ( | devp, | |
| axes ) |
Retrieves cooked data from the BaseBarometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [out] | axes | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lps22hbBarometerSetBias | ( | devp, | |
| bp ) |
Set bias values for the BaseBarometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
| #define lps22hbBarometerResetBias | ( | devp | ) |
Reset bias values for the BaseBarometer.
| [in] | devp | pointer to LPS22HBDriver. |
| MSG_OK | if the function succeeded. |
| #define lps22hbBarometerSetSensitivity | ( | devp, | |
| sp ) |
Set sensitivity values for the BaseBarometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
| #define lps22hbBarometerResetSensitivity | ( | devp | ) |
Reset sensitivity values for the BaseBarometer.
| [in] | devp | pointer to LPS22HBDriver. |
| MSG_OK | if the function succeeded. |
| #define lps22hbThermometerGetAxesNumber | ( | devp | ) |
Return the number of axes of the BaseThermometer.
| [in] | devp | pointer to LPS22HBDriver. |
| #define lps22hbThermometerReadRaw | ( | devp, | |
| axes ) |
Retrieves raw data from the BaseThermometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lps22hbThermometerReadCooked | ( | devp, | |
| axes ) |
Retrieves cooked data from the BaseThermometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [out] | axes | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lps22hbThermometerSetBias | ( | devp, | |
| bp ) |
Set bias values for the BaseThermometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
| #define lps22hbThermometerResetBias | ( | devp | ) |
Reset bias values for the BaseThermometer.
| [in] | devp | pointer to LPS22HBDriver. |
| MSG_OK | if the function succeeded. |
| #define lps22hbThermometerSetSensitivity | ( | devp, | |
| sp ) |
Set sensitivity values for the BaseThermometer.
| [in] | devp | pointer to LPS22HBDriver. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
| #define lps22hbThermometerResetSensitivity | ( | devp | ) |
Reset sensitivity values for the BaseThermometer.
| [in] | devp | pointer to LPS22HBDriver. |
| MSG_OK | if the function succeeded. |
| typedef struct LPS22HBDriver LPS22HBDriver |
| enum lps22hb_sad_t |
| enum lps22hb_odr_t |
| enum lps22hb_lp_t |
| enum lps22hb_bdu_t |
| enum lps22hb_state_t |
|
static |
Reads registers value using I2C.
| [in] | i2cp | pointer to the I2C interface |
| [in] | sad | slave address without R bit |
| [in] | reg | first sub-register address |
| [out] | rxbuf | pointer to an output buffer |
| [in] | n | number of consecutive register to read |
Definition at line 63 of file lps22hb.c.
References i2cMasterTransmitTimeout(), and TIME_INFINITE.
Referenced by baro_read_raw(), and thermo_read_raw().

|
static |
Return the number of axes of the BaseBarometer.
| [in] | ip | pointer to BaseBarometer interface. |
Definition at line 96 of file lps22hb.c.
References LPS22HB_BARO_NUMBER_OF_AXES.
|
static |
Retrieves raw data from the BaseBarometer.
| [in] | ip | pointer to BaseBarometer interface. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 118 of file lps22hb.c.
References I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), LPS22HB_AD_PRESS_OUT_XL, LPS22HB_READY, lps22hbI2CReadRegister(), MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by baro_read_cooked().

|
static |
Retrieves cooked data from the BaseBarometer.
| [in] | ip | pointer to BaseBarometer interface. |
| [out] | axes | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 170 of file lps22hb.c.
References baro_read_raw(), LPS22HB_READY, objGetInstance, osalDbgAssert, and osalDbgCheck.

|
static |
Set bias values for the BaseBarometer.
| [in] | ip | pointer to BaseBarometer interface. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 205 of file lps22hb.c.
References LPS22HB_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset bias values for the BaseBarometer.
| [in] | ip | pointer to BaseBarometer interface. |
| MSG_OK | if the function succeeded. |
Definition at line 231 of file lps22hb.c.
References LPS22HB_BARO_SENS, LPS22HB_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Set sensitivity values for the BaseBarometer.
| [in] | ip | pointer to BaseBarometer interface. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
Definition at line 259 of file lps22hb.c.
References LPS22HB_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset sensitivity values for the BaseBarometer.
| [in] | ip | pointer to BaseBarometer interface. |
| MSG_OK | if the function succeeded. |
Definition at line 284 of file lps22hb.c.
References LPS22HB_BARO_SENS, LPS22HB_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Return the number of axes of the BaseThermometer.
| [in] | ip | pointer to BaseThermometer interface. |
Definition at line 307 of file lps22hb.c.
References LPS22HB_THERMO_NUMBER_OF_AXES.
|
static |
Retrieves raw data from the BaseThermometer.
| [in] | ip | pointer to BaseThermometer interface. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 329 of file lps22hb.c.
References I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), LPS22HB_AD_TEMP_OUT_L, LPS22HB_READY, lps22hbI2CReadRegister(), MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by thermo_read_cooked().

|
static |
Retrieves cooked data from the BaseThermometer.
| [in] | ip | pointer to BaseThermometer interface. |
| [out] | axis | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 383 of file lps22hb.c.
References LPS22HB_READY, objGetInstance, osalDbgAssert, osalDbgCheck, and thermo_read_raw().

|
static |
Set bias values for the BaseThermometer.
| [in] | ip | pointer to BaseThermometer interface. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
Definition at line 415 of file lps22hb.c.
References LPS22HB_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset bias values for the BaseThermometer.
| [in] | ip | pointer to BaseThermometer interface. |
| MSG_OK | if the function succeeded. |
Definition at line 442 of file lps22hb.c.
References LPS22HB_READY, LPS22HB_THERMO_BIAS, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Set sensitivity values for the BaseThermometer.
| [in] | ip | pointer to BaseThermometer interface. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
Definition at line 471 of file lps22hb.c.
References LPS22HB_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset sensitivity values for the BaseThermometer.
| [in] | ip | pointer to BaseThermometer interface. |
| MSG_OK | if the function succeeded. |
Definition at line 497 of file lps22hb.c.
References LPS22HB_READY, LPS22HB_THERMO_SENS, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
| void lps22hbObjectInit | ( | LPS22HBDriver * | devp | ) |
Initializes an instance.
| [out] | devp | pointer to the LPS22HBDriver object |
Definition at line 543 of file lps22hb.c.
References LPS22HBDriver::baro_if, LPS22HB_BARO_NUMBER_OF_AXES, LPS22HB_STOP, LPS22HB_THERMO_NUMBER_OF_AXES, LPS22HBDriver::thermo_if, BaseBarometer::vmt, BaseThermometer::vmt, LPS22HBDriver::vmt, vmt_barometer, vmt_device, and vmt_thermometer.
| void lps22hbStart | ( | LPS22HBDriver * | devp, |
| const LPS22HBConfig * | config ) |
Configures and activates LPS22HB Complex Driver peripheral.
| [in] | devp | pointer to the LPS22HBDriver object |
| [in] | config | pointer to the LPS22HBConfig object |
Definition at line 565 of file lps22hb.c.
References hal_i2c_driver::config, i2cAcquireBus(), LPS22HBConfig::i2cp, i2cReleaseBus(), i2cStart(), LPS22HB_AD_CTRL_REG1, LPS22HB_AD_CTRL_REG2, LPS22HB_BARO_BIAS, LPS22HB_BARO_SENS, LPS22HB_CTRL_REG2_IF_ADD_INC, LPS22HB_READY, LPS22HB_STOP, LPS22HB_THERMO_BIAS, LPS22HB_THERMO_SENS, lps22hbI2CWriteRegister, osalDbgAssert, osalDbgCheck, and osalThreadSleepMilliseconds.

| void lps22hbStop | ( | LPS22HBDriver * | devp | ) |
Deactivates the LPS22HB Complex Driver peripheral.
| [in] | devp | pointer to the LPS22HBDriver object |
Definition at line 659 of file lps22hb.c.
References i2cAcquireBus(), i2cReleaseBus(), i2cStart(), i2cStop(), LPS22HB_AD_CTRL_REG1, LPS22HB_READY, LPS22HB_STOP, lps22hbI2CWriteRegister, osalDbgAssert, and osalDbgCheck.

|
static |
|
static |
Definition at line 518 of file lps22hb.c.
Referenced by lps22hbObjectInit(), and lps25hObjectInit().
|
static |