A board support package for the LPC4088 Display Module.

Dependencies:   DM_HttpServer DM_USBHost

Dependents:   lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more

Fork of DMSupport by EmbeddedArtists AB

Embed: (wiki syntax)

« Back to documentation index

TouchPanel Class Reference

TouchPanel Class Reference

An abstract class that represents touch panels. More...

#include <TouchPanel.h>

Inherited by BiosTouch.

Public Member Functions

virtual TouchError read (touch_coordinate_t &coord)=0
 Read coordinates from the touch panel.
virtual TouchError read (touch_coordinate_t *coord, int num)=0
 Read up to num coordinates from the touch panel.
virtual TouchError info (bool *resistive, int *maxPoints, bool *calibrated)=0
 Returns information about the touch panel.
virtual TouchError calibrateStart ()=0
 Start to calibrate the display.
virtual TouchError getNextCalibratePoint (uint16_t *x, uint16_t *y, bool *last=NULL)=0
 Get the next calibration point.
virtual TouchError waitForCalibratePoint (bool *morePoints, uint32_t timeout)=0
 Wait for a calibration point to have been pressed and recored.

Detailed Description

An abstract class that represents touch panels.

Definition at line 25 of file TouchPanel.h.


Member Function Documentation

virtual TouchError calibrateStart (  ) [pure virtual]

Start to calibrate the display.

Returns:
Ok on success An error code on failure

Implemented in BiosTouch.

virtual TouchError getNextCalibratePoint ( uint16_t *  x,
uint16_t *  y,
bool *  last = NULL 
) [pure virtual]

Get the next calibration point.

Draw an indicator on the screen at the coordinates and ask the user to press/click on the indicator. Please note that waitForCalibratePoint() must be called after this method.

Parameters:
xthe x coordinate is written to this argument
ythe y coordinate is written to this argument
lasttrue if this is the last coordinate in the series
Returns:
Ok on success An error code on failure

Implemented in BiosTouch.

virtual TouchError info ( bool *  resistive,
int *  maxPoints,
bool *  calibrated 
) [pure virtual]

Returns information about the touch panel.

Parameters:
resistivetrue for Resistive, false for Capacitive
maxPointsthe maximum number of simultaneous touches
calibrationtrue if the controller can be calibrated
Returns:
Ok on success An error code on failure

Implemented in BiosTouch.

virtual TouchError read ( touch_coordinate_t *  coord,
int  num 
) [pure virtual]

Read up to num coordinates from the touch panel.

Parameters:
coordsa list of at least num coordinates
numthe number of coordinates to read
Returns:
Ok on success An error code on failure

Implemented in BiosTouch.

virtual TouchError read ( touch_coordinate_t &  coord ) [pure virtual]

Read coordinates from the touch panel.

In case of multitouch (capacitive touch screen) only the first touch will be returned.

Parameters:
coordpointer to coordinate object. The read coordinates will be written to this object.
Returns:
Ok on success An error code on failure

Implemented in BiosTouch.

virtual TouchError waitForCalibratePoint ( bool *  morePoints,
uint32_t  timeout 
) [pure virtual]

Wait for a calibration point to have been pressed and recored.

This method must be called just after getNextCalibratePoint().

Parameters:
morePointstrue is written to this argument if there are more calibrations points available; otherwise it will be false
timeoutmaximum number of milliseconds to wait for a calibration point. Set this argument to 0 to wait indefinite.
Returns:
Ok on success An error code on failure

Implemented in BiosTouch.