FunctionPointer::call() implementation

18 Jan 2011

Is the implementation source to FunctionPointer::call() (defined in FunctionPointer.h) available?  I'd like to make a modified verstion that takes as an argument a function/method with a parameter.

I found an alternative solution here, but wondered if I could look at how FunctionPointer does it.

Thanks.

18 Jan 2011

Mbed's source isn't available. However, see this post on how to do what you want.

[edit, lol, I only saw the first line in my mailbox and knew I posted something for that, then I saw you linked to it already!]

18 Jan 2011

I just published FPointer that maybe of use to you.

19 Jan 2011

Hi Andy,

Thanks for the prompt response - that almost exactly what I'm looking for ("almost" ==> I need an int argument, not unsigned, but that's trivial to change).

19 Jan 2011

Hi. I nearly did an "int" version. But in the end it's a case of "where do you stop?". So by choosing a uint32_t version, that allows fo pass pointers as LPC17xx natural width and pointer size are both 32bit. example1.h shows "passing an int" by passing a pointer to the int. Anyway, glads it's helped.

19 Jan 2011

I also just created these two cookbook pages which maybe of use to others: /cookbook/FunctionPointer and /cookbook/FPointer