Definition: This function starts a regular timer and installs the corresponding callback function handling the timeout event.
Syntax
StackRetStatus_t SwTimerStart(uint8_t timerId, uint32_t timerCount,
SwTimeoutType_t timeoutType, void *timerCb, void *paramCb);
Input Parameters
Parameter Name |
Parameter Type |
Description |
---|---|---|
timerId |
uint8_t |
Timer identifier |
timerCount |
uint32_t |
Timeout in microseconds |
timeoutType |
SwTimeoutType_t |
|
timerCb |
Void pointer |
Callback handler invoked upon timer expiry |
paramCb |
Void pointer |
Argument for the callback handler |
Return Type and Values
Parameters Name |
Parameter Type |
Description |
---|---|---|
StackRetStatus_t |
ENUM |
List of enumerated values for return Status |
Return Value |
Reason |
---|---|
LORAWAN_SUCCESS |
Timer is started successfully |
LORAWAN_INVALID_REQUEST |
Timer is already running |
LORAWAN_INVALID_PARAMETER |
Timer ID, timeout type or timeout value is wrong |
API Type – Synchronous