A library with drivers for different peripherals on the LPC4088 QuickStart Board or related add-on boards.
Dependents: LPC4088test LPC4088test_ledonly LPC4088test_deleteall LPC4088_RAMtest ... more
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] |
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:
-
x the x coordinate is written to this argument y the y coordinate is written to this argument
- Returns:
- true if the request was successful; otherwise false
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:
-
width the width of the touch panel. This is usually the same as the width of the display height the 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
virtual bool read | ( | touchCoordinate_t & | coord ) | [pure virtual] |
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:
-
morePoints true is written to this argument if there are more calibrations points available; otherwise it will be false timeout maximum 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
Generated on Fri Jul 15 2022 02:16:08 by 1.7.2