/* Main application loop. 
This is the main application function, which runs all the initialization code, clears the display and enters a loop in which it continuously polls for new messages from the maXTouch device. If one or more messages are pending, the maXTouch message handler is invoked.  */
int main(void)
/* Main application loop. 
This is the main application function, which runs all the initialization code, clears the display and enters a loop in which it continuously polls for new messages from the maXTouch device. If one or more messages are pending, the maXTouch message handler is invoked.  */
int main(void)
{
	static struct mxt_device device;
	board_init();
	sysclk_init();
	gfx_init();
	mxt_init(&device);
	gfx_draw_filled_rect(0, 0, gfx_get_width(), gfx_get_height(),
			DISPLAY_COLOR);
	while (true) {
		if (mxt_is_message_pending(&device)) {
			mxt_handler(&device);
		}
	}
}