Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for IT8951 based displays #31

Merged
merged 2 commits into from
Nov 3, 2019
Merged

Conversation

fimad
Copy link
Contributor

@fimad fimad commented Nov 3, 2019

I've tested this with a 6 inch display that uses the IT8951 controller board with both VNC and terminal and it seems to work well. I haven't tested with a 9 inch display but there isn't anything display specific in the driver (that I'm aware of) so it should just work.

Despite also being a SPI device there doesn't appear to actually be that much in common between this driver and the other display drivers so I ended up sub-classing from DisplayDriver instead of WaveshareEPD which has some SPI and GPIO bootstrapping.

fimad added 2 commits November 2, 2019 16:00
I've tested this with a 6 inch display that uses the IT8951 controller
board with both VNC and terminal and it seems to work well. I haven't
tested with a 9 inch display but there isn't anything display specific
in the driver (that I'm aware of) so it should just work.

This implantation is based off the WaveShare sample code in
https://github.com/waveshare/IT8951. There are some idiosyncrasies in
that code that I don't understand and aren't documented but appear
necessary. For example, manually controlling the CS pin instead of
letting the SPI driver code handle it...

Issue joukos#25
Previously the driver was using 8 bits-per-pixel for SPI transfers.
This is wasteful sine the actual display only supports 16 different gray
levels.

This updates the code to use a packed format that uses 4 bits-per-pixel.

There is the potential for further optimization when rendering text (or
other pure black and white images) to use 2 bits-per-pixel. However,
when I tried this the fast display mode did not properly clear pixels
between blits.

Issue joukos#25
@joukos joukos merged commit 7e405bf into joukos:master Nov 3, 2019
@joukos
Copy link
Owner

joukos commented Nov 3, 2019

Thank you so much for this awesome contribution! Makes me want to order one of the new 10.3" displays to try it out ;) I also appreciate the clarifying comments in the code.

I merged this now and will update the project README to mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants