Private
Public Access
2
0

java: Migrate IsrCallbacks to Java's Runnable class

Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Petre Eftime
2015-12-16 16:56:38 +02:00
committed by Brendan Le Foll
parent 78a4d12a37
commit c63e38a57e
9 changed files with 104 additions and 37 deletions

View File

@@ -42,6 +42,9 @@
return $jnicall;
}
%typemap(jtype) jobject runnable "java.lang.Runnable"
%typemap(jstype) jobject runnable "java.lang.Runnable"
namespace mraa {
class Spi;
%typemap(out) uint8_t*
@@ -55,14 +58,18 @@ class Spi;
%ignore write(const char* data, int length);
%ignore read(char* data, int length);
%ignore globVM;
%ignore env_key;
%ignore mraa_java_isr_callback;
%feature("director") IsrCallback;
SWIG_DIRECTOR_OWNED(IsrCallback)
%include ../mraa.i
%wrapper %{
JavaVM *globVM;
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
/* initialize mraa */
globVM = vm;
mraa_init();
return JNI_VERSION_1_8;
}