Added pinMode setting to attach #21
@@ -33,6 +33,12 @@ void Bounce::attach(int pin) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void Bounce::attach(int pin, int mode){
|
||||
pinMode(pin, mode);
|
||||
|
||||
this->attach(pin);
|
||||
}
|
||||
|
||||
void Bounce::interval(uint16_t interval_millis)
|
||||
{
|
||||
this->interval_millis = interval_millis;
|
||||
|
||||
@@ -47,6 +47,9 @@ class Bounce
|
||||
|
||||
// Attach to a pin (and also sets initial state)
|
||||
void attach(int pin);
|
||||
|
||||
// Attach to a pin (and also sets initial state) and sets pin to mode (INPUT/INPUT_PULLUP/OUTPUT)
|
||||
void attach(int pin, int mode);
|
||||
|
||||
// Sets the debounce interval
|
||||
void interval(uint16_t interval_millis);
|
||||
|
||||
Reference in New Issue
Block a user