adafruit / adafruit/TFTLCD-Library
Constructor is setting a digital pin before setting OUTPUT mode.
- Dominant language
- C
- Stars
- 377
- Forks
- 262
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
In the constructor
`Adafruit_TFTLCD::Adafruit_TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset)`
we see the following lines of code:
```
if (reset) {
digitalWrite(reset, HIGH);
pinMode(reset, OUTPUT);
}
```
Is it valid to be setting the line to HIGH before the pinMode is set? On SAMD51 the default pin mode is INPUT_PULLUP.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate Adafruit_TFTLCD::Adafruit_TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset) and inspect the reset-pin initialization shown in the issue. Check the expected behavior on SAMD51, then resolve the issue by confirming whether the ordering is valid and documenting or correcting it as appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arduino, c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100