|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Go to the source code of this file.
Data Structures | |
| struct | bar_ils22qs_t |
| Measurement data produced by the ILPS22QS barometric pressure sensor. Populated by bar_ils22qs_Read(); check IsDataValid before use. More... | |
Functions | |
| int8_t | bar_ils22qs_Is (I2C_HandleTypeDef *hi2c, int8_t tryInit) |
| Check if the ILPS22QS barometric pressure sensor is present on the I2C bus. | |
| HAL_StatusTypeDef | bar_ils22qs_Init (I2C_HandleTypeDef *hi2c) |
| Initialise the ILPS22QS sensor and verify it is present on the I2C bus. The sensor is put into low-power standby mode after verification. | |
| HAL_StatusTypeDef | bar_ils22qs_On (I2C_HandleTypeDef *hi2c) |
| turn on sensor | |
| HAL_StatusTypeDef | bar_ils22qs_Off (I2C_HandleTypeDef *hi2c) |
| turn off sensor | |
| HAL_StatusTypeDef | bar_ils22qs_Read (I2C_HandleTypeDef *hi2c) |
| read value from sensor, pressure and temperature. Sensor must be turned on before | |
| void | bar_ils22qs_LogData (char *buf) |
| log data to buffer | |
Variables | |
| bar_ils22qs_t | _bar_ils22qsData |
| Live measurement data from the ILPS22QS sensor; updated by bar_ils22qs_Read(). | |
| bar_ils22qs_t | _bck_bar_ils22qsData |
| Snapshot copy of the last completed ILPS22QS measurement; used for LoRaWAN transmission. | |
| HAL_StatusTypeDef bar_ils22qs_Init | ( | I2C_HandleTypeDef * | hi2c | ) |
Initialise the ILPS22QS sensor and verify it is present on the I2C bus. The sensor is put into low-power standby mode after verification.
| hi2c | Pointer to the I2C handle. |
| HAL_OK | – sensor found and initialised successfully. |
| HAL_ERROR | – sensor not detected on the bus or initialisation failed. |
Definition at line 101 of file bar_ils22qs.c.
References _isBarometer, bar_ils22qs_Off(), bar_ils22qs_On(), I2C_IsDeviceReadyMT(), ILPS22QS_I2C_ADDR, ILPS22QS_ID, and REG_WHO_AM_I.
Referenced by bar_ils22qs_Is().
| int8_t bar_ils22qs_Is | ( | I2C_HandleTypeDef * | hi2c, |
| int8_t | tryInit ) |
Check if the ILPS22QS barometric pressure sensor is present on the I2C bus.
| hi2c | Pointer to the I2C handle. |
| tryInit | 1 – attempt to (re-)initialise if not yet done; 0 – no retry. |
| 1 | – sensor is present and initialised. |
| 0 | – sensor not detected. |
Definition at line 67 of file bar_ils22qs.c.
References _isBarometer, and bar_ils22qs_Init().
| void bar_ils22qs_LogData | ( | char * | buf | ) |
log data to buffer
Definition at line 206 of file bar_ils22qs.c.
References _bar_ils22qsData, PRIf_02, and PRIf_02D.
| HAL_StatusTypeDef bar_ils22qs_Off | ( | I2C_HandleTypeDef * | hi2c | ) |
turn off sensor
| HAL_OK,HAL_ERROR |
Definition at line 94 of file bar_ils22qs.c.
References barometer_onOff().
Referenced by bar_ils22qs_Init().
| HAL_StatusTypeDef bar_ils22qs_On | ( | I2C_HandleTypeDef * | hi2c | ) |
turn on sensor
| HAL_OK,HAL_ERROR |
Definition at line 74 of file bar_ils22qs.c.
References _bar_ils22qsData, _memsMainBlock, barometer_onOff(), and mems_WriteMainBlock().
Referenced by bar_ils22qs_Init().
| HAL_StatusTypeDef bar_ils22qs_Read | ( | I2C_HandleTypeDef * | hi2c | ) |
read value from sensor, pressure and temperature. Sensor must be turned on before
| HAL_OK | - have data, HAL_BUSY - next reading in progress, HAL_TIMEOUT - sensor is not turned on HAL_ERROR - error |
Definition at line 129 of file bar_ils22qs.c.
References _bar_ils22qsData, _isBarometer, _systemParams, _tmphm_sht45Data, bar_ils22qs_IsOn(), ILPS22QS_I2C_ADDR, REG_PRESS_OFFSET, and REG_PRESS_OUT_XL.
|
extern |
Live measurement data from the ILPS22QS sensor; updated by bar_ils22qs_Read().
Definition at line 31 of file bar_ils22qs.c.
Referenced by bar_ils22qs_LogData(), bar_ils22qs_On(), bar_ils22qs_Read(), and sensors_CopyToBck().
|
extern |
Snapshot copy of the last completed ILPS22QS measurement; used for LoRaWAN transmission.
Definition at line 32 of file bar_ils22qs.c.
Referenced by sensors_CayennelFromBckData(), sensors_CopyToBck(), sensors_ReadToBckFromDataBlock(), and sensors_WriteFromBckToDataBlock().