|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Go to the source code of this file.
Data Structures | |
| struct | bar_bmp585_t |
| Measurement data produced by the BMP585 barometric pressure sensor. Populated by bar_bmp585_Read(); check IsDataValid before use. More... | |
Functions | |
| int8_t | bar_bmp585_Is (I2C_HandleTypeDef *hi2c, int8_t tryInit) |
| Check if sensor is present. | |
| HAL_StatusTypeDef | bar_bmp585_Init (I2C_HandleTypeDef *hi2c) |
| Initialize sensor, check if it really is this sensor. After check the sensor is turned off to save power. | |
| HAL_StatusTypeDef | bar_bmp585_On (I2C_HandleTypeDef *hi2c) |
| Turn on sensor - wakeup the sensor and start to processing of pressure measure. | |
| HAL_StatusTypeDef | bar_bmp585_Off (I2C_HandleTypeDef *hi2c) |
| Turn off sensor - stop measure and put sensor in very deep sleep mode. | |
| HAL_StatusTypeDef | bar_bmp585_Read (I2C_HandleTypeDef *hi2c) |
| Read value from sensor, pressure and temperature. Sensor must be turned on before. | |
| void | bar_bmp585_LogData (char *buf) |
| Log data to buffer. | |
Variables | |
| bar_bmp585_t | _bar_bmp585Data |
| Live measurement data from the BMP585 sensor; updated by bar_bmp585_Read(). | |
| bar_bmp585_t | _bck_bar_bmp585Data |
| Snapshot copy of the last completed BMP585 measurement; used for LoRaWAN transmission. | |
| HAL_StatusTypeDef bar_bmp585_Init | ( | I2C_HandleTypeDef * | hi2c | ) |
Initialize sensor, check if it really is this sensor. After check the sensor is turned off to save power.
| hi2c | - I2C handle |
| HAL_OK,HAL_ERROR |
Definition at line 119 of file bar_bmp585.c.
References _isBarometer, bar_bmp585_Off(), bar_bmp585_On(), BMP585_CHIP_ID, BMP585_I2C_ADDR, I2C_IsDeviceReadyMT(), REG_CHIP_ID, and REG_OSR_CONFIG.
Referenced by bar_bmp585_Is().
| int8_t bar_bmp585_Is | ( | I2C_HandleTypeDef * | hi2c, |
| int8_t | tryInit ) |
Check if sensor is present.
| hi2c | - I2C handle |
| tryInit | - in case sensor is not yet initialized, 1 - attempt to initialize again, 0 - no |
| 1 | - is present, 0 - is not |
Definition at line 89 of file bar_bmp585.c.
References _isBarometer, and bar_bmp585_Init().
| void bar_bmp585_LogData | ( | char * | buf | ) |
Log data to buffer.
| buf | - buffer to log data to |
Definition at line 219 of file bar_bmp585.c.
References _bar_bmp585Data, PRIf_02, and PRIf_02D.
| HAL_StatusTypeDef bar_bmp585_Off | ( | I2C_HandleTypeDef * | hi2c | ) |
Turn off sensor - stop measure and put sensor in very deep sleep mode.
| hi2c | - I2C handle |
| HAL_OK,HAL_ERROR |
Definition at line 112 of file bar_bmp585.c.
References barometer_onOff().
Referenced by bar_bmp585_Init().
| HAL_StatusTypeDef bar_bmp585_On | ( | I2C_HandleTypeDef * | hi2c | ) |
Turn on sensor - wakeup the sensor and start to processing of pressure measure.
| hi2c | - I2C handle |
| HAL_OK,HAL_ERROR |
Definition at line 96 of file bar_bmp585.c.
References _bar_bmp585Data, _memsMainBlock, barometer_onOff(), and mems_WriteMainBlock().
Referenced by bar_bmp585_Init().
| HAL_StatusTypeDef bar_bmp585_Read | ( | I2C_HandleTypeDef * | hi2c | ) |
Read value from sensor, pressure and temperature. Sensor must be turned on before.
| hi2c | - I2C handle |
| HAL_OK | - have data, HAL_BUSY - next reading in progress, HAL_TIMEOUT - sensor is not turned on HAL_ERROR - error |
Definition at line 154 of file bar_bmp585.c.
References _bar_bmp585Data, _isBarometer, _systemParams, _tmphm_sht45Data, bar_bmp585_IsOn(), BMP585_I2C_ADDR, REG_DATA_0, and REG_TEMP_DATA_0.
|
extern |
Live measurement data from the BMP585 sensor; updated by bar_bmp585_Read().
Definition at line 47 of file bar_bmp585.c.
Referenced by bar_bmp585_LogData(), bar_bmp585_On(), bar_bmp585_Read(), and sensors_CopyToBck().
|
extern |
Snapshot copy of the last completed BMP585 measurement; used for LoRaWAN transmission.
Definition at line 48 of file bar_bmp585.c.
Referenced by sensors_CayennelFromBckData(), sensors_CopyToBck(), sensors_ReadToBckFromDataBlock(), and sensors_WriteFromBckToDataBlock().