Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DM_FATFileSystem EthernetInterface HTTPClient mbed-rtos mbed-src
Fork of DMSupport by
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:
-
x the x coordinate is written to this argument y the y coordinate is written to this argument last true 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:
-
resistive true for Resistive, false for Capacitive maxPoints the maximum number of simultaneous touches calibration true 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:
-
coords a list of at least num coordinates num the 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:
-
coord pointer 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:
-
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:
- Ok on success An error code on failure
Implemented in BiosTouch.
Generated on Thu Jul 14 2022 15:41:14 by
1.7.2
