atanisoft / esp_lcd_touch_xpt2046

MIT License
14 stars 4 forks source link

Add Aux input, temperature reads, fix battery voltage read, fixes #5

Closed dvosully closed 7 months ago

dvosully commented 7 months ago

This PR adds the following capabilities:

It also fixes the following issues:

Tested on IDF v5.2.1 with a TSC2048 (the TI chip which the XPT2046 cloned)

dvosully commented 7 months ago

I have added the check for the PENIRQ active to xpt2046_read_data. If the input is high (no touch) then it returns no touch immediately, instead of querying the Z pressure registers.

It builds and runs normally when CONFIG_XPT2046_INTERRUPT_MODE is enabled and int_gpio_num is set to GPIO_NUM_NC, but I can't test its operation when connected as the PENIRQ is not connected on my board.

atanisoft commented 7 months ago

I can't test its operation when connected as the PENIRQ is not connected on my board.

I'll see if I can test it out, I've got a touch based board (also using the TI part) to see if I can trigger it.