8000 Added option to enable toggling CS between init commands by makermelissa · Pull Request #1685 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Added option to enable toggling CS between init commands #1685

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 emai 8000 ls.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 28, 2019
Merged

Added option to enable toggling CS between init commands #1685

merged 11 commits into from
Mar 28, 2019

Conversation

makermelissa
Copy link
Collaborator

The ST7789 requires the Chip Select to toggle High then Low between init commands in order to successfully initialize. I added an option to enable this which is off by default so it won't break any existing configurations. This is needed for the ST7789 displayio driver. This PR fixes #1684

@ladyada
Copy link
Member
ladyada commented Mar 24, 2019

these displays tend to want CS toggled before each command - i'd make it the default behavior rather than the exception

@makermelissa
Copy link
Collaborator Author

Ok thanks. Easy enough change.

@makermelissa
Copy link
Collaborator Author

Should I also set it to enabled for the PyPortal, Hallowing, and PyBadge? Those are in the board.c files for each.

@ladyada
Copy link
Member
ladyada commented Mar 24, 2019

yeah, i think it should always do that - its the expected behavior, in fact it may be one of the reasons i've seen gamma not always set.
if something breaks we'll find out soon :)

Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do any displays need this set to False? Why not just always do it when using FourWire?

@makermelissa
Copy link
Collaborator Author

Yeah, I can go through and remove the option now. Originally added when I thought it would default to false.

@makermelissa
Copy link
Collaborator Author

Ok, this has been cleaned up so that it always has the toggle happen.

Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the CS toggle be in send when command is true instead of the init sequence? What happens when we send multiple commands in a row to set the memory window?

@ladyada
Copy link
Member
ladyada commented Mar 27, 2019

in arduino, traditionally we toggle CS on the beginning of every command

@makermelissa
Copy link
Collaborator Author

Great idea. I'll go with that. It will make things even simpler.

@makermelissa makermelissa added this to the 4.0.0 - Bluetooth milestone Mar 28, 2019
Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa! Very simple. Thank you!

@tannewt tannewt merged commit 9ff54fd into adafruit:master Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

displayio: Option needed to allow SPI Chip Select Toggle between init commands
4 participants
0