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

BiosTouch Class Reference

Glue between the BIOS and the TouchPanel interface. More...

#include <BiosTouch.h>

Inherits TouchPanel.

Public Member Functions

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

Static Public Member Functions

static BiosTouchinstance ()
 Get the only instance of the BiosTouch.

Detailed Description

Glue between the BIOS and the TouchPanel interface.

Definition at line 31 of file BiosTouch.h.


Member Function Documentation

BiosTouch::TouchError calibrateStart (  ) [virtual]

Start to calibrate the display.

Returns:
Ok on success An error code on failure

Implements TouchPanel.

Definition at line 346 of file BiosTouch.cpp.

BiosTouch::TouchError getNextCalibratePoint ( uint16_t *  x,
uint16_t *  y,
bool *  last = NULL 
) [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

Implements TouchPanel.

Definition at line 357 of file BiosTouch.cpp.

BiosTouch::TouchError info ( bool *  resistive,
int *  maxPoints,
bool *  calibrated 
) [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

Implements TouchPanel.

Definition at line 324 of file BiosTouch.cpp.

BiosTouch::TouchError init (  )

Initialize the touch controller.

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

Returns:
Ok on success An error code on failure

Definition at line 252 of file BiosTouch.cpp.

static BiosTouch& instance (  ) [static]

Get the only instance of the BiosTouch.

Returns:
The display

Definition at line 38 of file BiosTouch.h.

bool isTouchSupported (  )

Tests if a touch controller is available or not.

Note that this function only returns a valid value after the display has been intitialized.

Returns:
true if there is a touch controller

Definition at line 336 of file BiosTouch.cpp.

BiosTouch::TouchError read ( touch_coordinate_t *  coord,
int  num 
) [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

Implements TouchPanel.

Definition at line 313 of file BiosTouch.cpp.

BiosTouch::TouchError read ( touch_coordinate_t &  coord ) [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

Implements TouchPanel.

Definition at line 302 of file BiosTouch.cpp.

BiosTouch::TouchError waitForCalibratePoint ( bool *  morePoints,
uint32_t  timeout 
) [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

Implements TouchPanel.

Definition at line 368 of file BiosTouch.cpp.