rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
touch_inject.h
Go to the documentation of this file.
1
39
40#pragma once
41
42#include <stdbool.h>
43#include <stdint.h>
44
45#include "driver/i2c_master.h"
46#include "esp_err.h"
47
48#include "touch.h"
49#include "touch_merge.h"
50#include "touch_types.h"
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
57#define TOUCH_INJECT_ADDR TOUCH_MERGE_INJECT_ADDR
58
74void touch_inject_attach(i2c_master_bus_handle_t bus, uint16_t glass_addr,
75 touch_role_t glass_role, uint32_t now_ms);
76
84
92bool touch_inject_glass(touch_point_t *pts, int *count, bool fresh);
93
102bool touch_inject_read(touch_point_t *pts, int *count, uint32_t now_ms);
103
110void touch_inject_mark(touch_event_t *evts, int n);
111
119uint32_t touch_inject_age_ms(uint32_t now_ms);
120
121#ifdef __cplusplus
122}
123#endif
A DOWN, MOVE or UP of one contact.
Definition touch_types.h:69
Definition touch_map.h:17
One contact.
Definition touch_types.h:23
Touch input for the 7-inch ESP32-P4 display board.
void touch_inject_mark(touch_event_t *evts, int n)
Mark the UP of every injected contact the merge cut to make room for the glass's TOUCH_FLAG_NO_TAP (t...
Definition touch_inject.c:197
void touch_inject_attach(i2c_master_bus_handle_t bus, uint16_t glass_addr, touch_role_t glass_role, uint32_t now_ms)
Look for the injector on bus beside the controller touch_init() found.
Definition touch_inject.c:49
touch_map_t touch_inject_map(void)
The map for the injector's contacts: panel pixels of the UI's BOARD_UI_H_RES x BOARD_UI_V_RES area,...
Definition touch_inject.c:99
uint32_t touch_inject_age_ms(uint32_t now_ms)
How old the injector's share of touch is.
Definition touch_inject.c:204
bool touch_inject_glass(touch_point_t *pts, int *count, bool fresh)
Merge the glass's set with the injector's last one. No bus traffic.
Definition touch_inject.c:121
bool touch_inject_read(touch_point_t *pts, int *count, uint32_t now_ms)
Read the injector when it is attached and due, detach it when it has been silent too long,...
Definition touch_inject.c:153
Two touch controllers, one contact set: the glass's GT911 at 0x5D and a touch injector at 0x14 (testb...
touch_role_t
What a controller found at start-up is to the touch task.
Definition touch_merge.h:88
Plain data types shared by the touch controller driver, the coordinate mapper and the event tracker....