main()
{
    ...

    while(1)
    {
       if(MTOUCH_Service_Mainloop())
       { 
           if(MTOUCH_Button_isPressed(Button0))
           {
               printf("Button0 is pressed.\r\n");
           }
           else
           {
               printf("Button0 is released.\r\n");
            }
       }
    }
}