// Timer ISR executes this function
static void APP_TimerCallback ( uintptr_t context, uint32_t alarmCount )
{
    appData.alarmCount++; // increment when timer counter = timer period (interrupt)
    if (appData.alarmCount >= appData.alarmCountMax)    // if end of alarm period
    {
        appData.alarmCount = 0;                         // reset alarm count
        PLIB_PORTS_PinToggle(PORTS_ID_0, APP_LED3_PORT, APP_LED3_PIN); // toggle LED
    }
}