|
L14-Click 1.0
STM32WLE5CC LoRaWAN Sensor Platform
|
Non-blocking timer utility – similar to HAL_Delay but without CPU blocking. More...
#include <utils.h>
Data Fields | |
| uint32_t | SleepMS |
| uint32_t | InicTime |
| uint8_t | Stop |
Non-blocking timer utility – similar to HAL_Delay but without CPU blocking.
The caller polls sleeper_IsElapsed() or sleeper_IsElapsedNext() inside its main loop to detect when the configured time interval has elapsed. The timer can also be stopped; in that case all _IsElapsedXX functions return 0 regardless of elapsed time.
| uint32_t sleeper_t::InicTime |
Reference timestamp captured at (re)start, used for comparison
Definition at line 30 of file utils.h.
Referenced by sleeper_Init(), sleeper_IsElapsed(), and sleeper_Next().
| uint32_t sleeper_t::SleepMS |
Duration (ms) to wait; 0 means no pause
Definition at line 29 of file utils.h.
Referenced by sleeper_Init(), sleeper_IsElapsed(), and sleeper_SetSleepMS().
| uint8_t sleeper_t::Stop |
1 – timer is stopped (all IsElapsed checks return 0); 0 – running
Definition at line 31 of file utils.h.
Referenced by sleeper_Init(), sleeper_IsElapsed(), sleeper_Next(), and sleeper_Stop().