Split Implementation Into Class Files
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
////////////
|
||||
// BOUNCE //
|
||||
////////////
|
||||
|
||||
|
||||
Bounce::Bounce()
|
||||
: pin(0)
|
||||
{}
|
||||
|
||||
void Bounce::attach(int pin) {
|
||||
this->pin = pin;
|
||||
|
||||
// SET INITIAL STATE
|
||||
begin();
|
||||
}
|
||||
|
||||
void Bounce::attach(int pin, int mode){
|
||||
setPinMode(pin, mode);
|
||||
this->attach(pin);
|
||||
}
|
||||
@@ -130,26 +130,6 @@ bool Debouncer::fell() const
|
||||
return !getStateFlag(DEBOUNCED_STATE) && getStateFlag(CHANGED_STATE);
|
||||
}
|
||||
|
||||
////////////
|
||||
// BOUNCE //
|
||||
////////////
|
||||
|
||||
|
||||
Bounce::Bounce()
|
||||
: pin(0)
|
||||
{}
|
||||
|
||||
void Bounce::attach(int pin) {
|
||||
this->pin = pin;
|
||||
|
||||
// SET INITIAL STATE
|
||||
begin();
|
||||
}
|
||||
|
||||
void Bounce::attach(int pin, int mode){
|
||||
setPinMode(pin, mode);
|
||||
this->attach(pin);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user