Widget ToolKit training application.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
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 |
Set maXTouch configuration.
This function writes a set of predefined, optimal maXTouch configuration data to the mXT143E Xplained.
device | Pointer to mxt_device struct |
References Assert, delay_ms, MAXTOUCH_TWI_ADDRESS, MXT_GEN_ACQUISITIONCONFIG_T8, MXT_GEN_COMMANDPROCESSOR_CALIBRATE, MXT_GEN_COMMANDPROCESSOR_RESET, MXT_GEN_COMMANDPROCESSOR_T6, MXT_GEN_POWERCONFIG_T7, mxt_get_object_address(), mxt_init_device(), MXT_PROCG_TOUCHSUPPRESSION_T48, MXT_RESET_TIME, MXT_TOUCH_MULTITOUCHSCREEN_T9, mxt_write_config_object(), mxt_write_config_reg(), twi_options_t::speed, status, STATUS_OK, twi_master_setup(), and UNUSED.
Referenced by main().
|
static |
Set up and show the root window.
References win_attributes::background, WIN_ATTR_BACKGROUND, win_get_attributes(), win_get_root(), win_root, win_set_attributes(), and win_show().
Referenced by main().