34#define TOUCH_DEV_VALUE_INVALID ((touch_t){ UINT16_MAX, UINT16_MAX })
#define assert(cond)
abort the program if assertion is false
int touch_dev_reg_add(touch_dev_reg_t *dev)
Add pointer to a touch device item to the list of touch items.
static uint8_t touch_dev_max_numof(const touch_dev_t *dev)
Get the maximum number of touches the touch device supports.
uint8_t touch_dev_touches(const touch_dev_t *dev, touch_t *touches, size_t len)
Get the current touches on the touch device.
void(* touch_event_cb_t)(void *arg)
Signature of touch event callback triggered from interrupt.
uint16_t touch_dev_height(const touch_dev_t *dev)
Get the height of the touch device.
struct touch_dev_reg touch_dev_reg_t
Touch dev registry entry.
uint16_t touch_dev_width(const touch_dev_t *dev)
Get the width of the touch device.
void touch_dev_set_touch_event_callback(const touch_dev_t *dev, touch_event_cb_t cb, void *arg)
Set and configure the touch event callback.
touch_dev_reg_t * touch_dev_reg_find_screen(uint8_t screen_id)
Find the touch device that is attached to a given screen.
Generic type for a touch driver.
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.
Touch dev registry entry.
struct touch_dev_reg * next
pointer to the next touch device in the list
touch_dev_t * dev
pointer to the device descriptor
uint8_t screen_id
id of the screen this touch device is attached to
Generic type for a touch device.
const touch_dev_driver_t * driver
Pointer to driver of the touch device.