Skip to content

Commit 797fda1

Browse files
committed
feat(multi-touch): Prepare tt21100 driver for future changes
1 parent 7da7258 commit 797fda1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

0 commit comments

Comments
 (0)