diff options
author | Stefan Andritoiu <stefan.andritoiu@intel.com> | 2015-11-23 17:04:32 +0200 |
---|---|---|
committer | Mihai Tudor Panu <mihai.tudor.panu@intel.com> | 2015-11-24 14:36:17 -0800 |
commit | dddba3e8a471b56bc4214dda4299fbbfc0d1668b (patch) | |
tree | 757f1541ecf92ad6122bcd4e01cd1ba07c7e8772 | |
parent | 500e14663b35831b49e4b1f9a1a9dd84944a5b64 (diff) |
java: Added auto load library code in upm SWIG interfaces
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
118 files changed, 1298 insertions, 14 deletions
diff --git a/src/a110x/javaupm_a110x.i b/src/a110x/javaupm_a110x.i index 013ea44..7db0fcb 100644 --- a/src/a110x/javaupm_a110x.i +++ b/src/a110x/javaupm_a110x.i @@ -12,3 +12,14 @@ #include "a110x.h" %} %include "a110x.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_a110x"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ad8232/javaupm_ad8232.i b/src/ad8232/javaupm_ad8232.i index 85d1dc8..391f1cf 100644 --- a/src/ad8232/javaupm_ad8232.i +++ b/src/ad8232/javaupm_ad8232.i @@ -6,3 +6,14 @@ %} %include "ad8232.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ad8232"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/adafruitms1438/javaupm_adafruitms1438.i b/src/adafruitms1438/javaupm_adafruitms1438.i index 1ba5f2f..a02306c 100644 --- a/src/adafruitms1438/javaupm_adafruitms1438.i +++ b/src/adafruitms1438/javaupm_adafruitms1438.i @@ -6,3 +6,14 @@ %} %include "adafruitms1438.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_adafruitms1438"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/adafruitss/javaupm_adafruitss.i b/src/adafruitss/javaupm_adafruitss.i index 4ce6281..4e64220 100644 --- a/src/adafruitss/javaupm_adafruitss.i +++ b/src/adafruitss/javaupm_adafruitss.i @@ -5,3 +5,14 @@ %{ #include "adafruitss.h" %} + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_adafruitss"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/adc121c021/javaupm_adc121c021.i b/src/adc121c021/javaupm_adc121c021.i index 039c081..33e4d2e 100644 --- a/src/adc121c021/javaupm_adc121c021.i +++ b/src/adc121c021/javaupm_adc121c021.i @@ -7,3 +7,14 @@ %} %include "adc121c021.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_adc121c021"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/adis16448/javaupm_adis16448.i b/src/adis16448/javaupm_adis16448.i index 4124656..b4cc0b1 100644 --- a/src/adis16448/javaupm_adis16448.i +++ b/src/adis16448/javaupm_adis16448.i @@ -6,3 +6,14 @@ %} %include "adis16448.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_adis16448"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/adxl335/javaupm_adxl335.i b/src/adxl335/javaupm_adxl335.i index 5fd3be1..2624571 100644 --- a/src/adxl335/javaupm_adxl335.i +++ b/src/adxl335/javaupm_adxl335.i @@ -41,3 +41,14 @@ %ignore acceleration(float *, float *, float *); %include "adxl335.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_adxl335"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/adxl345/javaupm_adxl345.i b/src/adxl345/javaupm_adxl345.i index e66ee92..9b759b4 100644 --- a/src/adxl345/javaupm_adxl345.i +++ b/src/adxl345/javaupm_adxl345.i @@ -34,3 +34,14 @@ } %include "adxl345.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_adxl345"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/adxrs610/javaupm_adxrs610.i b/src/adxrs610/javaupm_adxrs610.i index d100397..0c89c14 100644 --- a/src/adxrs610/javaupm_adxrs610.i +++ b/src/adxrs610/javaupm_adxrs610.i @@ -6,3 +6,14 @@ %} %include "adxrs610.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_adxrs610"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/am2315/javaupm_am2315.i b/src/am2315/javaupm_am2315.i index 43cc15a..5d2a0ad 100644 --- a/src/am2315/javaupm_am2315.i +++ b/src/am2315/javaupm_am2315.i @@ -6,3 +6,14 @@ %} %include "am2315.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_am2315"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/apds9002/javaupm_apds9002.i b/src/apds9002/javaupm_apds9002.i index cff3e04..645e8f9 100644 --- a/src/apds9002/javaupm_apds9002.i +++ b/src/apds9002/javaupm_apds9002.i @@ -6,3 +6,14 @@ %} %include "apds9002.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_apds9002"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/at42qt1070/javaupm_at42qt1070.i b/src/at42qt1070/javaupm_at42qt1070.i index f8724f0..8aceab0 100644 --- a/src/at42qt1070/javaupm_at42qt1070.i +++ b/src/at42qt1070/javaupm_at42qt1070.i @@ -6,3 +6,14 @@ %} %include "at42qt1070.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_at42qt1070"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/biss0001/javaupm_biss0001.i b/src/biss0001/javaupm_biss0001.i index 215172f..c841230 100644 --- a/src/biss0001/javaupm_biss0001.i +++ b/src/biss0001/javaupm_biss0001.i @@ -6,3 +6,14 @@ %} %include "biss0001.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_biss0001"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/bma220/javaupm_bma220.i b/src/bma220/javaupm_bma220.i index 3770740..7205178 100644 --- a/src/bma220/javaupm_bma220.i +++ b/src/bma220/javaupm_bma220.i @@ -34,3 +34,14 @@ %} %include "bma220.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_bma220"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/bmpx8x/javaupm_bmpx8x.i b/src/bmpx8x/javaupm_bmpx8x.i index bf6b3df..227056b 100644 --- a/src/bmpx8x/javaupm_bmpx8x.i +++ b/src/bmpx8x/javaupm_bmpx8x.i @@ -6,3 +6,14 @@ %} %include "bmpx8x.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_bmpx8x"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/buzzer/javaupm_buzzer.i b/src/buzzer/javaupm_buzzer.i index d27d761..e647831 100644 --- a/src/buzzer/javaupm_buzzer.i +++ b/src/buzzer/javaupm_buzzer.i @@ -6,3 +6,14 @@ %} %include "buzzer.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_buzzer"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/cjq4435/javaupm_cjq4435.i b/src/cjq4435/javaupm_cjq4435.i index 72c8fe1..a67fb5b 100644 --- a/src/cjq4435/javaupm_cjq4435.i +++ b/src/cjq4435/javaupm_cjq4435.i @@ -6,3 +6,14 @@ %} %include "cjq4435.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_cjq4435"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/dfrph/javaupm_dfrph.i b/src/dfrph/javaupm_dfrph.i index a0d7075..68fe193 100644 --- a/src/dfrph/javaupm_dfrph.i +++ b/src/dfrph/javaupm_dfrph.i @@ -6,3 +6,14 @@ %} %include "dfrph.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_dfrph"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ds1307/javaupm_ds1307.i b/src/ds1307/javaupm_ds1307.i index 4fecc34..ba7de15 100644 --- a/src/ds1307/javaupm_ds1307.i +++ b/src/ds1307/javaupm_ds1307.i @@ -8,3 +8,14 @@ %} %include "ds1307.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ds1307"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ecs1030/javaupm_ecs1030.i b/src/ecs1030/javaupm_ecs1030.i index 2ba1e20..93f5c5e 100644 --- a/src/ecs1030/javaupm_ecs1030.i +++ b/src/ecs1030/javaupm_ecs1030.i @@ -6,3 +6,14 @@ %} %include "ecs1030.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ecs1030"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/enc03r/javaupm_enc03r.i b/src/enc03r/javaupm_enc03r.i index 9e70c94..2557969 100644 --- a/src/enc03r/javaupm_enc03r.i +++ b/src/enc03r/javaupm_enc03r.i @@ -6,3 +6,14 @@ %} %include "enc03r.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_enc03r"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/flex/javaupm_flex.i b/src/flex/javaupm_flex.i index e461075..fc28dcf 100644 --- a/src/flex/javaupm_flex.i +++ b/src/flex/javaupm_flex.i @@ -6,3 +6,14 @@ %} %include "flex.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_flex"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/gas/javaupm_gas.i b/src/gas/javaupm_gas.i index 7aa4252..fc3b016 100644 --- a/src/gas/javaupm_gas.i +++ b/src/gas/javaupm_gas.i @@ -55,3 +55,14 @@ %include "mq8.h" %include "mq9.h" %include "tp401.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_gas"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/gp2y0a/javaupm_gp2y0a.i b/src/gp2y0a/javaupm_gp2y0a.i index 5936c86..8b2f761 100644 --- a/src/gp2y0a/javaupm_gp2y0a.i +++ b/src/gp2y0a/javaupm_gp2y0a.i @@ -6,3 +6,14 @@ %} %include "gp2y0a.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_gp2y0a"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grove/javaupm_grove.i b/src/grove/javaupm_grove.i index 2a3075b..7763404 100644 --- a/src/grove/javaupm_grove.i +++ b/src/grove/javaupm_grove.i @@ -12,20 +12,17 @@ %{ #include "grove.h" %} -/* -%typemap(jni) mraa_result_t "jint" -%typemap(jstype) mraa_result_t "int" -%typemap(jtype) mraa_result_t "int" - -%typemap(javaout) mraa_result_t { - return $jnicall; -} - - -%typemap(out) mraa_result_t { - $result = (int)$1; -} -*/ %include "grove.h" +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grove"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%} + diff --git a/src/grovecircularled/javaupm_grovecircularled.i b/src/grovecircularled/javaupm_grovecircularled.i index cdc7b48..054c452 100644 --- a/src/grovecircularled/javaupm_grovecircularled.i +++ b/src/grovecircularled/javaupm_grovecircularled.i @@ -7,3 +7,14 @@ %} %include "grovecircularled.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovecircularled"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovecollision/javaupm_grovecollision.i b/src/grovecollision/javaupm_grovecollision.i index e6e503c..7cb1049 100644 --- a/src/grovecollision/javaupm_grovecollision.i +++ b/src/grovecollision/javaupm_grovecollision.i @@ -6,3 +6,14 @@ %} %include "grovecollision.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovecollision"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/groveehr/javaupm_groveehr.i b/src/groveehr/javaupm_groveehr.i index 230d8bd..2b5d110 100644 --- a/src/groveehr/javaupm_groveehr.i +++ b/src/groveehr/javaupm_groveehr.i @@ -8,3 +8,14 @@ %} %include "groveehr.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_groveehr"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/groveeldriver/javaupm_groveeldriver.i b/src/groveeldriver/javaupm_groveeldriver.i index e2648ff..061329c 100644 --- a/src/groveeldriver/javaupm_groveeldriver.i +++ b/src/groveeldriver/javaupm_groveeldriver.i @@ -6,3 +6,14 @@ %} %include "groveeldriver.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_groveeldriver"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/groveelectromagnet/javaupm_groveelectromagnet.i b/src/groveelectromagnet/javaupm_groveelectromagnet.i index f0e8367..5def283 100644 --- a/src/groveelectromagnet/javaupm_groveelectromagnet.i +++ b/src/groveelectromagnet/javaupm_groveelectromagnet.i @@ -6,3 +6,14 @@ %} %include "groveelectromagnet.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_groveelectromagnet"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/groveemg/javaupm_groveemg.i b/src/groveemg/javaupm_groveemg.i index 6cb01c2..c829829 100644 --- a/src/groveemg/javaupm_groveemg.i +++ b/src/groveemg/javaupm_groveemg.i @@ -6,3 +6,14 @@ %} %include "groveemg.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_groveemg"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovegprs/javaupm_grovegprs.i b/src/grovegprs/javaupm_grovegprs.i index 00f5749..e048626 100644 --- a/src/grovegprs/javaupm_grovegprs.i +++ b/src/grovegprs/javaupm_grovegprs.i @@ -9,3 +9,14 @@ %include "grovegprs.h" %array_class(char, charArray); + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovegprs"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovegsr/javaupm_grovegsr.i b/src/grovegsr/javaupm_grovegsr.i index 6d01a10..658146d 100644 --- a/src/grovegsr/javaupm_grovegsr.i +++ b/src/grovegsr/javaupm_grovegsr.i @@ -6,3 +6,14 @@ %} %include "grovegsr.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovegsr"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovelinefinder/javaupm_grovelinefinder.i b/src/grovelinefinder/javaupm_grovelinefinder.i index 7157f87..bee2ffd 100644 --- a/src/grovelinefinder/javaupm_grovelinefinder.i +++ b/src/grovelinefinder/javaupm_grovelinefinder.i @@ -6,3 +6,14 @@ %} %include "grovelinefinder.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovelinefinder"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovemd/javaupm_grovemd.i b/src/grovemd/javaupm_grovemd.i index a0886b6..341297c 100644 --- a/src/grovemd/javaupm_grovemd.i +++ b/src/grovemd/javaupm_grovemd.i @@ -6,3 +6,14 @@ %} %include "grovemd.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovemd"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovemoisture/javaupm_grovemoisture.i b/src/grovemoisture/javaupm_grovemoisture.i index c0dcf06..886991a 100644 --- a/src/grovemoisture/javaupm_grovemoisture.i +++ b/src/grovemoisture/javaupm_grovemoisture.i @@ -6,3 +6,14 @@ %} %include "grovemoisture.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovemoisture"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/groveo2/javaupm_groveo2.i b/src/groveo2/javaupm_groveo2.i index b91db8b..8ae0399 100644 --- a/src/groveo2/javaupm_groveo2.i +++ b/src/groveo2/javaupm_groveo2.i @@ -6,3 +6,14 @@ %} %include "groveo2.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_groveo2"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovescam/javaupm_grovescam.i b/src/grovescam/javaupm_grovescam.i index bd352b6..8e55cdf 100644 --- a/src/grovescam/javaupm_grovescam.i +++ b/src/grovescam/javaupm_grovescam.i @@ -7,3 +7,14 @@ %} %include "grovescam.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovescam"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovespeaker/javaupm_grovespeaker.i b/src/grovespeaker/javaupm_grovespeaker.i index 80aba33..c3f98a7 100644 --- a/src/grovespeaker/javaupm_grovespeaker.i +++ b/src/grovespeaker/javaupm_grovespeaker.i @@ -6,3 +6,14 @@ %} %include "grovespeaker.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovespeaker"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovevdiv/javaupm_grovevdiv.i b/src/grovevdiv/javaupm_grovevdiv.i index e7d8b30..1fb23bd 100644 --- a/src/grovevdiv/javaupm_grovevdiv.i +++ b/src/grovevdiv/javaupm_grovevdiv.i @@ -6,3 +6,14 @@ %} %include "grovevdiv.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovevdiv"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovewater/javaupm_grovewater.i b/src/grovewater/javaupm_grovewater.i index 7b79d6d..d679c2e 100644 --- a/src/grovewater/javaupm_grovewater.i +++ b/src/grovewater/javaupm_grovewater.i @@ -6,3 +6,14 @@ %} %include "grovewater.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovewater"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/grovewfs/javaupm_grovewfs.i b/src/grovewfs/javaupm_grovewfs.i index 4c7ce6c..7e650ac 100644 --- a/src/grovewfs/javaupm_grovewfs.i +++ b/src/grovewfs/javaupm_grovewfs.i @@ -8,3 +8,14 @@ %} %include "grovewfs.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_grovewfs"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/guvas12d/javaupm_guvas12d.i b/src/guvas12d/javaupm_guvas12d.i index 7dec36b..1b7af28 100644 --- a/src/guvas12d/javaupm_guvas12d.i +++ b/src/guvas12d/javaupm_guvas12d.i @@ -6,3 +6,14 @@ %} %include "guvas12d.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_guvas12d"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/h3lis331dl/javaupm_h3lis331dl.i b/src/h3lis331dl/javaupm_h3lis331dl.i index 7dfad79..812a53d 100644 --- a/src/h3lis331dl/javaupm_h3lis331dl.i +++ b/src/h3lis331dl/javaupm_h3lis331dl.i @@ -49,3 +49,14 @@ %ignore getAcceleration(float *, float *, float *); %include "h3lis331dl.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_h3lis331dl"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/hcsr04/javaupm_hcsr04.i b/src/hcsr04/javaupm_hcsr04.i index 07611aa..b1881a7 100644 --- a/src/hcsr04/javaupm_hcsr04.i +++ b/src/hcsr04/javaupm_hcsr04.i @@ -11,3 +11,14 @@ %} %include "hcsr04.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_hcsr04"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/hm11/javaupm_hm11.i b/src/hm11/javaupm_hm11.i index 7475551..df71082 100644 --- a/src/hm11/javaupm_hm11.i +++ b/src/hm11/javaupm_hm11.i @@ -11,3 +11,14 @@ %include "hm11.h" speed_t int_B9600 = B9600; %array_class(char, charArray); + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_hm11"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/hmc5883l/javaupm_hmc5883l.i b/src/hmc5883l/javaupm_hmc5883l.i index 18ec483..cc80059 100644 --- a/src/hmc5883l/javaupm_hmc5883l.i +++ b/src/hmc5883l/javaupm_hmc5883l.i @@ -19,3 +19,14 @@ } %include "hmc5883l.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_hmc5883l"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/hmtrp/javaupm_hmtrp.i b/src/hmtrp/javaupm_hmtrp.i index c02e34a..4e5cc78 100644 --- a/src/hmtrp/javaupm_hmtrp.i +++ b/src/hmtrp/javaupm_hmtrp.i @@ -17,3 +17,14 @@ %include "hmtrp.h" speed_t int_B9600 = B9600; + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_hmtrp"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/hp20x/javaupm_hp20x.i b/src/hp20x/javaupm_hp20x.i index 73ac8bf..54d7c33 100644 --- a/src/hp20x/javaupm_hp20x.i +++ b/src/hp20x/javaupm_hp20x.i @@ -6,3 +6,14 @@ %} %include "hp20x.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_hp20x"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ht9170/javaupm_ht9170.i b/src/ht9170/javaupm_ht9170.i index 10a7cd7..4bc6b1d 100644 --- a/src/ht9170/javaupm_ht9170.i +++ b/src/ht9170/javaupm_ht9170.i @@ -6,3 +6,14 @@ %} %include "ht9170.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ht9170"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/htu21d/javaupm_htu21d.i b/src/htu21d/javaupm_htu21d.i index c288b8f..7c6b1ef 100644 --- a/src/htu21d/javaupm_htu21d.i +++ b/src/htu21d/javaupm_htu21d.i @@ -6,3 +6,14 @@ %} %include "htu21d.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_htu21d"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/hx711/javaupm_hx711.i b/src/hx711/javaupm_hx711.i index b0bd029..2d8fdf5 100644 --- a/src/hx711/javaupm_hx711.i +++ b/src/hx711/javaupm_hx711.i @@ -6,3 +6,14 @@ %} %include "hx711.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_hx711"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ina132/javaupm_ina132.i b/src/ina132/javaupm_ina132.i index ba5b82e..b49ed20 100644 --- a/src/ina132/javaupm_ina132.i +++ b/src/ina132/javaupm_ina132.i @@ -6,3 +6,14 @@ %} %include "ina132.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ina132"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/isd1820/javaupm_isd1820.i b/src/isd1820/javaupm_isd1820.i index c753540..ac5f341 100644 --- a/src/isd1820/javaupm_isd1820.i +++ b/src/isd1820/javaupm_isd1820.i @@ -7,3 +7,14 @@ %include "isd1820.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_isd1820"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/itg3200/javaupm_itg3200.i b/src/itg3200/javaupm_itg3200.i index ff10831..012c6a0 100644 --- a/src/itg3200/javaupm_itg3200.i +++ b/src/itg3200/javaupm_itg3200.i @@ -33,3 +33,14 @@ } %include "itg3200.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_itg3200"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/joystick12/javaupm_joystick12.i b/src/joystick12/javaupm_joystick12.i index 017d818..8ebe78f 100644 --- a/src/joystick12/javaupm_joystick12.i +++ b/src/joystick12/javaupm_joystick12.i @@ -6,3 +6,14 @@ %} %include "joystick12.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_joystick12"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/l298/javaupm_l298.i b/src/l298/javaupm_l298.i index 86e3549..8a9355e 100644 --- a/src/l298/javaupm_l298.i +++ b/src/l298/javaupm_l298.i @@ -6,3 +6,14 @@ %} %include "l298.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_l298"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/lcd/javaupm_i2clcd.i b/src/lcd/javaupm_i2clcd.i index 2daa0c9..4705025 100644 --- a/src/lcd/javaupm_i2clcd.i +++ b/src/lcd/javaupm_i2clcd.i @@ -43,3 +43,14 @@ %include "lcm1602.h" %include "jhd1313m1.h" %include "sainsmartks.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_i2clcd"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ldt0028/javaupm_ldt0028.i b/src/ldt0028/javaupm_ldt0028.i index 3e10fbe..6407f5f 100644 --- a/src/ldt0028/javaupm_ldt0028.i +++ b/src/ldt0028/javaupm_ldt0028.i @@ -6,3 +6,14 @@ %} %include "ldt0028.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ldt0028"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/lm35/javaupm_lm35.i b/src/lm35/javaupm_lm35.i index b775f5d..aafab80 100644 --- a/src/lm35/javaupm_lm35.i +++ b/src/lm35/javaupm_lm35.i @@ -6,3 +6,14 @@ %} %include "lm35.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_lm35"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/lol/javaupm_lol.i b/src/lol/javaupm_lol.i index 8764e6a..6c1ceae 100644 --- a/src/lol/javaupm_lol.i +++ b/src/lol/javaupm_lol.i @@ -23,3 +23,14 @@ %} %include "lol.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_lol"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/loudness/javaupm_loudness.i b/src/loudness/javaupm_loudness.i index caaebab..5818ee7 100644 --- a/src/loudness/javaupm_loudness.i +++ b/src/loudness/javaupm_loudness.i @@ -6,3 +6,14 @@ %} %include "loudness.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_loudness"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/lpd8806/javaupm_lpd8806.i b/src/lpd8806/javaupm_lpd8806.i index 7e4d60b..5de138a 100644 --- a/src/lpd8806/javaupm_lpd8806.i +++ b/src/lpd8806/javaupm_lpd8806.i @@ -6,3 +6,14 @@ %} %include "lpd8806.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_lpd8806"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/lsm303/javaupm_lsm303.i b/src/lsm303/javaupm_lsm303.i index eb99988..961c74f 100644 --- a/src/lsm303/javaupm_lsm303.i +++ b/src/lsm303/javaupm_lsm303.i @@ -19,3 +19,14 @@ } %include "lsm303.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_lsm303"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/lsm9ds0/javaupm_lsm9ds0.i b/src/lsm9ds0/javaupm_lsm9ds0.i index 0b8dd35..7bfc791 100644 --- a/src/lsm9ds0/javaupm_lsm9ds0.i +++ b/src/lsm9ds0/javaupm_lsm9ds0.i @@ -48,3 +48,14 @@ %} %include "lsm9ds0.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_lsm9ds0"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/m24lr64e/javaupm_m24lr64e.i b/src/m24lr64e/javaupm_m24lr64e.i index 906c1ab..185e7e5 100644 --- a/src/m24lr64e/javaupm_m24lr64e.i +++ b/src/m24lr64e/javaupm_m24lr64e.i @@ -24,3 +24,14 @@ %} %include "m24lr64e.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_m24lr64e"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/max31723/javaupm_max31723.i b/src/max31723/javaupm_max31723.i index da5f688..419a34a 100644 --- a/src/max31723/javaupm_max31723.i +++ b/src/max31723/javaupm_max31723.i @@ -6,3 +6,14 @@ %} %include "max31723.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_max31723"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/max31855/javaupm_max31855.i b/src/max31855/javaupm_max31855.i index d8deb0f..a778d37 100644 --- a/src/max31855/javaupm_max31855.i +++ b/src/max31855/javaupm_max31855.i @@ -8,3 +8,14 @@ %include "max31855.h" //! [Interesting] + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_max31855"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/max44000/javaupm_max44000.i b/src/max44000/javaupm_max44000.i index 29b0603..fbf331a 100644 --- a/src/max44000/javaupm_max44000.i +++ b/src/max44000/javaupm_max44000.i @@ -6,3 +6,14 @@ %} %include "max44000.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_max44000"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/max5487/javaupm_max5487.i b/src/max5487/javaupm_max5487.i index a97009b..e31fed5 100644 --- a/src/max5487/javaupm_max5487.i +++ b/src/max5487/javaupm_max5487.i @@ -6,3 +6,14 @@ %} %include "max5487.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_max5487"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/maxds3231m/javaupm_maxds3231m.i b/src/maxds3231m/javaupm_maxds3231m.i index dea3fa1..4dcf6f3 100644 --- a/src/maxds3231m/javaupm_maxds3231m.i +++ b/src/maxds3231m/javaupm_maxds3231m.i @@ -6,3 +6,14 @@ %} %include "maxds3231m.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_maxds3231m"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/maxsonarez/javaupm_maxsonarez.i b/src/maxsonarez/javaupm_maxsonarez.i index 960f78a..dc3faef 100644 --- a/src/maxsonarez/javaupm_maxsonarez.i +++ b/src/maxsonarez/javaupm_maxsonarez.i @@ -6,3 +6,14 @@ %} %include "maxsonarez.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_maxsonarez"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mcp9808/javaupm_mcp9808.i b/src/mcp9808/javaupm_mcp9808.i index 7a7394d..ff6383b 100644 --- a/src/mcp9808/javaupm_mcp9808.i +++ b/src/mcp9808/javaupm_mcp9808.i @@ -6,3 +6,14 @@ %} %include "mcp9808.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mcp9808"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mg811/javaupm_mg811.i b/src/mg811/javaupm_mg811.i index e405761..3f7e201 100644 --- a/src/mg811/javaupm_mg811.i +++ b/src/mg811/javaupm_mg811.i @@ -6,3 +6,14 @@ %} %include "mg811.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mg811"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mhz16/javaupm_mhz16.i b/src/mhz16/javaupm_mhz16.i index 1d50fb7..c2735a3 100644 --- a/src/mhz16/javaupm_mhz16.i +++ b/src/mhz16/javaupm_mhz16.i @@ -14,3 +14,14 @@ %include "mhz16.h" speed_t int_B9600 = B9600; + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mhz16"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mic/javaupm_mic.i b/src/mic/javaupm_mic.i index 4d3f5d5..5abc65c 100644 --- a/src/mic/javaupm_mic.i +++ b/src/mic/javaupm_mic.i @@ -38,3 +38,14 @@ } %include "mic.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mic"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/micsv89/javaupm_micsv89.i b/src/micsv89/javaupm_micsv89.i index ee59da5..1e11060 100644 --- a/src/micsv89/javaupm_micsv89.i +++ b/src/micsv89/javaupm_micsv89.i @@ -6,3 +6,14 @@ %} %include "micsv89.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_micsv89"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mlx90614/javaupm_mlx90614.i b/src/mlx90614/javaupm_mlx90614.i index 60cfb92..a580925 100644 --- a/src/mlx90614/javaupm_mlx90614.i +++ b/src/mlx90614/javaupm_mlx90614.i @@ -6,3 +6,14 @@ %} %include "mlx90614.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mlx90614"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mma7455/javaupm_mma7455.i b/src/mma7455/javaupm_mma7455.i index 3d4724b..04a1f1f 100644 --- a/src/mma7455/javaupm_mma7455.i +++ b/src/mma7455/javaupm_mma7455.i @@ -27,3 +27,14 @@ %} %include "mma7455.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mma7455"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mma7660/javaupm_mma7660.i b/src/mma7660/javaupm_mma7660.i index e967ab1..e1f0b59 100644 --- a/src/mma7660/javaupm_mma7660.i +++ b/src/mma7660/javaupm_mma7660.i @@ -48,3 +48,14 @@ %ignore getAcceleration(float *, float *, float *); %include "mma7660.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mma7660"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mpl3115a2/javaupm_mpl3115a2.i b/src/mpl3115a2/javaupm_mpl3115a2.i index a638390..651dbcc 100644 --- a/src/mpl3115a2/javaupm_mpl3115a2.i +++ b/src/mpl3115a2/javaupm_mpl3115a2.i @@ -6,3 +6,14 @@ %} %include "mpl3115a2.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mpl3115a2"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mpr121/javaupm_mpr121.i b/src/mpr121/javaupm_mpr121.i index f045e0e..8f1e146 100644 --- a/src/mpr121/javaupm_mpr121.i +++ b/src/mpr121/javaupm_mpr121.i @@ -8,3 +8,14 @@ %} %include "mpr121.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mpr121"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mpu9150/javaupm_mpu9150.i b/src/mpu9150/javaupm_mpu9150.i index 614ec6f..5e3d0b0 100644 --- a/src/mpu9150/javaupm_mpu9150.i +++ b/src/mpu9150/javaupm_mpu9150.i @@ -37,3 +37,14 @@ %include "mpu60x0.h" %include "mpu9150.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mpu9150"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/mq303a/javaupm_mq303a.i b/src/mq303a/javaupm_mq303a.i index b52ad96..da7c5bb 100644 --- a/src/mq303a/javaupm_mq303a.i +++ b/src/mq303a/javaupm_mq303a.i @@ -6,3 +6,14 @@ %} %include "mq303a.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_mq303a"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/my9221/javaupm_my9221.i b/src/my9221/javaupm_my9221.i index b6797cb..afb248a 100644 --- a/src/my9221/javaupm_my9221.i +++ b/src/my9221/javaupm_my9221.i @@ -6,3 +6,14 @@ %} %include "my9221.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_my9221"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/nrf24l01/javaupm_nrf24l01.i b/src/nrf24l01/javaupm_nrf24l01.i index df7af10..924b851 100644 --- a/src/nrf24l01/javaupm_nrf24l01.i +++ b/src/nrf24l01/javaupm_nrf24l01.i @@ -12,3 +12,14 @@ %} %include "nrf24l01.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_nrf24l01"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/nrf8001/javaupm_nrf8001.i b/src/nrf8001/javaupm_nrf8001.i index bd6e25e..9956b43 100644 --- a/src/nrf8001/javaupm_nrf8001.i +++ b/src/nrf8001/javaupm_nrf8001.i @@ -6,3 +6,14 @@ %} %include "nrf8001.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_nrf8001"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/nunchuck/javaupm_nunchuck.i b/src/nunchuck/javaupm_nunchuck.i index a87273f..e479d05 100644 --- a/src/nunchuck/javaupm_nunchuck.i +++ b/src/nunchuck/javaupm_nunchuck.i @@ -7,3 +7,14 @@ %} %include "nunchuck.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_nunchuck"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/otp538u/javaupm_otp538u.i b/src/otp538u/javaupm_otp538u.i index 55c542f..90703b8 100644 --- a/src/otp538u/javaupm_otp538u.i +++ b/src/otp538u/javaupm_otp538u.i @@ -6,3 +6,14 @@ %} %include "otp538u.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_otp538u"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/pca9685/javaupm_pca9685.i b/src/pca9685/javaupm_pca9685.i index 3b34a43..4ff6198 100644 --- a/src/pca9685/javaupm_pca9685.i +++ b/src/pca9685/javaupm_pca9685.i @@ -7,3 +7,14 @@ %} %include "pca9685.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_pca9685"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/pn532/javaupm_pn532.i b/src/pn532/javaupm_pn532.i index d9765bd..ad97bf3 100644 --- a/src/pn532/javaupm_pn532.i +++ b/src/pn532/javaupm_pn532.i @@ -14,3 +14,14 @@ %} %include "pn532.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_pn532"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ppd42ns/javaupm_ppd42ns.i b/src/ppd42ns/javaupm_ppd42ns.i index 148bbfe..beecd3e 100644 --- a/src/ppd42ns/javaupm_ppd42ns.i +++ b/src/ppd42ns/javaupm_ppd42ns.i @@ -6,3 +6,14 @@ %} %include "ppd42ns.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ppd42ns"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/pulsensor/javaupm_pulsensor.i b/src/pulsensor/javaupm_pulsensor.i index ee8ab0c..7dc3a26 100644 --- a/src/pulsensor/javaupm_pulsensor.i +++ b/src/pulsensor/javaupm_pulsensor.i @@ -15,3 +15,14 @@ %} %include "pulsensor.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_pulsensor"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/rfr359f/javaupm_rfr359f.i b/src/rfr359f/javaupm_rfr359f.i index a7cf296..ebd528f 100644 --- a/src/rfr359f/javaupm_rfr359f.i +++ b/src/rfr359f/javaupm_rfr359f.i @@ -6,3 +6,14 @@ %} %include "rfr359f.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_rfr359f"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/rgbringcoder/javaupm_rgbringcoder.i b/src/rgbringcoder/javaupm_rgbringcoder.i index 9db247e..2e67125 100644 --- a/src/rgbringcoder/javaupm_rgbringcoder.i +++ b/src/rgbringcoder/javaupm_rgbringcoder.i @@ -6,3 +6,14 @@ %} %include "rgbringcoder.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_rgbringcoder"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/rotaryencoder/javaupm_rotaryencoder.i b/src/rotaryencoder/javaupm_rotaryencoder.i index 9140c95..af10c23 100644 --- a/src/rotaryencoder/javaupm_rotaryencoder.i +++ b/src/rotaryencoder/javaupm_rotaryencoder.i @@ -8,3 +8,14 @@ %} %include "rotaryencoder.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_rotaryencoder"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/rpr220/javaupm_rpr220.i b/src/rpr220/javaupm_rpr220.i index d25f6a0..f6d6e5e 100644 --- a/src/rpr220/javaupm_rpr220.i +++ b/src/rpr220/javaupm_rpr220.i @@ -11,3 +11,14 @@ #include "rpr220.h" %} %include "rpr220.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_rpr220"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/servo/javaupm_servo.i b/src/servo/javaupm_servo.i index 8754786..38e0436 100644 --- a/src/servo/javaupm_servo.i +++ b/src/servo/javaupm_servo.i @@ -15,3 +15,14 @@ %{ #include "es9257.h" %} + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_servo"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/si114x/javaupm_si114x.i b/src/si114x/javaupm_si114x.i index 140f506..173c4a6 100644 --- a/src/si114x/javaupm_si114x.i +++ b/src/si114x/javaupm_si114x.i @@ -7,3 +7,14 @@ %} %include "si114x.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_si114x"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/sm130/javaupm_sm130.i b/src/sm130/javaupm_sm130.i index ee439fd..5c1e1a9 100644 --- a/src/sm130/javaupm_sm130.i +++ b/src/sm130/javaupm_sm130.i @@ -6,3 +6,14 @@ %} %include "sm130.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_sm130"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/st7735/javaupm_st7735.i b/src/st7735/javaupm_st7735.i index 5dd5e4a..e60367c 100644 --- a/src/st7735/javaupm_st7735.i +++ b/src/st7735/javaupm_st7735.i @@ -44,3 +44,14 @@ %{ #include "st7735.h" %} + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_st7735"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/stepmotor/javaupm_stepmotor.i b/src/stepmotor/javaupm_stepmotor.i index 18cf68d..96ec7bc 100644 --- a/src/stepmotor/javaupm_stepmotor.i +++ b/src/stepmotor/javaupm_stepmotor.i @@ -6,3 +6,14 @@ %} %include "stepmotor.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_stepmotor"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/sx6119/javaupm_sx6119.i b/src/sx6119/javaupm_sx6119.i index 5dece90..f7e5327 100644 --- a/src/sx6119/javaupm_sx6119.i +++ b/src/sx6119/javaupm_sx6119.i @@ -7,3 +7,14 @@ %include "sx6119.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_sx6119"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ta12200/javaupm_ta12200.i b/src/ta12200/javaupm_ta12200.i index d0259f7..3feb468 100644 --- a/src/ta12200/javaupm_ta12200.i +++ b/src/ta12200/javaupm_ta12200.i @@ -6,3 +6,14 @@ %} %include "ta12200.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ta12200"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/tcs3414cs/javaupm_tcs3414cs.i b/src/tcs3414cs/javaupm_tcs3414cs.i index 9bd7960..61724e1 100644 --- a/src/tcs3414cs/javaupm_tcs3414cs.i +++ b/src/tcs3414cs/javaupm_tcs3414cs.i @@ -6,3 +6,14 @@ %} %include "tcs3414cs.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_tcs3414cs"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/th02/javaupm_th02.i b/src/th02/javaupm_th02.i index f8c5fa2..d16ae4f 100644 --- a/src/th02/javaupm_th02.i +++ b/src/th02/javaupm_th02.i @@ -6,3 +6,14 @@ %} %include "th02.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_th02"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/tm1637/javaupm_tm1637.i b/src/tm1637/javaupm_tm1637.i index 24d8c2e..a0e5546 100644 --- a/src/tm1637/javaupm_tm1637.i +++ b/src/tm1637/javaupm_tm1637.i @@ -16,3 +16,14 @@ %include "tm1637.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_tm1637"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/tsl2561/javaupm_tsl2561.i b/src/tsl2561/javaupm_tsl2561.i index 8186d99..2d542e6 100644 --- a/src/tsl2561/javaupm_tsl2561.i +++ b/src/tsl2561/javaupm_tsl2561.i @@ -6,3 +6,14 @@ %} %include "tsl2561.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_tsl2561"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ttp223/javaupm_ttp223.i b/src/ttp223/javaupm_ttp223.i index cf7dd90..a1595ef 100644 --- a/src/ttp223/javaupm_ttp223.i +++ b/src/ttp223/javaupm_ttp223.i @@ -15,3 +15,14 @@ %} %include "ttp223.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ttp223"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/ublox6/javaupm_ublox6.i b/src/ublox6/javaupm_ublox6.i index 164bd29..c5f0777 100644 --- a/src/ublox6/javaupm_ublox6.i +++ b/src/ublox6/javaupm_ublox6.i @@ -9,3 +9,14 @@ %include "ublox6.h" speed_t int_B9600 = B9600; + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_ublox6"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/uln200xa/javaupm_uln200xa.i b/src/uln200xa/javaupm_uln200xa.i index 2887ca8..0805ae3 100644 --- a/src/uln200xa/javaupm_uln200xa.i +++ b/src/uln200xa/javaupm_uln200xa.i @@ -6,3 +6,14 @@ %} %include "uln200xa.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_uln200xa"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/urm37/javaupm_urm37.i b/src/urm37/javaupm_urm37.i index f355ce4..725bafe 100644 --- a/src/urm37/javaupm_urm37.i +++ b/src/urm37/javaupm_urm37.i @@ -8,3 +8,14 @@ %include "urm37.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_urm37"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/waterlevel/javaupm_waterlevel.i b/src/waterlevel/javaupm_waterlevel.i index e49e081..7365c37 100644 --- a/src/waterlevel/javaupm_waterlevel.i +++ b/src/waterlevel/javaupm_waterlevel.i @@ -6,3 +6,14 @@ %} %include "waterlevel.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_waterlevel"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/wheelencoder/javaupm_wheelencoder.i b/src/wheelencoder/javaupm_wheelencoder.i index 92aae94..2b29f35 100644 --- a/src/wheelencoder/javaupm_wheelencoder.i +++ b/src/wheelencoder/javaupm_wheelencoder.i @@ -6,3 +6,14 @@ %} %include "wheelencoder.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_wheelencoder"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/wt5001/javaupm_wt5001.i b/src/wt5001/javaupm_wt5001.i index c95edbd..fa38c56 100644 --- a/src/wt5001/javaupm_wt5001.i +++ b/src/wt5001/javaupm_wt5001.i @@ -32,3 +32,14 @@ READDATA_EXCEPTION(getCurrentFile()) %include "wt5001.h" speed_t int_B9600 = B9600; + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_wt5001"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/xbee/javaupm_xbee.i b/src/xbee/javaupm_xbee.i index fc9fb3b..c886424 100644 --- a/src/xbee/javaupm_xbee.i +++ b/src/xbee/javaupm_xbee.i @@ -9,3 +9,14 @@ %include "xbee.h" %array_class(char, charArray); + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_xbee"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/yg1006/javaupm_yg1006.i b/src/yg1006/javaupm_yg1006.i index 894e8af..c3b01c4 100644 --- a/src/yg1006/javaupm_yg1006.i +++ b/src/yg1006/javaupm_yg1006.i @@ -6,3 +6,14 @@ %} %include "yg1006.h" + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_yg1006"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file diff --git a/src/zfm20/javaupm_zfm20.i b/src/zfm20/javaupm_zfm20.i index b466dbe..561ec12 100644 --- a/src/zfm20/javaupm_zfm20.i +++ b/src/zfm20/javaupm_zfm20.i @@ -15,3 +15,14 @@ %include "zfm20.h" speed_t int_B57600 = B57600; + +%pragma(java) jniclasscode=%{ + static { + try { + System.loadLibrary("javaupm_zfm20"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load. \n" + e); + System.exit(1); + } + } +%}
\ No newline at end of file |