L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
sys_sensors.c File Reference

Manages the sensors on the application. More...

#include "stdint.h"
#include "platform.h"
#include "sys_conf.h"
#include "sys_sensors.h"
#include "adc_if.h"
Include dependency graph for sys_sensors.c:

Go to the source code of this file.

Macros

#define STSOP_LATTITUDE   ((float) 43.618622 )
#define STSOP_LONGITUDE   ((float) 7.051415 )
#define MAX_GPS_POS   ((int32_t) 8388607 )
#define HUMIDITY_DEFAULT_VAL   50.0f
#define TEMPERATURE_DEFAULT_VAL   18.0f
#define PRESSURE_DEFAULT_VAL   1000.0f

Functions

int32_t EnvSensors_Read (sensor_t *sensor_data)
 Environmental sensor read.
int32_t EnvSensors_Init (void)
 initialize the environmental sensor

Detailed Description

Manages the sensors on the application.

Author
MCD Application Team
Attention

Copyright (c) 2026 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file sys_sensors.c.

Macro Definition Documentation

◆ HUMIDITY_DEFAULT_VAL

#define HUMIDITY_DEFAULT_VAL   50.0f

default humidity

Definition at line 87 of file sys_sensors.c.

Referenced by EnvSensors_Read().

◆ MAX_GPS_POS

#define MAX_GPS_POS   ((int32_t) 8388607 )

2^23 - 1

Definition at line 86 of file sys_sensors.c.

Referenced by EnvSensors_Read().

◆ PRESSURE_DEFAULT_VAL

#define PRESSURE_DEFAULT_VAL   1000.0f

default pressure

Definition at line 89 of file sys_sensors.c.

Referenced by EnvSensors_Read().

◆ STSOP_LATTITUDE

#define STSOP_LATTITUDE   ((float) 43.618622 )

default latitude position

Definition at line 84 of file sys_sensors.c.

Referenced by EnvSensors_Read().

◆ STSOP_LONGITUDE

#define STSOP_LONGITUDE   ((float) 7.051415 )

default longitude position

Definition at line 85 of file sys_sensors.c.

Referenced by EnvSensors_Read().

◆ TEMPERATURE_DEFAULT_VAL

#define TEMPERATURE_DEFAULT_VAL   18.0f

default temperature

Definition at line 88 of file sys_sensors.c.

Referenced by EnvSensors_Read().

Function Documentation

◆ EnvSensors_Init()

int32_t EnvSensors_Init ( void )

initialize the environmental sensor

Definition at line 161 of file sys_sensors.c.

References Error_Handler().

Referenced by SystemApp_Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnvSensors_Read()

int32_t EnvSensors_Read ( sensor_t * sensor_data)

Environmental sensor read.

Parameters
sensor_datasensor data

< default humidity

< default temperature

< default pressure

< default latitude position

< 2^23 - 1

< default longitude position

< 2^23 - 1

Definition at line 122 of file sys_sensors.c.

References sensor_t::humidity, HUMIDITY_DEFAULT_VAL, sensor_t::latitude, sensor_t::longitude, MAX_GPS_POS, sensor_t::pressure, PRESSURE_DEFAULT_VAL, STSOP_LATTITUDE, STSOP_LONGITUDE, SYS_GetTemperatureLevel(), sensor_t::temperature, and TEMPERATURE_DEFAULT_VAL.

Referenced by GetTemperatureLevel().

Here is the call graph for this function:
Here is the caller graph for this function: