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

Constructor order inconsistent - For HWSPI with or without specifying which SPI #91

Open
KurtE opened this issue Oct 18, 2023 · 0 comments

Comments

@KurtE
Copy link
Contributor

KurtE commented Oct 18, 2023

It is probably already known, but while trying to get this library to work with the Arduino GIGA R1 board on the SPI pins on the normal shield pins 10-13 are on this board are SPI1. So I tried simply adding the &SPI to the start of the HW constructor and did not work.

Finally tracked it down to two issues: The first is that they did not define the

The second is that the order of the parameters in the constructor:
Adafruit_ILI9341(int8_t _CS, int8_t _DC, int8_t _RST = -1);
The second one:
Adafruit_ILI9341(SPIClass *spiClass, int8_t dc, int8_t cs = -1, int8_t rst = -1);
Notice the first one is CS, DC, RST
The second one is dc, cs, rst

So you need to swap the CS and DC in your constructor.

My guess is, to late to try to fix the code, but potentially could add this to one or more of the examples.

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

No branches or pull requests

1 participant