Thomas Ingleby
c1eeb8ab87
eclipse: change Java namespace
...
io.mraa -> org.eclipse.mraa
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com >
2019-11-13 13:14:20 -08:00
Thomas Ingleby
170bdd104f
spdx: add spdx tags to most files
...
Large change that removes the duplicated MIT notice withe a spdx tag
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com >
2019-05-23 10:09:12 -07:00
Brendan Le Foll
c2787441b4
java: Fix path to mraajni.c
...
Fix error in e2f964a280
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2017-09-06 11:18:33 +02:00
Brendan Le Foll
e2f964a280
swig: use swig_add_modules if cmake > 3.7
...
swig_add_module has been deprecated
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2017-09-06 11:11:10 +02:00
Sanrio Alvares
3d77c86634
peripheralman: implement gpio interrupt
...
Add gpio interrupt support for peripheral manager based on the
existing implementation in gpio.c.
Rewrite steps by using a global reference to lookup java isr
routine using JNI methods and add exception check after every call.
Free local reference class since it's not garbage collected and will
lead to a memory leak.
Signed-off-by: Sanrio Alvares <sanrio.alvares@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2017-07-21 08:09:37 +02:00
Noel Eck
380d2cf638
CMakeLists.txt: Find AT-specific jni.h
...
Updated the java CMakeLists file to set the JAVA_INCLUDE_PATH for
Android Things. The JAVA SWIG wrapper will require the jni.h from the
Android NDK.
Signed-off-by: Noel Eck <noel.eck@intel.com >
2017-04-24 14:42:55 -07:00
Vineela Tummalapalli
34b4d4a97b
Periphmraa: Bypass version check if version is 0.0
...
Signed-off-by: Vineela Tummalapalli <vineela.tummalapalli@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2017-04-24 14:42:55 -07:00
Stefan Andritoiu
567a92fde5
periphmraa: Added explicit casts for (implicit) casts that were causing errors in periphmraa build, in the wrapper code
...
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2017-04-24 14:42:55 -07:00
Stefan Andritoiu
d2bbfe376d
java: bypass version check for packages that don't have version specified
...
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@gmail.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2017-04-02 20:00:18 +02:00
Stefan Andritoiu
8e38c762f0
java: Added automatic pom.xml file creation in CMake
...
This is to add mraa package in a Maven repo
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-09-12 12:23:18 +01:00
Stefan Andritoiu
03b548c33b
java: Added version information & checks to ensure Java version matches Native version
...
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-06-01 15:21:12 +01:00
Mihai Tudor Panu
62e113ed3f
cmake: use LIB_INSTALL_DIR throughout instead of CMAKE_INSTALL_LIBDIR
...
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-04-12 14:18:19 +01:00
Brendan Le Foll
edd554b606
cmake: Fix message handling
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-03-22 18:12:29 +00:00
Henry Bruce
14617d0f36
java: Throw exception if mraa_init() fails
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2016-03-22 18:04:57 +00:00
Andrei Vasiliu
029e08669c
java: Changed JNI version to 1.6
...
This change is needed to compile/run with OpenJDK 7, as well as with
OpenJDK 8.
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-03-22 18:04:57 +00:00
Henry Bruce
44b2367fdc
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 >
2016-03-22 18:04:57 +00:00
Henry Bruce
9d497e08cd
java: mraa jni library now dynamically links to libmraa
...
libmraajava.so was statically linking to mraa object files causing
duplicate mraa platform instances if a UPM Java module was also loaded.
JNI functionality has been moved into src/java/mraajni.c. JVM object is
now set when JVM is loaded; see updates to src/java/mraajava.i.
This was necessary as the JVM object cannot be directly referenced from
mraa as it will not be available when building C/C++ examples.
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-03-22 18:04:57 +00:00
Andrei Vasiliu
df8d471cfb
java: Changed JNI version to 1.6
...
This change is needed to compile/run with OpenJDK 7, as well as with
OpenJDK 8.
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-03-01 16:22:54 +00:00
Henry Bruce
a73882240b
cmake: Stop processing if JAVA_HOME environment variable is not set
...
Signed-off-by: Henry Bruce <henry.bruce@intel.com >
2016-02-12 11:25:38 +00:00
Andrei Vasiliu
cb4c9152d6
java/CMakeLists.txt: Updated install path for Java library file
...
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-02-12 11:20:32 +00:00
Brendan Le Foll
44e705a518
java: Move mraajava.pc to java folder
...
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2016-02-02 10:05:57 +00:00
Petre Eftime
c63e38a57e
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 >
2016-01-21 15:28:03 +00:00
Stefan Andritoiu
d80e4295aa
mraajava.i: The director now uses a GlobalRef instead of a WeakRef to the IsrCallback object
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-12-14 15:33:34 +00:00
Stefan Andritoiu
93839d4865
java: Added auto load library code to the SWIG interface file
...
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-11-30 09:57:58 +00:00
Andrei Vasiliu
338feb2c3e
src/java/CMakeLists.txt: Modified path for javac and jar
...
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-10-09 14:38:30 +01:00
Petre Eftime
013c04c7b9
mraajava.i: Ignore read/write functions (in UART)
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-10-01 14:30:43 +01:00
Petre Eftime
35760929db
mraajava.i: Initialize mraa when library is loaded by the JVM
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-15 15:26:16 +01:00
Petre Eftime
c9c6ac785a
mraajava.i: Return array properly for SPI write
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-15 15:26:16 +01:00
Brendan Le Foll
eb5a3ac5d2
cmake: add ${mraa_LIBS} to linker for swig libraries
...
This means that the correct libraries are added when mraa_LIBS is appended,
fixes ft4222 handling with SWIG APIs
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-09-08 14:42:04 +01:00
Andrei Vasiliu
79f1571c32
java/CMakeLists.txt: re-changed install path to a more suitable one
...
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-08-24 16:46:33 +01:00
Andrei Vasiliu
bfac49e653
java/CMakeLists.txt: changed install path of jar and library for bindings
...
Signed-off-by: Andrei Vasiliu <andrei.vasiliu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-08-24 13:41:52 +01:00
Mihai Tudor Panu
296172d385
java: append -fpermissive to CMAKE_CXX_FLAGS rather than override
...
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-07-16 12:01:13 +01:00
Alexander Komarov
4302f0d0c3
java: Added Java SWIG binding creation
...
%init directive is not supported in java so move %init to js/py interface files
Signed-off-by: Alexander Komarov <alexander.komarov@intel.com >
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com >
2015-04-24 12:12:11 +01:00