I have the following system function:
int sock_yield( void *s, void (*fn)() );
to which I need to pass a function that takes 2 parameters:
void reset(char buf,udp_Socket sock) {
if (-1 == udp_recv(&sock, &buf, sizeof(buf)));
if(buf=='R')
{
printf("\nReceived-> %c",buf);
forceSoftReset();
forceWatchdogTimeout();
}
}
When calling sock_yield function I can only pass it the name of the function without its parameter:
sock_yield(sock, reset)
How to specify the parameters of reset to be passed to sock_yield?
sock_yieldinvokefn?