-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
The setPins function does not check if the readPin is defined when pinMode is called. On some boards this results in a lockup, when pinMode(-1, INPUT) is called.
See:
Line 20 in 1fe332c
| pinMode(readPin, INPUT); |
Possible solution:
void Shifty::setPins(int dataPin, int clockPin, int latchPin, int readPin) {
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(latchPin, OUTPUT);
if(readPin != -1) {
pinMode(readPin, INPUT);
this->readPin = readPin;
}
this->dataPin = dataPin;
this->clockPin = clockPin;
this->latchPin = latchPin;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels