Out-of-office display, GFX
 All Classes Files Functions Variables Enumerations Enumerator Groups
Files | Macros | Functions
Touch screen interface

Interface between a touch screen driver and Microchip's Graphic Object Layer. More...

Files

file  touchScreen.h

Macros

#define TOUCH_ENABLE_STDOUT_ERRORS
 Allows this module to report errors to stdout.
#define TOUCH_ENABLE_STDOUT_DEBUG
 Allows this module to write debugging information to stdout.

Functions

void touch_setDebugEnabled (bool enabled)
 Enable or disable debugging output to stdout.
void touch_init ()
 Initialises any touch-specific data.
void touch_disable ()
 Temporarily disable the touch screen.
void touch_enable ()
 Re-enable the touch screen.
bool touch_getTouchData (GOL_MSG *msg)
 Get new touch data when appropriate and fill a GOL message with touch data.

Detailed Description

Interface between a touch screen driver and Microchip's Graphic Object Layer.

Author
Andreas Misje
Date
18.03.13

This module takes care of querying a touch screen driver for touch data at appropriate times (e.g. at a defined interval using a timer interrupt or by interrupts from an interrupt wire).

Function Documentation

void touch_disable ( )

Temporarily disable the touch screen.

This function makes it possible to disable the touch screen temporarily. touch_getTouchData() can still be called, but it will return false immediatedly.

void touch_enable ( )

Re-enable the touch screen.

If any underlying drivers has been disabled, this function will not re-enable them.

bool touch_getTouchData ( GOL_MSG *  msg)

Get new touch data when appropriate and fill a GOL message with touch data.

Must be called regularly from the main loop. It will only do any work if it is neccessary (too long since last poll interval / an interrupt is pending).

Parameters
msgmessage to fill with touch data. Only valid when function returns true
Returns
true if msg is filled with new touch data
void touch_init ( )

Initialises any touch-specific data.

Note
If the underlying touch driver depends on other drives, for instance SPI or I²C, those driver must be initialised before calling this function.

If the touch screen driver uses timers or hardware interrupts, those will be set up in this function.

void touch_setDebugEnabled ( bool  enabled)

Enable or disable debugging output to stdout.

Parameters
enabledenable or disable debug info