kevincoooool/esp_lcd_touch_st7123

1.0.2~1

Latest
uploaded 3 days ago
ESP LCD Touch ST7123 (KSDIY fork of espressif/esp_lcd_touch_st7123 1.0.2: per-finger track IDs, bounded report count, INT pull-up)

Readme

# ESP LCD Touch ST7123 (KSDIY fork)

Fork of [`espressif/esp_lcd_touch_st7123`](https://components.espressif.com/components/espressif/esp_lcd_touch_st7123)
1.0.2 from [esp-iot-solution](https://github.com/espressif/esp-iot-solution/tree/master/components/display/lcd_touch/esp_lcd_touch_st7123),
published as `kevincoooool/esp_lcd_touch_st7123` until the fixes below are available upstream. The API, header and
configuration macro are unchanged, so it is a drop-in replacement.

```yaml
dependencies:
  kevincoooool/esp_lcd_touch_st7123: "~1.0.2"
```

Do not depend on both this component and `espressif/esp_lcd_touch_st7123` in one project: both register the
component name `esp_lcd_touch_st7123`.

## Changes from upstream 1.0.2

All three changes are in `esp_lcd_touch_st7123.c` and marked `LOCAL PATCH`.

### 1. A track ID per finger

Upstream fills only `x`, `y` and `strength` and registers no `get_track_id` callback, so
`esp_lcd_touch_get_data()` returns every point with `track_id == 0` and consumers that pair frames by
track ID merge simultaneous fingers into one pointer. `read_data()` now stores the controller's report
slot index, which stays with a finger while it is down, as `track_id`, and `get_track_id()` returns it.
`esp_lcd_touch_get_data()` calls `get_xy()`, which consumes `data.points`, before `get_track_id()`, so
`get_track_id()` copies the requested count from `data.coords` instead of the cleared point count.

### 2. Bounded report count

`read_data()` reads the controller's `MAX_TOUCHES` register into a ten-entry `touch_report[]` and then
reads that many reports. An unexpected value overflowed the stack array; it is now clamped.

### 3. INT pull-up

The ST7123 INT output is active-low and open-drain. Upstream configures the GPIO without a pull-up, so
the line floats between reports. An active-low INT now enables the internal pull-up.

## License

Apache-2.0, as upstream; see `license.txt`. Copyright Espressif Systems (Shanghai) CO LTD; KSDIY changes by
Kevincoooool.

Links

Supports all targets

To add this component to your project, run:

idf.py add-dependency "kevincoooool/esp_lcd_touch_st7123^1.0.2~1"

download archive

Stats

  • Archive size
    Archive size ~ 9.97 KB
  • Downloaded in total
    Downloaded in total 0 times
  • Downloaded this version
    This version: 0 times

Badge

kevincoooool/esp_lcd_touch_st7123 version: 1.0.2~1
|