pkg/semtech-loramac/include/semtech-loramac/timer.h¶
Semtech LoRaMAC timer compatibility definitions.
-
struct TimerEvent_s
TimerEvent_t¶ Timer object description.
-
uint32_t
TimerTime_t¶ Timer time variable definition.
-
void
TimerInit(pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerEvent_t* obj, void(*)(void) callback)¶ Initializes the timer object.
Parameters
obj: Structure containing the timer object parameters callback: Function callback called at the end of the timeout
-
void
TimerIrqHandler(void)¶ Timer IRQ event handler.
-
void
TimerStart(pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerEvent_t* obj)¶ Starts and adds the timer object to the list of timer events.
Parameters
obj: Structure containing the timer object parameters
-
void
TimerStop(pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerEvent_t* obj)¶ Stops and removes the timer object from the list of timer events.
Parameters
obj: Structure containing the timer object parameters
-
void
TimerReset(pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerEvent_t* obj)¶ Resets the timer object.
Parameters
obj: Structure containing the timer object parameters
-
void
TimerSetValue(pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerEvent_t* obj, uint32_t value)¶ Set timer new timeout value.
Parameters
obj: Structure containing the timer object parameters value: New timer timeout value
-
pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerTime_tTimerGetCurrentTime(void)¶ Read the current time.
Return values
- current time
-
pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerTime_tTimerGetElapsedTime(pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerTime_ttime)¶ Return the time elapsed since a fix moment in Time.
Parameters
time: fix moment in Time Return values
- elapsed time
-
pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerTime_tTimerGetFutureTime(pkg/semtech-loramac/include/semtech-loramac/timer.h::TimerTime_ttime)¶ Return the time elapsed since a fix moment in time.
Parameters
time: fix moment in the future Return values
- difference between now and future event
-
void
TimerLowPowerHandler(void)¶ Manages the entry into low power mode.