10 years, 3 months ago.

FunctionPointer callback with non-void argument

I want to assign a callback function to a FunctionPointer object with a type like

void function (int)

The FunctionPointer::attach method allows only void (*)(void) functions. I did not find a suitable documentation of FunctionPointer to write a derived class. Where do I have to go?

1 Answer

10 years, 3 months ago.

FunctionPointer can be found somewhere in the mbed-src library. But for your requirements, have a look at: http://mbed.org/cookbook/FPointer, either use that directly, or how to make it.

Accepted Answer

Thanks Eric! The FPointer class works very well, my problem is solved.

posted by Eggert Ehmke 05 Jan 2014