#include "ButtonInterrupt.h" ButtonInterrupt::ButtonInterrupt(PinName buttonPin, PinMode pullType, Edge triggerOn, void (*executeMethod)(void)) { InterruptIn btnInterrupt(buttonPin); btnInterrupt.mode(pullType); if (triggerOn == Rising) { btnInterrupt.rise(executeMethod); } else { btnInterrupt.fall(executeMethod); } }