Touch device generic API

Define the generic API of a touch device. More...

Detailed Description

Define the generic API of a touch device.

Warning
This feature is experimental!
This API is experimental and in an early state - expect changes!
Author
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Data Structures

struct  touch_t
 Touch coordinates. More...
 
struct  touch_dev_driver_t
 Generic type for a touch driver. More...
 
struct  touch_dev
 Generic type for a touch device. More...
 

Typedefs

typedef struct touch_dev touch_dev_t
 Forward declaration for touch device struct.
 

Functions

uint16_t touch_dev_height (const touch_dev_t *dev)
 Get the height of the touch device. More...
 
uint16_t touch_dev_width (const touch_dev_t *dev)
 Get the width of the touch device. More...
 
uint8_t touch_dev_touches (const touch_dev_t *dev, touch_t *touches, size_t len)
 Get the current touches on the touch device. More...
 

Function Documentation

◆ touch_dev_height()

uint16_t touch_dev_height ( const touch_dev_t dev)

Get the height of the touch device.

Parameters
[in]devPointer to the touch device
Returns
Height in points

◆ touch_dev_touches()

uint8_t touch_dev_touches ( const touch_dev_t dev,
touch_t touches,
size_t  len 
)

Get the current touches on the touch device.

If touches is NULL, this function only returns the number of touches.

Touch position coordinates use the top left corner as origin.

Parameters
[in]devPointer to the touch device
[out]touchesThe array of touches
[in]lenThe touches array len
Returns
number of touch positions, 0 means no touch

◆ touch_dev_width()

uint16_t touch_dev_width ( const touch_dev_t dev)

Get the width of the touch device.

Parameters
[in]devPointer to the touch device
Returns
Width in points