mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Add dry contact support for IO Remote and Relays #165
This commit is contained in:
parent
87995bf707
commit
bb36ed0f82
9 changed files with 194 additions and 122 deletions
|
|
@ -492,6 +492,15 @@ bool EthernetSettings::toJSON(JsonObject &obj) {
|
|||
obj["MDIOPin"] = this->MDIOPin;
|
||||
return true;
|
||||
}
|
||||
bool EthernetSettings::usesPin(uint8_t pin) {
|
||||
if((this->CLKMode == 0 || this->CLKMode == 1) && pin == 0) return true;
|
||||
else if(this->CLKMode == 2 && pin == 16) return true;
|
||||
else if(this->CLKMode == 3 && pin == 17) return true;
|
||||
else if(this->PWRPin == pin) return true;
|
||||
else if(this->MDCPin == pin) return true;
|
||||
else if(this->MDIOPin == pin) return true;
|
||||
return false;
|
||||
}
|
||||
bool EthernetSettings::save() {
|
||||
pref.begin("ETH");
|
||||
pref.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue