2015-08-05 19:43:31 +03:00
|
|
|
%module javaupm_mma7455
|
|
|
|
|
%include "../upm.i"
|
2015-08-17 18:25:09 +03:00
|
|
|
%include "typemaps.i"
|
|
|
|
|
%include "arrays_java.i";
|
|
|
|
|
|
|
|
|
|
%apply unsigned char[] {unsigned char *};
|
|
|
|
|
%apply short *OUTPUT { short * ptrX, short * ptrY, short * ptrZ };
|
2015-08-05 19:43:31 +03:00
|
|
|
|
|
|
|
|
%{
|
|
|
|
|
#include "mma7455.h"
|
|
|
|
|
%}
|
|
|
|
|
|
2015-08-26 18:44:34 +03:00
|
|
|
%typemap(jni) short* "jshortArray"
|
|
|
|
|
%typemap(jstype) short* "short[]"
|
|
|
|
|
%typemap(jtype) short* "short[]"
|
|
|
|
|
|
|
|
|
|
%typemap(javaout) short* {
|
|
|
|
|
return $jnicall;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%typemap(out) short *readData {
|
|
|
|
|
$result = JCALL1(NewShortArray, jenv, 3);
|
|
|
|
|
JCALL4(SetShortArrayRegion, jenv, $result, 0, 3, (const signed short*)$1);
|
|
|
|
|
delete [] $1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%ignore readData(short *, short *, short *);
|
|
|
|
|
|
2015-08-05 19:43:31 +03:00
|
|
|
%include "mma7455.h"
|