test public

Dependencies:   HttpServer_snapshot_mbed-os

Embed: (wiki syntax)

« Back to documentation index

TouchKey Class Reference

TouchKey Class Reference

The class to acquire touch coordinates. More...

#include <TouchKey.h>

Inherited by TouchKey_4_3inch, TouchKey_7_1inch, and TouchKey_RSK_TFT.

Data Structures

struct  touch_pos_t
 Touch position structure. More...

Public Member Functions

 TouchKey (PinName tprst, PinName tpint)
 Create a TouchKey object.
void Reset (void)
 Initialization of touch panel IC.
void SetCallback (void(*fptr)(void))
 Attach a function to call when touch panel int.
template<typename T >
void SetCallback (T *tptr, void(T::*mptr)(void))
 Attach a member function to call when touch panel int.
virtual int GetMaxTouchNum (void)=0
 Get the maximum number of simultaneous touches.
virtual int GetCoordinates (int touch_buff_num, touch_pos_t *p_touch)=0
 Get the coordinates.

Detailed Description

The class to acquire touch coordinates.

Definition at line 29 of file TouchKey.h.


Constructor & Destructor Documentation

TouchKey ( PinName  tprst,
PinName  tpint 
)

Create a TouchKey object.

Parameters:
tprsttprst pin
tpinttpint pin

Definition at line 45 of file TouchKey.h.


Member Function Documentation

virtual int GetCoordinates ( int  touch_buff_num,
touch_pos_t p_touch 
) [pure virtual]

Get the coordinates.

Parameters:
touch_buff_numThe number of structure p_touch.
p_touchTouch position information.
Returns:
The number of touch points.

Implemented in TouchKey_4_3inch, TouchKey_7_1inch, and TouchKey_RSK_TFT.

virtual int GetMaxTouchNum ( void   ) [pure virtual]

Get the maximum number of simultaneous touches.

Returns:
The maximum number of simultaneous touches.

Implemented in TouchKey_4_3inch, TouchKey_7_1inch, and TouchKey_RSK_TFT.

void Reset ( void   )

Initialization of touch panel IC.

Definition at line 62 of file TouchKey.h.

void SetCallback ( T *  tptr,
void(T::*)(void)  mptr 
)

Attach a member function to call when touch panel int.

Parameters:
tptrpointer to the object to call the member function on
mptrpointer to the member function to be called

Definition at line 84 of file TouchKey.h.

void SetCallback ( void(*)(void)  fptr )

Attach a function to call when touch panel int.

Parameters:
fptrA pointer to a void function, or 0 to set as none

Definition at line 74 of file TouchKey.h.