Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upattachInterrupt with std::function #8
Conversation
A way to add member function for an interrupt callback. std::function<void()> int_func =std::bind(&button::press,this); attachInterrupt(digitalPinToInterrupt(pin),int_func,FALLING);
Moved from arduino/Arduino#5831
@straccio commented 14 days ago
A way to add member function for an interrupt callback.
std::function<void()> int_func =std::bind(&button::press,this);
attachInterrupt(digitalPinToInterrupt(pin),int_func,FALLING);