Loading...
Searching...
No Matches
touch_dev_driver_t Struct Reference

Generic type for a touch driver. More...

Detailed Description

Generic type for a touch driver.

Definition at line 59 of file touch_dev.h.

#include <touch_dev.h>

Data Fields

uint16_t(* height )(const touch_dev_t *dev)
 Get the height of the touch device.
 
uint16_t(* width )(const touch_dev_t *dev)
 Get the width of the touch device.
 
uint8_t(* max_numof )(const touch_dev_t *dev)
 Get the maximum number of touches the touch device supports.
 
uint8_t(* touches )(const touch_dev_t *dev, touch_t *touches, size_t len)
 Get the current touches on the touch device.
 
void(* set_event_callback )(const touch_dev_t *dev, touch_event_cb_t cb, void *arg)
 Set and configure the touch event callback.
 

Field Documentation

◆ height

uint16_t(* touch_dev_driver_t::height) (const touch_dev_t *dev)

Get the height of the touch device.

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

Definition at line 68 of file touch_dev.h.

◆ max_numof

uint8_t(* touch_dev_driver_t::max_numof) (const touch_dev_t *dev)

Get the maximum number of touches the touch device supports.

This function pointer can be NULL. In this case, the maximum number of touches is assumed to be 1.

Parameters
[in]devPointer to the touch device
Returns
number of touches

Definition at line 89 of file touch_dev.h.

◆ set_event_callback

void(* touch_dev_driver_t::set_event_callback) (const touch_dev_t *dev, touch_event_cb_t cb, void *arg)

Set and configure the touch event callback.

Parameters
[in]devPointer to the touch device
[in]cbThe callback function
[in]argContext argument

Definition at line 110 of file touch_dev.h.

◆ touches

uint8_t(* touch_dev_driver_t::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.

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

Definition at line 101 of file touch_dev.h.

◆ width

uint16_t(* touch_dev_driver_t::width) (const touch_dev_t *dev)

Get the width of the touch device.

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

Definition at line 77 of file touch_dev.h.


The documentation for this struct was generated from the following file: