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:
committed by
Brendan Le Foll
parent
78a4d12a37
commit
c63e38a57e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user