L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
sys_sensors.h
Go to the documentation of this file.
1/* USER CODE BEGIN Header */
2/**
3 ******************************************************************************
4 * @file sys_sensors.h
5 * @author MCD Application Team
6 * @brief Header for sensors application
7 ******************************************************************************
8 * @attention
9 *
10 * Copyright (c) 2026 STMicroelectronics.
11 * All rights reserved.
12 *
13 * This software is licensed under terms that can be found in the LICENSE file
14 * in the root directory of this software component.
15 * If no LICENSE file comes with this software, it is provided AS-IS.
16 *
17 ******************************************************************************
18 */
19/* USER CODE END Header */
20
21/* Define to prevent recursive inclusion -------------------------------------*/
22#ifndef __SENSORS_H__
23#define __SENSORS_H__
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28/* Includes ------------------------------------------------------------------*/
29
30/* USER CODE BEGIN Includes */
31
32/* USER CODE END Includes */
33
34/* Exported types ------------------------------------------------------------*/
35/**
36 * Sensor data parameters
37 */
38typedef struct
39{
40 float pressure; /*!< in mbar */
41 float temperature; /*!< in degC */
42 float humidity; /*!< in % */
43 int32_t latitude; /*!< latitude converted to binary */
44 int32_t longitude; /*!< longitude converted to binary */
45 int16_t altitudeGps; /*!< in m */
46 int16_t altitudeBar; /*!< in m * 10 */
47 /**more may be added*/
48 /* USER CODE BEGIN sensor_t */
49
50 /* USER CODE END sensor_t */
51} sensor_t;
52
53/* USER CODE BEGIN ET */
54
55/* USER CODE END ET */
56
57/* Exported constants --------------------------------------------------------*/
58
59/* USER CODE BEGIN EC */
60#if defined (SENSOR_ENABLED) && (SENSOR_ENABLED == 1) && defined (X_NUCLEO_IKS01A2)
61#define HTS221_0 0U
62#define LPS22HB_0 1U
63#endif /* SENSOR_ENABLED & X_NUCLEO_IKS01A2 */
64/* USER CODE END EC */
65
66/* External variables --------------------------------------------------------*/
67/* USER CODE BEGIN EV */
68
69/* USER CODE END EV */
70
71/* Exported macro ------------------------------------------------------------*/
72/* USER CODE BEGIN EM */
73
74/* USER CODE END EM */
75
76/* Exported functions prototypes ---------------------------------------------*/
77/**
78 * @brief initialize the environmental sensor
79 */
80int32_t EnvSensors_Init(void);
81
82/**
83 * @brief Environmental sensor read.
84 * @param sensor_data sensor data
85 */
86int32_t EnvSensors_Read(sensor_t *sensor_data);
87
88/* USER CODE BEGIN EFP */
89
90/* USER CODE END EFP */
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif /* __SENSORS_H__ */
float temperature
Definition sys_sensors.h:41
float humidity
Definition sys_sensors.h:42
int16_t altitudeGps
Definition sys_sensors.h:45
float pressure
Definition sys_sensors.h:40
int16_t altitudeBar
Definition sys_sensors.h:46
int32_t longitude
Definition sys_sensors.h:44
int32_t latitude
Definition sys_sensors.h:43
int32_t EnvSensors_Read(sensor_t *sensor_data)
Environmental sensor read.
int32_t EnvSensors_Init(void)
initialize the environmental sensor