2011-04-28 11:31 PM
Calling custom function in interrupt handler
2011-05-17 05:33 AM
Hi Norbert,
as you are talking about classes and static methods, I assume you are using C++. In an interrupt handler custom functions can be called (as from any other ''normal'' function). When you are using C++ you have to make sure that the called function uses a C function signature instead of a C++ signature. That can be archived by a forward declaration likeextern ''C''{ void myFunction(int param); } in your .h file. This method works only for function in the global scope and not for class functions/methods. If you want to invoke a static class method, you need a wrapper function in the .cpp file with a c signature (as mentioned above). Within that function you can call the C++ method:<file: test.cpp> void myFunction(int param) { MyClass::function(param); } </file: test.cpp> Carsten