java: fix Java return type for readData in MMA7455

Signed-off-by: Petre <petre.p.eftime@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Petre
2015-08-26 18:44:34 +03:00
committed by Mihai Tudor Panu
parent 4f30959a43
commit ea669ddfc6
3 changed files with 33 additions and 0 deletions

View File

@@ -10,4 +10,20 @@
#include "mma7455.h"
%}
%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 *);
%include "mma7455.h"