A library with drivers for different peripherals on the LPC4088 QuickStart Board or related add-on boards.

Dependencies:   FATFileSystem

Dependents:   LPC4088test LPC4088test_ledonly LPC4088test_deleteall LPC4088_RAMtest ... more

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 AR1021, and TSC2046.

Public Member Functions

virtual bool init (uint16_t width, uint16_t height)=0
 Initialize the touch controller.
virtual bool read (touchCoordinate_t &coord)=0
 Read coordinates from the touch panel.
virtual bool calibrateStart ()=0
 Start to calibrate the display.
virtual bool getNextCalibratePoint (uint16_t *x, uint16_t *y)=0
 Get the next calibration point.
virtual bool 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 24 of file TouchPanel.h.


Member Function Documentation

virtual bool calibrateStart (  ) [pure virtual]

Start to calibrate the display.

Returns:
true if the request was successful; otherwise false

Implemented in AR1021, and TSC2046.

virtual bool getNextCalibratePoint ( uint16_t *  x,
uint16_t *  y 
) [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
Returns:
true if the request was successful; otherwise false

Implemented in AR1021, and TSC2046.

virtual bool init ( uint16_t  width,
uint16_t  height 
) [pure virtual]

Initialize the touch controller.

This method must be called before calibrating or reading data from the controller

Parameters:
widththe width of the touch panel. This is usually the same as the width of the display
heightthe height of the touch panel. This is usually the same as the height of the display.
Returns:
true if the request was successful; otherwise false

Implemented in AR1021, and TSC2046.

virtual bool read ( touchCoordinate_t &  coord ) [pure virtual]

Read coordinates from the touch panel.

Parameters:
coordpointer to coordinate object. The read coordinates will be written to this object.

Implemented in AR1021, and TSC2046.

virtual bool 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:
true if the request was successful; otherwise false

Implemented in AR1021, and TSC2046.