Skip to content

Commit e10be6a

Browse files
committed
feat(multi-touch): Update touch drivers to the latest lcd_touch
1 parent b82d9e4 commit e10be6a

File tree

10 files changed

+36
-36
lines changed

10 files changed

+36
-36
lines changed

components/lcd_touch/esp_lcd_touch_cst816s/esp_lcd_touch_cst816s.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ static esp_err_t read_data(esp_lcd_touch_handle_t tp)
116116
tp->data.points = point.num;
117117
/* Fill all coordinates */
118118
for (int i = 0; i < point.num; i++) {
119-
tp->data.coords[i].x = point.x_h << 8 | point.x_l;
120-
tp->data.coords[i].y = point.y_h << 8 | point.y_l;
119+
tp->data.points_data[i].x = point.x_h << 8 | point.x_l;
120+
tp->data.points_data[i].y = point.y_h << 8 | point.y_l;
121121
}
122122
portEXIT_CRITICAL(&tp->data.lock);
123123

@@ -130,11 +130,11 @@ static bool get_xy(esp_lcd_touch_handle_t tp, uint16_t *x, uint16_t *y, uint16_t
130130
/* Count of points */
131131
*point_num = (tp->data.points > max_point_num ? max_point_num : tp->data.points);
132132
for (size_t i = 0; i < *point_num; i++) {
133-
x[i] = tp->data.coords[i].x;
134-
y[i] = tp->data.coords[i].y;
133+
x[i] = tp->data.points_data[i].x;
134+
y[i] = tp->data.points_data[i].y;
135135

136136
if (strength) {
137-
strength[i] = tp->data.coords[i].strength;
137+
strength[i] = tp->data.points_data[i].strength;
138138
}
139139
}
140140
/* Invalidate */

components/lcd_touch/esp_lcd_touch_cst816s/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.1.0"
1+
version: "1.1.1"
22
description: ESP LCD Touch CST816S - touch controller CST816S
33
url: https://github.com/espressif/esp-bsp/tree/master/components/lcd_touch/esp_lcd_touch_cst816s
44
dependencies:

components/lcd_touch/esp_lcd_touch_ft5x06/esp_lcd_touch_ft5x06.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -195,8 +195,8 @@ static esp_err_t esp_lcd_touch_ft5x06_read_data(esp_lcd_touch_handle_t tp)
195195

196196
/* Fill all coordinates */
197197
for (i = 0; i < points; i++) {
198-
tp->data.coords[i].x = (((uint16_t)data[(i * 6) + 0] & 0x0f) << 8) + data[(i * 6) + 1];
199-
tp->data.coords[i].y = (((uint16_t)data[(i * 6) + 2] & 0x0f) << 8) + data[(i * 6) + 3];
198+
tp->data.points_data[i].x = (((uint16_t)data[(i * 6) + 0] & 0x0f) << 8) + data[(i * 6) + 1];
199+
tp->data.points_data[i].y = (((uint16_t)data[(i * 6) + 2] & 0x0f) << 8) + data[(i * 6) + 3];
200200
}
201201

202202
portEXIT_CRITICAL(&tp->data.lock);
@@ -218,11 +218,11 @@ static bool esp_lcd_touch_ft5x06_get_xy(esp_lcd_touch_handle_t tp, uint16_t *x,
218218
*point_num = (tp->data.points > max_point_num ? max_point_num : tp->data.points);
219219

220220
for (size_t i = 0; i < *point_num; i++) {
221-
x[i] = tp->data.coords[i].x;
222-
y[i] = tp->data.coords[i].y;
221+
x[i] = tp->data.points_data[i].x;
222+
y[i] = tp->data.points_data[i].y;
223223

224224
if (strength) {
225-
strength[i] = tp->data.coords[i].strength;
225+
strength[i] = tp->data.points_data[i].strength;
226226
}
227227
}
228228

components/lcd_touch/esp_lcd_touch_ft5x06/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.7"
1+
version: "1.0.8"
22
description: ESP LCD Touch FT5x06 - touch controller FT5x06
33
url: https://github.com/espressif/esp-bsp/tree/master/components/lcd_touch/esp_lcd_touch_ft5x06
44
dependencies:

components/lcd_touch/esp_lcd_touch_gt1151/esp_lcd_touch_gt1151.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -143,9 +143,9 @@ static esp_err_t read_data(esp_lcd_touch_handle_t tp)
143143

144144
/* Fill all coordinates */
145145
for (int i = 0; i < touch_cnt; i++) {
146-
tp->data.coords[i].x = touch_report->touch_record[i].x;
147-
tp->data.coords[i].y = touch_report->touch_record[i].y;
148-
tp->data.coords[i].strength = touch_report->touch_record[i].strength;
146+
tp->data.points_data[i].x = touch_report->touch_record[i].x;
147+
tp->data.points_data[i].y = touch_report->touch_record[i].y;
148+
tp->data.points_data[i].strength = touch_report->touch_record[i].strength;
149149
}
150150
portEXIT_CRITICAL(&tp->data.lock);
151151

@@ -158,11 +158,11 @@ static bool get_xy(esp_lcd_touch_handle_t tp, uint16_t *x, uint16_t *y, uint16_t
158158
/* Count of points */
159159
*point_num = (tp->data.points > max_point_num ? max_point_num : tp->data.points);
160160
for (size_t i = 0; i < *point_num; i++) {
161-
x[i] = tp->data.coords[i].x;
162-
y[i] = tp->data.coords[i].y;
161+
x[i] = tp->data.points_data[i].x;
162+
y[i] = tp->data.points_data[i].y;
163163

164164
if (strength) {
165-
strength[i] = tp->data.coords[i].strength;
165+
strength[i] = tp->data.points_data[i].strength;
166166
}
167167
}
168168
/* Invalidate */

components/lcd_touch/esp_lcd_touch_gt1151/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.5~2"
1+
version: "1.0.6"
22
description: ESP LCD Touch GT1151 - touch controller GT1151
33
url: https://github.com/espressif/esp-bsp/tree/master/components/lcd_touch/esp_lcd_touch_gt1151
44
dependencies:

components/lcd_touch/esp_lcd_touch_stmpe610/esp_lcd_touch_stmpe610.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -200,9 +200,9 @@ static esp_err_t esp_lcd_touch_stmpe610_read_data(esp_lcd_touch_handle_t tp)
200200
ESP_RETURN_ON_ERROR(touch_stmpe610_write(tp, ESP_LCD_TOUCH_STMPE610_REG_INT_STA, 0xFF), TAG, "STMPE610 write error!");
201201

202202
portENTER_CRITICAL(&tp->data.lock);
203-
tp->data.coords[0].x = data_convert(x / cnt, 150, 3800, 0, tp->config.x_max);
204-
tp->data.coords[0].y = data_convert(y / cnt, 150, 3800, 0, tp->config.y_max);
205-
tp->data.coords[0].strength = z / cnt;
203+
tp->data.points_data[0].x = data_convert(x / cnt, 150, 3800, 0, tp->config.x_max);
204+
tp->data.points_data[0].y = data_convert(y / cnt, 150, 3800, 0, tp->config.y_max);
205+
tp->data.points_data[0].strength = z / cnt;
206206
tp->data.points = 1;
207207
portEXIT_CRITICAL(&tp->data.lock);
208208

@@ -223,11 +223,11 @@ static bool esp_lcd_touch_stmpe610_get_xy(esp_lcd_touch_handle_t tp, uint16_t *x
223223
*point_num = (tp->data.points > max_point_num ? max_point_num : tp->data.points);
224224

225225
for (size_t i = 0; i < *point_num; i++) {
226-
x[i] = tp->data.coords[i].x;
227-
y[i] = tp->data.coords[i].y;
226+
x[i] = tp->data.points_data[i].x;
227+
y[i] = tp->data.points_data[i].y;
228228

229229
if (strength) {
230-
strength[i] = tp->data.coords[i].strength;
230+
strength[i] = tp->data.points_data[i].strength;
231231
}
232232
}
233233

components/lcd_touch/esp_lcd_touch_stmpe610/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.7"
1+
version: "1.0.8"
22
description: ESP LCD Touch STMPE610 - touch controller STMPE610
33
url: https://github.com/espressif/esp-bsp/tree/master/components/esp_lcd_touch_stmpe610
44
dependencies:

components/lcd_touch/esp_lcd_touch_tt21100/esp_lcd_touch_tt21100.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ static esp_err_t esp_lcd_touch_tt21100_read_data(esp_lcd_touch_handle_t tp)
237237
for (i = 0; i < tp_num; i++) {
238238
p_touch_data = &p_report_data->touch_record[i];
239239

240-
tp->data.coords[i].x = p_touch_data->x;
241-
tp->data.coords[i].y = p_touch_data->y;
242-
tp->data.coords[i].strength = p_touch_data->pressure;
240+
tp->data.points_data[i].x = p_touch_data->x;
241+
tp->data.points_data[i].y = p_touch_data->y;
242+
tp->data.points_data[i].strength = p_touch_data->pressure;
243243
}
244244

245245
portEXIT_CRITICAL(&tp->data.lock);
@@ -268,11 +268,11 @@ static bool esp_lcd_touch_tt21100_get_xy(esp_lcd_touch_handle_t tp, uint16_t *x,
268268
*point_num = (tp->data.points > max_point_num ? max_point_num : tp->data.points);
269269

270270
for (size_t i = 0; i < *point_num; i++) {
271-
x[i] = tp->data.coords[i].x;
272-
y[i] = tp->data.coords[i].y;
271+
x[i] = tp->data.points_data[i].x;
272+
y[i] = tp->data.points_data[i].y;
273273

274274
if (strength) {
275-
strength[i] = tp->data.coords[i].strength;
275+
strength[i] = tp->data.points_data[i].strength;
276276
}
277277
}
278278

components/lcd_touch/esp_lcd_touch_tt21100/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.1.1"
1+
version: "1.1.2"
22
description: ESP LCD Touch TT21100 - touch controller TT21100
33
url: https://github.com/espressif/esp-bsp/tree/master/components/lcd_touch/esp_lcd_touch_tt21100
44
dependencies:

0 commit comments

Comments
 (0)