I have a function such as:
typedef void(*timercallback)(void);
void timer1_attachInterrupt(timercallback userFunc);
I wish to call a member method rather than a C style function, so I have tried the following lambda:
timer1_attachInterrupt([this](void) -> void { _member_method(); });
However I get the compiler error:
No suitable conversion function from "lambda [] void () -> void" to "timercallback" exists
As far as I can see, the lambda has void arguments like the typedef, and returns void like the tyepdef. What am I missing?