test public

Dependencies:   HttpServer_snapshot_mbed-os

Embed: (wiki syntax)

« Back to documentation index

TouchKey_4_3inch Class Reference

TouchKey_4_3inch Class Reference

The class to acquire touch coordinates. More...

#include <TouchKey_4_3inch.h>

Inherits TouchKey.

Public Member Functions

 TouchKey_4_3inch (PinName tprst, PinName tpint, PinName sda=I2C_SDA, PinName scl=I2C_SCL)
 Create a TouchKey_4_3inch object.
virtual int GetMaxTouchNum (void)
 Get the maximum number of simultaneous touches.
virtual int GetCoordinates (int touch_buff_num, touch_pos_t *p_touch)
 Get the coordinates.
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.

Detailed Description

The class to acquire touch coordinates.

(GR-PEACH 4.3inch LCD Shield edition)

Definition at line 29 of file TouchKey_4_3inch.h.


Constructor & Destructor Documentation

TouchKey_4_3inch ( PinName  tprst,
PinName  tpint,
PinName  sda = I2C_SDA,
PinName  scl = I2C_SCL 
)

Create a TouchKey_4_3inch object.

Parameters:
tprsttprst pin
tpinttpint pin
sdaI2C data line pin
sclI2C clock line pin

Definition at line 19 of file TouchKey_4_3inch.cpp.


Member Function Documentation

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

Get the coordinates.

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

Implements TouchKey.

Definition at line 27 of file TouchKey_4_3inch.cpp.

int GetMaxTouchNum ( void   ) [virtual]

Get the maximum number of simultaneous touches.

Returns:
The maximum number of simultaneous touches.

Implements TouchKey.

Definition at line 23 of file TouchKey_4_3inch.cpp.

void Reset ( void   ) [inherited]

Initialization of touch panel IC.

Definition at line 62 of file TouchKey.h.

void SetCallback ( void(*)(void)  fptr ) [inherited]

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.

void SetCallback ( T *  tptr,
void(T::*)(void)  mptr 
) [inherited]

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.