L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
Loading...
Searching...
No Matches
sys_app.h File Reference

Function prototypes for sys_app.c file. More...

#include "stdint.h"
#include "sys_conf.h"
#include "stm32_adv_trace.h"
Include dependency graph for sys_app.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define APP_PPRINTF(...)
#define APP_TPRINTF(...)
#define APP_PRINTF(...)
#define APP_LOG(TS, VL, ...)
#define APP_LOG(TS, VL, ...)

Functions

void SystemApp_Init (void)
 initialize the system (dbg pins, trace, mbmux, sys timer, LPM, ...)
uint8_t GetBatteryLevel (void)
 callback to get the battery level in % of full charge (254 full charge, 0 no charge)
int16_t GetTemperatureLevel (void)
 callback to get the current temperature in the MCU
void GetUniqueId (uint8_t *id)
 callback to get the board 64 bits unique ID
void GetDevAddr (uint32_t *devAddr)
 callback to get the board 32 bits unique ID (LSB)

Detailed Description

Function prototypes for sys_app.c file.

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_app.h.

Macro Definition Documentation

◆ APP_LOG [1/2]

#define APP_LOG ( TS,
VL,
... )
Value:
{writeLog( __VA_ARGS__);}
void writeLog(const char *format,...)
Format and send a log message over UART (printf-style). Available only when WRITELOG is defined; comp...
Definition main.c:97

Definition at line 66 of file sys_app.h.

◆ APP_LOG [2/2]

#define APP_LOG ( TS,
VL,
... )

Definition at line 66 of file sys_app.h.

Referenced by LoRaWAN_Init(), OnNvmDataChange(), StopJoin(), and StoreContext().

◆ APP_PPRINTF

#define APP_PPRINTF ( ...)
Value:
do{ } while( UTIL_ADV_TRACE_OK \
!= UTIL_ADV_TRACE_COND_FSend(VLEVEL_ALWAYS, T_REG_OFF, TS_OFF, __VA_ARGS__) ) /* Polling Mode */
#define VLEVEL_ALWAYS
#define T_REG_OFF
#define TS_OFF

Definition at line 58 of file sys_app.h.

◆ APP_PRINTF

#define APP_PRINTF ( ...)
Value:
do{ {UTIL_ADV_TRACE_COND_FSend(VLEVEL_ALWAYS, T_REG_OFF, TS_OFF, __VA_ARGS__);} }while(0);

Definition at line 61 of file sys_app.h.

Referenced by LoraInfo_Init().

◆ APP_TPRINTF

#define APP_TPRINTF ( ...)
Value:
do{ {UTIL_ADV_TRACE_COND_FSend(VLEVEL_ALWAYS, T_REG_OFF, TS_ON, __VA_ARGS__);} }while(0); /* with timestamp */
#define TS_ON

Definition at line 60 of file sys_app.h.

Function Documentation

◆ GetBatteryLevel()

uint8_t GetBatteryLevel ( void )

callback to get the battery level in % of full charge (254 full charge, 0 no charge)

Return values
batterylevel

Definition at line 152 of file sys_app.c.

References LORAWAN_MAX_BAT, SYS_GetBatteryLevel(), VDD_BAT, and VDD_MIN.

Referenced by mems_WriteToSystemParams(), and sensors_CayennelFromBckData().

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

◆ GetDevAddr()

void GetDevAddr ( uint32_t * devAddr)

callback to get the board 32 bits unique ID (LSB)

Parameters
devAddrDevice Address

Definition at line 239 of file sys_app.c.

Referenced by systemParams_getAppDevEUI().

Here is the caller graph for this function:

◆ GetTemperatureLevel()

int16_t GetTemperatureLevel ( void )

callback to get the current temperature in the MCU

Return values
temperaturelevel

Definition at line 184 of file sys_app.c.

References EnvSensors_Read(), and sensor_t::temperature.

Here is the call graph for this function:

◆ GetUniqueId()

void GetUniqueId ( uint8_t * id)

callback to get the board 64 bits unique ID

Parameters
idunique ID

Definition at line 198 of file sys_app.c.

◆ SystemApp_Init()

void SystemApp_Init ( void )

initialize the system (dbg pins, trace, mbmux, sys timer, LPM, ...)

Definition at line 90 of file sys_app.c.

References CFG_LPM_APPLI_Id, DBG_Init(), EnvSensors_Init(), SYS_InitMeasurement(), SYS_TimerInitialisedFlag, TimestampNow(), and VERBOSE_LEVEL.

Referenced by main(), and MX_LoRaWAN_Init().

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