mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
java: Added "automatic load library" code for new sensors
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
01119436a9
commit
1667569560
@ -8,3 +8,14 @@
|
||||
%}
|
||||
|
||||
%include "groveultrasonic.h"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_groveultrasonic");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
@ -10,3 +10,14 @@
|
||||
%}
|
||||
|
||||
%include "ozw.h"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_ozw");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
@ -13,3 +13,14 @@
|
||||
%ignore getRxBuffer();
|
||||
|
||||
%include "sx1276.h"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_sx1276");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
Loading…
x
Reference in New Issue
Block a user