juj / fbcp-ili9341

A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3, 4 and Zero
MIT License
1.55k stars 258 forks source link

ili9341 + touch #144

Open MIKEFROD opened 4 years ago

MIKEFROD commented 4 years ago

Hi, i am using a 2.8" ili9341 display with touch support (XPT2046) similar to this one: https://www.amazon.it/Hiletgo%C2%AE-320-risoluzione-Touch-panel-ILI9341/dp/B0798N2HHW

I am connecting the display to a Raspberry PI 4. In my PCB i have chosen to use a single SPI bus for display and touch parts, sure that that must be a way to share the SPI bus. Up to now i am able to use only the display part (at high fps, fbcp is very good)!

I have read that XPT2046 touch controller is somehow supported and has been tested on particular devices.

Is there a way to set the driver for use with the ili9341+XPT2046 display? If yes, how can this be done?

Thanks in advance.

juj commented 4 years ago

fbcp-ili9341 indeed does not, unfortunately, allow sharing the SPI bus with other drivers, but any sharing of the bus will need to be tightly coordinated inside the main fbcp-ili9341 driver program. (such generic driver model for bus sharing would defeat the performance improvements that fbcp-ili9341 implements)

There is a development branch in https://github.com/juj/fbcp-ili9341/pull/76 that develops touch support for XPT2046. It is for ILI9486 foremost, not sure if anyone has tried it against ILI9341.