-
• #2
You need to do something like this: https://github.com/espruino/Espruino/blob/master/src/jswrap_promise.c#L83
Note the JSWAT_* enums determine what arguments the function takes. Just use JSWAT_VOID in your case.
-
• #4
Not really, no. You'd need to look at other code, or there are some good threads on this forum. Also worth looking at http://www.espruino.com/Internals
However, I can't assist you - especially as you're not using one of the official Espruino boards. If you're doing this for a company and they need assistance then I can do consultancy work.
In a C native module, I want to call other jswrap functions and asign my C function as the callback.
How to do that?
For example,
void mycallback();