EFM32 Zero Gecko Software Documentation  efm32zg-doc-4.2.1
Touch

Data Structures

struct  TOUCH_Pos_TypeDef
 
struct  TOUCH_Config_TypeDef
 

Macros

#define TOUCH_INIT_DEFAULT
 

Typedefs

typedef void( TOUCH_Upcall_TypeDef) (TOUCH_Pos_TypeDef *)
 

Functions

void TOUCH_Init (TOUCH_Config_TypeDef *config)
 Initialize touch panel driver. More...
 
void TOUCH_RegisterUpcall (TOUCH_Upcall_TypeDef *new_upcall)
 Register upcall which will be call every position or state change. More...
 
TOUCH_Pos_TypeDefTOUCH_GetPos (void)
 Returns current touch position and state. More...
 
int TOUCH_CalibrationTable (POINT *displayPtr, POINT *screenPtr)
 Set calibration table. More...
 
int TOUCH_IsBusy (void)
 Check status of the touch panel. More...
 

Detailed Description

Macro Definition Documentation

#define TOUCH_INIT_DEFAULT
Value:
{ 500000, /* 500kHz sampling frequency */ \
1, /* Ignore moves not greater than 1 pixel */ \
adcOvsRateSel128, /* Oversampling 128 times */ \
}

Initializes Touch default values

Definition at line 63 of file touch.h.

Typedef Documentation

typedef void( TOUCH_Upcall_TypeDef) (TOUCH_Pos_TypeDef *)

touch panel upcall type definition

Definition at line 70 of file touch.h.

Function Documentation

void TOUCH_RegisterUpcall ( TOUCH_Upcall_TypeDef new_upcall)
Parameters
[in]new_upcallPointer to upcall function

Definition at line 392 of file touch.c.

TOUCH_Pos_TypeDef* TOUCH_GetPos ( void  )
int TOUCH_CalibrationTable ( POINT *  displayPtr,
POINT *  screenPtr 
)
Parameters
[in]displayPtrTable of display points
[in]screenPtrTable of adc values reflecting display points
Returns
Returns OK if calibration table is set.

Definition at line 410 of file touch.c.

References calibrationMatrix.

int TOUCH_IsBusy ( void  )
Returns
0 if panel is idle (not touched).

Definition at line 318 of file touch.c.

References GPIO_PinInGet(), TOUCH_X2_PIN, and TOUCH_X2_PORT.