Board Support  Version 1.0
Functions available when using the Board Software Components
Touchscreen

Touchscreen Interface of LCD Graphic displays. More...

Structures

struct  TOUCH_STATE
 Touchscreen state. More...
 

Functions

int32_t Touch_Initialize (void)
 Initialize touchscreen. More...
 
int32_t Touch_Uninitialize (void)
 De-initialize touchscreen. More...
 
int32_t Touch_GetState (TOUCH_STATE *pState)
 Get touchscreen state. More...
 

Description

Touchscreen Interface of LCD Graphic displays.

Many LCD Graphic displays provide a touchscreen controller which enables the user to interact directly with what is displayed. The Touchscreen Interface supports single-touch operation only.


Data Structure Documentation

◆ TOUCH_STATE

struct TOUCH_STATE

Touchscreen state.

Data Fields
uint8_t padding
uint8_t pressed Pressed flag.
int16_t x Position X.
int16_t y Position Y.

Function Documentation

◆ Touch_GetState()

int32_t Touch_GetState ( TOUCH_STATE pState)

Get touchscreen state.

Parameters
[out]pStatepointer to TOUCH_STATE structure
Returns
  • 0: function succeeded
  • -1: function failed

The function reads the touchscreen state (x/y coordinates and pressed value) and writes the data into the structure TOUCH_STATE. The parameter pState is a pointer to the structure TOUCH_STATE. The function returns an integer value of 0 on success, and -1 on error.

◆ Touch_Initialize()

int32_t Touch_Initialize ( void  )

Initialize touchscreen.

Returns
  • 0: function succeeded
  • -1: function failed

The function initializes the touchscreen controller. The function returns an integer value of 0 on success, and -1 on error.

◆ Touch_Uninitialize()

int32_t Touch_Uninitialize ( void  )

De-initialize touchscreen.

Returns
  • 0: function succeeded
  • -1: function failed

The function de-initializes the touchscreen controller. The function returns an integer value of 0 on success, and -1 on error.