We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
enum class OpenThermMode : bool { SLAVE = false, MASTER = true };
OpenTherm(int inPin = 4, int outPin = 5, OpenThermMode isSlave = OpenThermMode::MASTER, bool InvIn = false, bool InvOut = false);
OpenTherm::OpenTherm(int inPin, int outPin, OpenThermMode isSlave , bool InvIn , bool InvOut ) : status(OpenThermStatus::NOT_INITIALIZED), inPin(inPin), outPin(outPin), InvIn(InvIn), InvOut(InvOut),
int IRAM_ATTR OpenTherm::readState() { if (InvIn) return 1 ^ digitalRead(inPin); else return digitalRead(inPin); } void OpenTherm::setActiveState() { if (InvOut) digitalWrite(outPin, LOW); else digitalWrite(outPin, HIGH); } void OpenTherm::setIdleState() { if (InvOut) digitalWrite(outPin, HIGH); else digitalWrite(outPin, LOW); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
OpenTherm(int inPin = 4, int outPin = 5, OpenThermMode isSlave = OpenThermMode::MASTER, bool InvIn = false, bool InvOut = false);
The text was updated successfully, but these errors were encountered: