If you are asking a question, please follow this template:
-
My goal is: [describe your goal]
to link a C function to MJS -
My actions are: [describe your actions - code, commands, etc]
let rxAcc = ‘’; // Accumulated Rx data
let start;
let finish;
let getMsg=ffi(‘int get_msg(char *,int,int *,int *)’);
let ret=getMsg(rxAcc, rxAcc.length, &start, &finish);
C routine: int get_msg(char *buffer, int len, int *start, int *finish)
-
The result I see is: [show the result - log, etc]
MJS error: parse error at line 92: [&start, &f] -
My expectation & question is: [describe your expectation and your question]
getting the values for ret, start and finish returned to the MJS code