I want to use node.js mraa library for Galileo. I need to set up an interrupt. I achieve this by:
var param=1;
var myLed = new mraa.Gpio(2);
myLed.dir(mraa.DIR_IN); //set the gpio direction to input
myLed.isr(mraa.EDGE_BOTH,function f(x){},param );
i get this errors
in method 'Gpio_isr', argument 3 of type 'void (*)(void *)'
The documentation for this function states
mraa_result_t isr ( Edge mode,
void(*)(void *) fptr,
void * args
)
Sets a callback to be called when pin value changes
Parameters
mode The edge mode to set
fptr Function pointer to function to be called when interupt is triggered
args Arguments passed to the interrupt handler (fptr)
Returns
Result of operation
I don't know how to set up the params of function...