Closed
Description
Allow something like
attachInterrupt(pin, [](){
// function body
}, CHANGE);
and
class MyClass() {
public:
MyClass(int pin1, int pin2) {
attachInterrupt(pin1, std::bind(&MyClass::onPinChange, this, pin1), CHANGE);
attachInterrupt(pin2, std::bind(&MyClass::onPinChange, this, pin2), CHANGE);
}
protected:
void onPinChange(int pin) {
// handler here
}
};
without breaking usage of attachInterrupt from C code.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.