Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Touchscreen Event Report API

Touch Events API . More...

Data Structures

struct  input_touchscreen_common_config
 Common touchscreen config. More...
 

Macros

#define INPUT_TOUCH_DT_COMMON_CONFIG_INIT(node_id)
 Initialize common touchscreen config from devicetree.
 
#define INPUT_TOUCH_DT_INST_COMMON_CONFIG_INIT(inst)
 Initialize common touchscreen config from devicetree instance.
 
#define INPUT_TOUCH_STRUCT_CHECK(config)
 Validate the offset of the common config structure.
 

Functions

void input_touchscreen_report_pos (const struct device *dev, uint32_t x, uint32_t y, k_timeout_t timeout)
 Common utility for reporting touchscreen position events.
 

Detailed Description

Touch Events API .

Since
3.7
Version
0.1.0

Macro Definition Documentation

◆ INPUT_TOUCH_DT_COMMON_CONFIG_INIT

#define INPUT_TOUCH_DT_COMMON_CONFIG_INIT ( node_id)

#include <zephyr/input/input_touch.h>

Value:
{ \
.screen_width = DT_PROP(node_id, screen_width), \
.screen_height = DT_PROP(node_id, screen_height), \
.inverted_x = DT_PROP(node_id, inverted_x), \
.inverted_y = DT_PROP(node_id, inverted_y), \
.swapped_x_y = DT_PROP(node_id, swapped_x_y) \
}
#define DT_PROP(node_id, prop)
Get a devicetree property value.
Definition devicetree.h:752

Initialize common touchscreen config from devicetree.

Parameters
node_idThe devicetree node identifier.

◆ INPUT_TOUCH_DT_INST_COMMON_CONFIG_INIT

#define INPUT_TOUCH_DT_INST_COMMON_CONFIG_INIT ( inst)

#include <zephyr/input/input_touch.h>

Value:
#define DT_DRV_INST(inst)
Node identifier for an instance of a DT_DRV_COMPAT compatible.
Definition devicetree.h:3809
#define INPUT_TOUCH_DT_COMMON_CONFIG_INIT(node_id)
Initialize common touchscreen config from devicetree.
Definition input_touch.h:50

Initialize common touchscreen config from devicetree instance.

Parameters
instInstance.

◆ INPUT_TOUCH_STRUCT_CHECK

#define INPUT_TOUCH_STRUCT_CHECK ( config)

#include <zephyr/input/input_touch.h>

Value:
BUILD_ASSERT(offsetof(config, common) == 0, \
"struct input_touchscreen_common_config must be placed first");

Validate the offset of the common config structure.

Parameters
configName of the config structure.

Function Documentation

◆ input_touchscreen_report_pos()

void input_touchscreen_report_pos ( const struct device * dev,
uint32_t x,
uint32_t y,
k_timeout_t timeout )

#include <zephyr/input/input_touch.h>

Common utility for reporting touchscreen position events.

Parameters
devTouchscreen controller
xX coordinate as reported by the controller
yY coordinate as reported by the controller
timeoutTimeout for reporting the event