Microchip® Advanced Software Framework

common/services/wtk/training/main.c File Reference

Widget ToolKit training application.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include "app_widget.h"

Macros

#define MAXTOUCH_TWI_ADDRESS   0x4a
 Address of the mXT143E on TWI bus. More...
 

Functions

int main (void)
 Main application function. More...
 
static void mxt_init (struct mxt_device *device)
 Set maXTouch configuration. More...
 
static void setup_root_window (void)
 Set up and show the root window. More...
 

#define MAXTOUCH_TWI_ADDRESS   0x4a

Address of the mXT143E on TWI bus.

Referenced by mxt_init().

int main ( void  )

Main application function.

This function executes the necessary initialization calls and displays the demo widgets before entering the main work loop of the application.

The main work loop reads out the touch events from the mXT143E Xplained and enqueues the corresponding touch events in the window system, before processing the window system's event queue.

References app_widget_launch(), board_init(), win_pointer_event::buttons, gfx_get_height(), gfx_get_width(), gfx_init, win_pointer_event::is_relative, membag_init(), mxt_init(), mxt_is_message_pending(), MXT_MOVE_EVENT, MXT_PRESS_EVENT, mxt_read_touch_event(), MXT_RELEASE_EVENT, win_pointer_event::pos, setup_root_window(), mxt_touch_event::status, STATUS_OK, sysclk_init(), win_pointer_event::type, win_init(), WIN_POINTER_MOVE, WIN_POINTER_PRESS, WIN_POINTER_RELEASE, win_process_events(), win_queue_pointer_event(), WIN_TOUCH_BUTTON, mxt_touch_event::x, win_point::x, mxt_touch_event::y, and win_point::y.

static void mxt_init ( struct mxt_device device)
static
static void setup_root_window ( void  )
static