TouchKit Drivers

Data Structures

struct  TOUCH_Config_TypeDef
struct  TOUCH_Pos_TypeDef




typedef void( TOUCH_Upcall_TypeDef) (TOUCH_Pos_TypeDef *)


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

Macro Definition Documentation

{ 500000, /* 500kHz sampling frequency */ \
1, /* Ignore moves not greater than 1 pixel */ \
adcOvsRateSel128, /* Oversampling 128 times */ \

Initializes Touch default values

Definition at line 61 of file touch.h.

Typedef Documentation

typedef void( TOUCH_Upcall_TypeDef) (TOUCH_Pos_TypeDef *)

touch panel upcall type definition

Definition at line 68 of file touch.h.

Function Documentation

int TOUCH_CalibrationTable ( POINT *  displayPtr,
POINT *  screenPtr 

Set calibration table.

[in]displayPtrTable of display points
[in]screenPtrTable of adc values reflecting display points
Returns OK if calibration table is set.

Definition at line 406 of file touch.c.

References calibrationMatrix.

TOUCH_Pos_TypeDef* TOUCH_GetPos ( void  )

Returns current touch position and state.

Current touch position and state

Definition at line 369 of file touch.c.

References ADC0, ADC_IF_SINGLE, ADC_IntDisable(), ADC_IntEnable(), TOUCH_Pos_TypeDef::adcx, TOUCH_Pos_TypeDef::adcy, TOUCH_Pos_TypeDef::pen, TOUCH_Pos_TypeDef::x, and TOUCH_Pos_TypeDef::y.

int TOUCH_IsBusy ( void  )

Check status of the touch panel.

0 if panel is idle (not touched).

Definition at line 317 of file touch.c.

References GPIO_PinInGet(), TOUCH_X2_PIN, and TOUCH_X2_PORT.

void TOUCH_RegisterUpcall ( TOUCH_Upcall_TypeDef new_upcall)

Register upcall which will be call every position or state change.

[in]new_upcallPointer to upcall function

Definition at line 389 of file touch.c.