yuri91 / ili9341-rs

A WIP, no_std, generic driver for the ILI9341 (and ILI9340C) TFT LCD display
Apache License 2.0
57 stars 50 forks source link

Display bus support #2

Closed tarcieri closed 4 years ago

tarcieri commented 5 years ago

We were interested in using this crate with the AdaFruit PyPortal. One small problem... the board does not support SPI (out-of-the-box):

https://learn.adafruit.com/adafruit-pyportal/pinouts

To give you the most data throughput we configure the screen for 8-bit interfacing. That means 8 data lines and a collection of 4 or 5 control lines. If you really want to use the screen in SPI mode, you can do so by soldering closed the SPI jumper and cutting/resoldering the 8/SPI jumper over to the SPI side. That's for advanced users!

...so we could resolder the board to support SPI mode, but it seems like the display bus mode would be ideal, and also ensure that other users of the same board don't have to modify the hardware.

We were looking at the AdaFruit displayio CircuitPython package and saw it has two modes:

https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/__init__.html

  • Display – Manage updating a display over a display bus
  • FourWire – Manage updating a display over SPI four wire protocol

We were curious if you'd be interested in supporting both modes in this crate, as it seems that would be the ideal way for us (and other potential Rust PyPortal) users to leverage the display both out-of-the-box, and with the best performance.

If so, we can potentially send a PR which attempts to translate the CircuitPython code.

yuri91 commented 5 years ago

Hi! I am interested in having support for the display bus mode in this crate. I don't have a device with that interface, but if you manage to get a working implementation I will accept a PR.

sajattack commented 5 years ago

Started working on this here https://github.com/sajattack/ili9341-rs/tree/8bit-parallel

yuri91 commented 4 years ago

@sajattack what are your thoughts on this issue now that https://github.com/yuri91/ili9341-rs/pull/7 and https://github.com/yuri91/ili9341-rs/pull/8 are merged ?

sajattack commented 4 years ago

Feel free to close it.

yuri91 commented 4 years ago

oh, actually I meant to tag @tarcieri , who opened the issue

tarcieri commented 4 years ago

I can try to test it out at some point, but otherwise it looks like what's needed

yuri91 commented 4 years ago

Ok. I am going to close this. Feel free to reopen or file a new issue if something is missing or not working.