Microchip Technology AC164127-7 Data Sheet

Page of 34
 2011 Microchip Technology Inc.
DS01368A-page 25
AN1368
EXAMPLE 5:
EXAMPLE 6:
while(1)
{
if(GOLDraw())
// Draw GOL objects
// Drawing is done here, process messages
TouchGetMsg(&msg); 
// Get message from touch screen
GOLMsg(&msg); 
// Process message
SideButtonsMsg(&msg); 
// Get message from side buttons
GOLMsg(&msg); 
// Process message
}
}
WORD GOLMsgCallback(WORD objMsg, OBJ_HEADER *pObj, GOL_MSG *pMsg)
{
    // beep if button is pressed
    if(objMsg == BTN_MSG_PRESSED)
    {
        Beep();
    }
}