Thanks Ovi!
After analyzing the example, here's what I was able to get working. I tested it using an LED turning on for 10 seconds before turning off. Posting code for reference.
/*==================================================================================================
Private macros
==================================================================================================*/
.
.
.
#define gLedTimeout_c 10000 /* milliseconds */
/*==================================================================================================
Public global variables declarations
==================================================================================================*/
.
.
.
/* Led timer Id */
tmrTimerID_t mLedTimerId = gTmrInvalidTimerID_c;
/*==================================================================================================
Public functions
==================================================================================================*/
.
.
.
void APP_LightShellEventReceived(void)
{
if(isLedOn)
{
(void)NWKU_SendMsg(APP_SendExtLedOff, NULL, mpAppThreadMsgQueue);
isLedOn = FALSE;
}
else{
(void)NWKU_SendMsg(APP_SendExtLedOn, NULL, mpAppThreadMsgQueue);
isLedOn = TRUE;
if(mLedTimerId == gTmrInvalidTimerID_c)
{
mLedTimerId = TMR_AllocateTimer();
}
/* Validate Led timer Id */
if(mLedTimerId != gTmrInvalidTimerID_c)
{
/* Start the led timer. Wait gLedTimeout_c
to start countdown before turning off led. */
TMR_StartSingleShotTimer(mLedTimerId, gLedTimeout_c, APP_SendExtLedOff, NULL);
}
}