Microchip® Advanced Software Framework

touch_interface.h File Reference

Header file for the touch screen interface functions.

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

Functions

void touch_interface_init (void)
 Initializes the touchscreen, ready to detect user input. More...
 
bool touch_interface_read (struct win_pointer_event *win_touch_event)
 Convert touch events from the touchscreen into window pointer events. More...
 

bool touch_interface_read ( struct win_pointer_event win_touch_event)

Convert touch events from the touchscreen into window pointer events.

Reads touch events in from the touchscreen and converts them into a Window Manager pointer event, for enqueuing into the window event queue.

Returns
Boolean true if a touch event was read, false if no touch event or a corrupt touch event was received

References win_pointer_event::buttons, gfx_get_height(), gfx_get_width(), win_pointer_event::is_relative, mxt_dev_inst, mxt_is_message_pending(), MXT_MOVE_EVENT, MXT_PRESS_EVENT, mxt_read_touch_event(), MXT_RELEASE_EVENT, win_pointer_event::pos, mxt_touch_event::status, STATUS_OK, win_pointer_event::type, WIN_POINTER_MOVE, WIN_POINTER_PRESS, WIN_POINTER_RELEASE, WIN_TOUCH_BUTTON, mxt_touch_event::x, win_point::x, mxt_touch_event::y, and win_point::y.

Referenced by main().