typedef struct
    /* The application's current state */
    APP_STATES state;

    /* TODO: Define any additional data used by the application. */

    /* Handle to the timer object to poll for switch press */
    SYS_TMR_HANDLE  tmrObj1;

    /* Handle to the timer object to debounce switch and blink LED. */    
    SYS_TMR_HANDLE  tmrObj2;

    /* Switch press is detected but not confirmed (not debounced). */
    bool            pressDetected;

    /* Switch press or release is confirmed (debounced). */
    bool            switchIsPressed;

    /* Counts the number of consecutive successful switch press or switch
       release reads. */
    unsigned int    debounceCounter;

    /* Switch debounce timeout counter puts a limit on how long the switch
       debounce is attempted.  If a press is not confirmed before the timeout,
       pressDetected is set to false, and the state machine reverts to the
       previous state. */
    unsigned int    timeoutCounter;