|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Header for ADC interface configuration. More...
Go to the source code of this file.
Macros | |
| #define | BAT_CR2032 ((uint32_t) 3000) |
| Battery level in mV. | |
| #define | VDD_BAT BAT_CR2032 |
| Maximum battery level in mV. | |
| #define | VDD_MIN 1800 |
| Minimum battery level in mV. | |
Functions | |
| void | SYS_InitMeasurement (void) |
| Initializes the ADC input. | |
| void | SYS_DeInitMeasurement (void) |
| DeInitializes the ADC. | |
| int16_t | SYS_GetTemperatureLevel (void) |
| Get the current temperature. | |
| uint16_t | SYS_GetBatteryLevel (void) |
| Get the current battery level. | |
Header for ADC interface configuration.
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 adc_if.h.
| #define VDD_BAT BAT_CR2032 |
Maximum battery level in mV.
Definition at line 49 of file adc_if.h.
Referenced by GetBatteryLevel().
| #define VDD_MIN 1800 |
Minimum battery level in mV.
Definition at line 53 of file adc_if.h.
Referenced by GetBatteryLevel().
| uint16_t SYS_GetBatteryLevel | ( | void | ) |
Get the current battery level.
Definition at line 139 of file adc_if.c.
References ADC_ReadChannels().
Referenced by GetBatteryLevel(), mems_WriteToSystemParams(), and SYS_GetTemperatureLevel().
| int16_t SYS_GetTemperatureLevel | ( | void | ) |
Get the current temperature.
< Internal temperature sensor, parameter Avg_Slope (unit: uV/DegCelsius). Refer to device datasheet for min/typ/max values.
< Internal temperature sensor, parameter V30 (unit: mV). Refer to device datasheet for min/typ/max values.
Definition at line 97 of file adc_if.c.
References ADC_ReadChannels(), SYS_GetBatteryLevel(), TEMPSENSOR_TYP_AVGSLOPE, and TEMPSENSOR_TYP_CAL1_V.
Referenced by EnvSensors_Read().
| void SYS_InitMeasurement | ( | void | ) |
Initializes the ADC input.
Definition at line 79 of file adc_if.c.
References hadc.
Referenced by SystemApp_Init().