java: Updated gpio.c to use JNI functions set in mraa_lang_func
This is a re-design of commit 0041801. mraa_lang_func_t structure has been added (similar in design to mraa_adv_func_t) that points to JNI functions implemented in src/java/mraajni.c. Functions are set by libmraajava.so, see wrapper entry in src/java/mraajava.i. As gpio.c now uses these functions, language specific #ifdef code has been removed as JNI code is only called if functions are defined (i.e. not NULL) Signed-off-by: Henry Bruce <henry.bruce@intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
d313ac0579
commit
44b2367fdc
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Henry bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2014 Intel Corporation.
|
||||
* Author: Henry Bruce <henry.bruce@intel.com>
|
||||
* Copyright (c) 2014-2016 Intel Corporation.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -32,7 +32,7 @@ extern "C" {
|
||||
#include "mraa/types.h"
|
||||
|
||||
void mraa_java_set_jvm(JavaVM* vm);
|
||||
void mraa_java_isr_callback(void *args);
|
||||
void mraa_java_isr_callback(void* args);
|
||||
mraa_result_t mraa_java_attach_thread();
|
||||
void mraa_java_detach_thread();
|
||||
void* mraa_java_create_global_ref(void* args);
|
||||
@@ -41,4 +41,3 @@ void mraa_java_delete_global_ref(void* ref);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user