Class member function pointer
I'm trying to use a class function (interrupt service routine), void (ClassName::*fp)(void)=ClassName::FunctionName; and attaching it to an Arduino interrupt pin using the function with the following type inputs but that doesn't work. void attachInterrupt(int, void (*)(void),int); How can I make this happen? The interrupt service routine (ISR) needs to access privat object data, so I can't make a function outside of the class. My compiler error: ClassName.cpp : : In constructor 'ClassName::ClassName()': ClassName.cpp : *)()' ClassName.cpp : *)()' to 'void (*)()' for argument '2' to 'void