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... | |
void touch_interface_init | ( | void | ) |
Initializes the touchscreen, ready to detect user input.
Performs and initialization and calibration of the touchscreen, so that it is ready for use.
References rtouch_enable(), rtouch_init(), rtouch_set_event_handler(), touch_event_handler(), and touch_interface_calibrate().
Referenced by main().
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.
true
if a touch event was read, false if no touch event or a corrupt touch event was received References win_pointer_event::buttons, cpu_irq_restore(), cpu_irq_save(), win_pointer_event::is_relative, rtouch_event_struct::panelX, rtouch_event_struct::panelY, win_pointer_event::pos, rtouch_get_event(), RTOUCH_MOVE, RTOUCH_NO_EVENT, RTOUCH_PRESS, RTOUCH_RELEASE, touch_event_ready, rtouch_event_struct::type, win_pointer_event::type, WIN_POINTER_MOVE, WIN_POINTER_PRESS, WIN_POINTER_RELEASE, WIN_TOUCH_BUTTON, win_point::x, and win_point::y.
Referenced by main().