mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
Merge 1895004cf5112366b2effa9f71e58c3f9cf025cc into 74b5ec00dc18d534dcc3442b1c23ee0ada2738ec
This commit is contained in:
commit
f757debb38
@ -437,16 +437,10 @@ function(upm_swig_java)
|
||||
|
||||
set_source_files_properties (javaupm_${libname}.i PROPERTIES CPLUSPLUS ON)
|
||||
set_source_files_properties (javaupm_${libname}.i PROPERTIES SWIG_FLAGS ";-package;upm_${libname};-I${CMAKE_BINARY_DIR}/src")
|
||||
# NOTE, ${module_src} is ONLY needed when swig'ing to JAVA. This is
|
||||
# because *some* upm libraries have ifdef's for JAVA and SWIG in their
|
||||
# source (cxx) which builds in different functionality. Because of this,
|
||||
# the source must be added when building the JAVA wrapper.
|
||||
# See issue #518
|
||||
# TODO: Fix this somehow
|
||||
if (CMAKE_VERSION VERSION_LESS "3.8")
|
||||
swig_add_module (javaupm_${libname} java javaupm_${libname}.i ${module_src})
|
||||
swig_add_module (javaupm_${libname} java javaupm_${libname}.i)
|
||||
else ()
|
||||
swig_add_library (javaupm_${libname} LANGUAGE java SOURCES javaupm_${libname}.i ${module_src})
|
||||
swig_add_library (javaupm_${libname} LANGUAGE java SOURCES javaupm_${libname}.i)
|
||||
endif ()
|
||||
|
||||
# If the C++ target depends on C++ interfaces, make the JAVA target
|
||||
|
77
src/_upm.i
Normal file
77
src/_upm.i
Normal file
@ -0,0 +1,77 @@
|
||||
/* Macro for adding JAVA run
|
||||
usage: JAVA_ADD_INSTALLISR(javaupm_a110x)
|
||||
*/
|
||||
%define JAVA_ADD_INSTALLISR(UPM_Classname)
|
||||
%extend UPM_Classname {
|
||||
void installISR(jobject runnable)
|
||||
{
|
||||
$self->installISR(mraa_java_isr_callback, runnable);
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
||||
/* Define GETTER in the appropiate .i file with the getter function name
|
||||
*/
|
||||
%define JAVA_ADD_INSTALLISR_GPIO(UPM_Classname)
|
||||
%extend UPM_Classname {
|
||||
void installISR(int gpio, mraa::Edge level, jobject runnable)
|
||||
{
|
||||
// delete any existing ISR and GPIO context
|
||||
$self->uninstallISR();
|
||||
|
||||
// create gpio context
|
||||
mraa::Gpio* swg_gpioIntr = $self->GETTER;
|
||||
|
||||
swg_gpioIntr->dir(mraa::DIR_IN);
|
||||
swg_gpioIntr->isr(level, runnable);
|
||||
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
||||
/* Define INTERRUPT in the appropiate .i file with the interrupt type
|
||||
*/
|
||||
%define JAVA_ADD_INSTALLISR_INTERRUPT(UPM_Classname)
|
||||
%extend UPM_Classname {
|
||||
void installISR(INTERRUPT intr, int gpio,
|
||||
mraa::Edge level, jobject runnable)
|
||||
{
|
||||
$self->installISR(intr, gpio, level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
||||
%define JAVA_ADD_INSTALLISR_EDGE(UPM_Classname)
|
||||
%extend UPM_Classname {
|
||||
void installISR(mraa::Edge level, jobject runnable)
|
||||
{
|
||||
$self->installISR(level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
||||
%define JAVA_ADD_INSTALLISR_PIN(UPM_Classname)
|
||||
%extend UPM_Classname {
|
||||
void installISR(int pin, jobject runnable)
|
||||
{
|
||||
$self->installISR(pin, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
|
||||
}
|
||||
%enddef
|
||||
|
||||
/* Macro for adding JNI loadLibrary dependency
|
||||
usage: JAVA_JNI_LOADLIBRARY(javaupm_rhusb)
|
||||
*/
|
||||
%define JAVA_JNI_LOADLIBRARY(MyModuleName)
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("MyModuleName");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library (MyModuleName) failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
%enddef
|
@ -57,13 +57,6 @@ bool A110X::magnetDetected()
|
||||
return (!mraa_gpio_read(m_gpio) ? true : false);
|
||||
}
|
||||
|
||||
#ifdef JAVACALLBACK
|
||||
void A110X::installISR(jobject runnable)
|
||||
{
|
||||
installISR(mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#endif
|
||||
|
||||
void A110X::installISR(void (*isr)(void *), void *arg)
|
||||
{
|
||||
if (m_isrInstalled)
|
||||
|
@ -85,11 +85,8 @@ namespace upm {
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(jobject runnable);
|
||||
#else
|
||||
void installISR(void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Uninstalls the previously installed ISR
|
||||
*
|
||||
@ -97,9 +94,6 @@ namespace upm {
|
||||
void uninstallISR();
|
||||
|
||||
private:
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
bool m_isrInstalled;
|
||||
mraa_gpio_context m_gpio;
|
||||
|
6
src/a110x/common.i
Normal file
6
src/a110x/common.i
Normal file
@ -0,0 +1,6 @@
|
||||
%include "../upm.i"
|
||||
|
||||
%{
|
||||
#include "a110x.hpp"
|
||||
%}
|
||||
%include "a110x.hpp"
|
@ -1,20 +1,11 @@
|
||||
%module javaupm_a110x
|
||||
%include "../upm.i"
|
||||
%include "stdint.i"
|
||||
%include "typemaps.i"
|
||||
|
||||
%{
|
||||
#include "a110x.hpp"
|
||||
%}
|
||||
%include "a110x.hpp"
|
||||
%include "common.i"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
/* Macro for loading javaupm_a110x */
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_a110x)
|
||||
|
||||
/* Macro adding an installisr call w/JAVA runnable to A110X */
|
||||
JAVA_ADD_INSTALLISR(upm::A110X)
|
||||
|
@ -1,8 +1,3 @@
|
||||
%module jsupm_a110x
|
||||
%include "../upm.i"
|
||||
|
||||
%{
|
||||
#include "a110x.hpp"
|
||||
%}
|
||||
|
||||
%include "a110x.hpp"
|
||||
%include "common.i"
|
||||
|
@ -1,9 +1,4 @@
|
||||
// Include doxygen-generated documentation
|
||||
%include "pyupm_doxy2swig.i"
|
||||
%module pyupm_a110x
|
||||
%include "../upm.i"
|
||||
|
||||
%include "a110x.hpp"
|
||||
%{
|
||||
#include "a110x.hpp"
|
||||
%}
|
||||
%include "common.i"
|
||||
|
@ -8,13 +8,4 @@
|
||||
%}
|
||||
%include "abp.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_abp");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_abp)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "ad8232.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ad8232)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "adafruitms1438.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_adafruitms1438)
|
@ -6,13 +6,4 @@
|
||||
#include "adafruitss.hpp"
|
||||
%}
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_adafruitss)
|
@ -8,13 +8,4 @@
|
||||
|
||||
%include "adc121c021.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_adc121c021)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "adis16448.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_adis16448)
|
@ -18,13 +18,4 @@ import upm_interfaces.*;
|
||||
%include "ads1015.hpp"
|
||||
%include "ads1115.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_ads1x15");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ads1x15)
|
||||
|
@ -42,13 +42,4 @@
|
||||
|
||||
%include "adxl335.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_adxl335)
|
@ -35,13 +35,4 @@
|
||||
|
||||
%include "adxl345.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_adxl345)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "adxrs610.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_adxrs610)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "am2315.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_am2315)
|
@ -18,13 +18,4 @@
|
||||
|
||||
%include "apa102.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_apa102");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_apa102)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "apds9002.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_apds9002)
|
@ -6,13 +6,4 @@
|
||||
%}
|
||||
%include "apds9930.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_apds9930");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_apds9930)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "at42qt1070.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_at42qt1070)
|
@ -11,13 +11,4 @@
|
||||
%include "bacnetmstp.hpp"
|
||||
%include "bacnetutil.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bacnetmstp");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bacnetmstp)
|
||||
|
@ -10,13 +10,4 @@
|
||||
%}
|
||||
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bh1750");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bh1750)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "biss0001.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_biss0001)
|
@ -42,7 +42,7 @@ BMA220::BMA220(int bus, uint8_t addr) :
|
||||
m_accelX = 0.0;
|
||||
m_accelY = 0.0;
|
||||
m_accelZ = 0.0;
|
||||
|
||||
|
||||
m_accelScale = 0.0;
|
||||
|
||||
mraa::Result rv;
|
||||
@ -59,7 +59,7 @@ BMA220::BMA220(int bus, uint8_t addr) :
|
||||
// set scaling rate
|
||||
if (!setAccelerometerScale(FSL_RANGE_2G))
|
||||
{
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
throw std::runtime_error(string(__FUNCTION__) +
|
||||
": Unable to set accel scale");
|
||||
return;
|
||||
}
|
||||
@ -107,8 +107,8 @@ bool BMA220::writeReg(uint8_t reg, uint8_t val)
|
||||
throw std::runtime_error(std::string(__FUNCTION__) +
|
||||
": I2c.writeReg() failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -126,11 +126,11 @@ bool BMA220::setAccelerometerScale(FSL_RANGE_T scale)
|
||||
}
|
||||
|
||||
// store scaling factor
|
||||
|
||||
|
||||
switch (scale)
|
||||
{
|
||||
case FSL_RANGE_2G:
|
||||
m_accelScale = 16.0;
|
||||
m_accelScale = 16.0;
|
||||
break;
|
||||
|
||||
case FSL_RANGE_4G:
|
||||
@ -147,7 +147,7 @@ bool BMA220::setAccelerometerScale(FSL_RANGE_T scale)
|
||||
|
||||
default: // should never occur, but...
|
||||
m_accelScale = 0.0; // set a safe, though incorrect value
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
throw std::logic_error(string(__FUNCTION__) +
|
||||
": internal error, unsupported scale");
|
||||
break;
|
||||
}
|
||||
@ -193,7 +193,7 @@ bool BMA220::setFilterConfig(FILTER_CONFIG_T filter)
|
||||
reg &= ~(_FILTER_CONFIG_FILTER_MASK << _FILTER_CONFIG_FILTER_SHIFT);
|
||||
|
||||
reg |= (filter << _FILTER_CONFIG_FILTER_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_FILTER_CONFIG, reg);
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ bool BMA220::setSerialHighBW(bool high)
|
||||
reg |= FILTER_CONFIG_SERIAL_HIGH_BW;
|
||||
else
|
||||
reg &= ~FILTER_CONFIG_SERIAL_HIGH_BW;
|
||||
|
||||
|
||||
return writeReg(REG_FILTER_CONFIG, reg);
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ bool BMA220::setSleepDuration(SLEEP_DUR_T dur)
|
||||
reg &= ~(_ENABLE_CONFIG3_SLEEP_DUR_MASK << _ENABLE_CONFIG3_SLEEP_DUR_SHIFT);
|
||||
|
||||
reg |= (dur << _ENABLE_CONFIG3_SLEEP_DUR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_ENABLE_CONFIG3, reg);
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ bool BMA220::setLowGThreshold(uint8_t thresh)
|
||||
reg &= ~(_THRESHOLD_LOW_MASK << _THRESHOLD_LOW_SHIFT);
|
||||
|
||||
reg |= (thresh << _THRESHOLD_LOW_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_THRESHOLD, reg);
|
||||
}
|
||||
|
||||
@ -286,7 +286,7 @@ bool BMA220::setHighGThreshold(uint8_t thresh)
|
||||
reg &= ~(_THRESHOLD_HIGH_MASK << _THRESHOLD_HIGH_SHIFT);
|
||||
|
||||
reg |= (thresh << _THRESHOLD_HIGH_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_THRESHOLD, reg);
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ bool BMA220::setLowGHysteresis(uint8_t hyst)
|
||||
reg &= ~(_L_HYST_DUR_LOW_HY_MASK << _L_HYST_DUR_LOW_HY_SHIFT);
|
||||
|
||||
reg |= (hyst << _L_HYST_DUR_LOW_HY_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_L_HYST_DUR, reg);
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ bool BMA220::setLowGDuration(uint8_t dur)
|
||||
reg &= ~(_L_HYST_DUR_LOW_DUR_MASK << _L_HYST_DUR_LOW_DUR_SHIFT);
|
||||
|
||||
reg |= (dur << _L_HYST_DUR_LOW_DUR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_L_HYST_DUR, reg);
|
||||
}
|
||||
|
||||
@ -325,7 +325,7 @@ bool BMA220::setHighGHysteresis(uint8_t hyst)
|
||||
reg &= ~(_H_HYST_DUR_HIGH_HY_MASK << _H_HYST_DUR_HIGH_HY_SHIFT);
|
||||
|
||||
reg |= (hyst << _H_HYST_DUR_HIGH_HY_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_H_HYST_DUR, reg);
|
||||
}
|
||||
|
||||
@ -338,7 +338,7 @@ bool BMA220::setHighGDuration(uint8_t dur)
|
||||
reg &= ~(_H_HYST_DUR_HIGH_DUR_MASK << _H_HYST_DUR_HIGH_DUR_SHIFT);
|
||||
|
||||
reg |= (dur << _H_HYST_DUR_HIGH_DUR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_H_HYST_DUR, reg);
|
||||
}
|
||||
|
||||
@ -351,7 +351,7 @@ bool BMA220::setTapDuration(uint8_t dur)
|
||||
reg &= ~(_TAP_CONFIG_DUR_MASK << _TAP_CONFIG_DUR_SHIFT);
|
||||
|
||||
reg |= (dur << _TAP_CONFIG_DUR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_TAP_CONFIG, reg);
|
||||
}
|
||||
|
||||
@ -364,7 +364,7 @@ bool BMA220::setTapThreshold(uint8_t thresh)
|
||||
reg &= ~(_TAP_CONFIG_THRESH_MASK << _TAP_CONFIG_THRESH_SHIFT);
|
||||
|
||||
reg |= (thresh << _TAP_CONFIG_THRESH_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_TAP_CONFIG, reg);
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@ bool BMA220::setSlopeDuration(uint8_t dur)
|
||||
reg &= ~(_SLOPE_CONFIG_DUR_MASK << _SLOPE_CONFIG_DUR_SHIFT);
|
||||
|
||||
reg |= (dur << _SLOPE_CONFIG_DUR_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_SLOPE_CONFIG, reg);
|
||||
}
|
||||
|
||||
@ -402,7 +402,7 @@ bool BMA220::setSlopeThreshold(uint8_t thresh)
|
||||
reg &= ~(_SLOPE_CONFIG_THRESH_MASK << _SLOPE_CONFIG_THRESH_SHIFT);
|
||||
|
||||
reg |= (thresh << _SLOPE_CONFIG_THRESH_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_SLOPE_CONFIG, reg);
|
||||
}
|
||||
|
||||
@ -474,7 +474,7 @@ bool BMA220::setInterruptLatch(CONFIG2_LAT_T lat)
|
||||
reg &= ~(_ENABLE_CONFIG2_LAT_INT_MASK << _ENABLE_CONFIG2_LAT_INT_SHIFT);
|
||||
|
||||
reg |= (lat << _ENABLE_CONFIG2_LAT_INT_SHIFT);
|
||||
|
||||
|
||||
return writeReg(REG_ENABLE_CONFIG2, reg);
|
||||
}
|
||||
|
||||
@ -489,22 +489,8 @@ bool BMA220::resetInterrupts()
|
||||
return writeReg(REG_ENABLE_CONFIG2, reg);
|
||||
}
|
||||
|
||||
#if defined(SWIGJAVA) || (JAVACALLBACK)
|
||||
|
||||
void BMA220::installISR(int gpio, mraa::Edge level,
|
||||
jobject runnable)
|
||||
{
|
||||
// delete any existing ISR and GPIO context
|
||||
uninstallISR();
|
||||
|
||||
// create gpio context
|
||||
m_gpioIntr = new mraa::Gpio(gpio);
|
||||
|
||||
m_gpioIntr->dir(mraa::DIR_IN);
|
||||
m_gpioIntr->isr(level, runnable);
|
||||
|
||||
}
|
||||
#else
|
||||
void BMA220::installISR(int gpio, mraa::Edge level,
|
||||
void (*isr)(void *), void *arg)
|
||||
{
|
||||
// delete any existing ISR and GPIO context
|
||||
@ -516,7 +502,6 @@ void BMA220::installISR(int gpio, mraa::Edge level,
|
||||
m_gpioIntr->dir(mraa::DIR_IN);
|
||||
m_gpioIntr->isr(level, isr, arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
void BMA220::uninstallISR()
|
||||
{
|
||||
@ -524,8 +509,12 @@ void BMA220::uninstallISR()
|
||||
{
|
||||
m_gpioIntr->isrExit();
|
||||
delete m_gpioIntr;
|
||||
|
||||
|
||||
m_gpioIntr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
mraa::Gpio* BMA220::get_gpioIntr()
|
||||
{
|
||||
return m_gpioIntr;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define BMA220_DEFAULT_ADDR 0x0a
|
||||
|
||||
namespace upm {
|
||||
|
||||
|
||||
/**
|
||||
* @brief BMA220 Accelerometer library
|
||||
* @defgroup bma220 libupm-bma220
|
||||
@ -115,7 +115,7 @@ namespace upm {
|
||||
REG_SUSPEND = 0x30,
|
||||
REG_SOFTRESET = 0x32
|
||||
} REG_T;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* REG_H_HYST_DUR bits
|
||||
@ -271,7 +271,7 @@ namespace upm {
|
||||
|
||||
INT_STATUS1_ORIENT_INT = 0x80 // orient intr was generated
|
||||
} INT_STATUS1_BITS_T;
|
||||
|
||||
|
||||
/**
|
||||
* INT_STATUS1_ORIENT values
|
||||
*
|
||||
@ -485,7 +485,7 @@ namespace upm {
|
||||
* BMA220 Destructor
|
||||
*/
|
||||
~BMA220();
|
||||
|
||||
|
||||
/**
|
||||
* update the accelerometer values
|
||||
*/
|
||||
@ -776,9 +776,7 @@ namespace upm {
|
||||
*/
|
||||
bool resetInterrupts();
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int gpio, mraa::Edge level, jobject runnable);
|
||||
#else
|
||||
|
||||
/**
|
||||
* install an interrupt handler.
|
||||
*
|
||||
@ -789,16 +787,17 @@ namespace upm {
|
||||
* @param isr the interrupt handler, accepting a void * argument
|
||||
* @param arg the argument to pass the the interrupt handler
|
||||
*/
|
||||
void installISR(int gpio, mraa::Edge level,
|
||||
void installISR(int gpio, mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* uninstall a previously installed interrupt handler
|
||||
*
|
||||
*/
|
||||
void uninstallISR();
|
||||
|
||||
mraa::Gpio* get_gpioIntr();
|
||||
|
||||
protected:
|
||||
mraa::I2c m_i2c;
|
||||
mraa::Gpio *m_gpioIntr;
|
||||
@ -821,13 +820,6 @@ namespace upm {
|
||||
* update the accelerometer values
|
||||
*/
|
||||
void updateAccelerometer();
|
||||
// Adding a private function definition for java bindings
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int gpio, mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,13 +30,10 @@
|
||||
|
||||
%include "bma220.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
%define GETTER get_gpioIntr();
|
||||
%enddef
|
||||
JAVA_ADD_INSTALLISR_GPIO(upm::BMA220)
|
||||
|
||||
%ignore installISR(int, mraa::Edge, void *, void *);
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bma220)
|
||||
|
@ -518,14 +518,7 @@ namespace upm {
|
||||
void setLowPowerMode2();
|
||||
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(BMA250E_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level, jobject runnable)
|
||||
{
|
||||
installISR(intr, gpio, level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#else
|
||||
/**
|
||||
/**
|
||||
* install an interrupt handler.
|
||||
*
|
||||
* @param intr One of the BMA250E_INTERRUPT_PINS_T values
|
||||
@ -541,7 +534,6 @@ namespace upm {
|
||||
void installISR(BMA250E_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* uninstall a previously installed interrupt handler
|
||||
@ -585,12 +577,6 @@ namespace upm {
|
||||
/* Disable implicit copy and assignment operators */
|
||||
BMA250E(const BMA250E&) = delete;
|
||||
BMA250E &operator=(const BMA250E&) = delete;
|
||||
|
||||
// Adding a private function definition for java bindings
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(BMA250E_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -20,19 +20,19 @@ import java.lang.Float;
|
||||
|
||||
%template(floatVector) std::vector<float>;
|
||||
|
||||
%include "bma250e_defs.h"
|
||||
%include "bma250e.hpp"
|
||||
%{
|
||||
#include "bma250e.hpp"
|
||||
#include "bma250e_defs.h"
|
||||
%}
|
||||
%include "bma250e_defs.h"
|
||||
%include "bma250e.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bma250e");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%ignore installISR (BMA250E_INTERRUPT_PINS_T, int, mraa::Edge , void *, void *);
|
||||
|
||||
%define INTERRUPT BMA250E_INTERRUPT_PINS_T
|
||||
%enddef
|
||||
JAVA_ADD_INSTALLISR_INTERRUPT(upm::BMA250E)
|
||||
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bma250e)
|
||||
|
@ -415,13 +415,6 @@ namespace upm {
|
||||
*/
|
||||
void enableOutputFiltering(bool filter);
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(BMG160_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level, jobject runnable)
|
||||
{
|
||||
installISR(intr, gpio, level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* install an interrupt handler.
|
||||
*
|
||||
@ -439,7 +432,6 @@ namespace upm {
|
||||
void installISR(BMG160_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* uninstall a previously installed interrupt handler
|
||||
@ -484,11 +476,5 @@ namespace upm {
|
||||
BMG160(const BMG160&) = delete;
|
||||
BMG160 &operator=(const BMG160&) = delete;
|
||||
|
||||
// needs to be private for SWIG Java builds
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(BMG160_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
@ -20,19 +20,18 @@ import java.lang.Float;
|
||||
|
||||
%template(floatVector) std::vector<float>;
|
||||
|
||||
%include "bmg160_defs.h"
|
||||
%include "bmg160.hpp"
|
||||
%{
|
||||
#include "bmg160.hpp"
|
||||
#include "bmg160_defs.h"
|
||||
%}
|
||||
%include "bmg160_defs.h"
|
||||
%include "bmg160.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bmg160");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
%ignore installISR (BMG160_INTERRUPT_PINS_T , int mraa::Edge , void *, void *);
|
||||
|
||||
%define INTERRUPT BMG160_INTERRUPT_PINS_T
|
||||
%enddef
|
||||
JAVA_ADD_INSTALLISR_INTERRUPT(upm::BMG160)
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmg160)
|
||||
|
@ -30,13 +30,4 @@
|
||||
|
||||
%include "bmi160.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bmi160");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmi160)
|
||||
|
@ -281,14 +281,6 @@ namespace upm {
|
||||
*/
|
||||
void setRepetitionsZ(uint8_t reps);
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(BMM150_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
jobject runnable)
|
||||
{
|
||||
installISR(intr, gpio, level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* Install an interrupt handler.
|
||||
*
|
||||
@ -305,7 +297,6 @@ namespace upm {
|
||||
void installISR(BMM150_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Uninstall a previously installed interrupt handler.
|
||||
@ -350,11 +341,5 @@ namespace upm {
|
||||
BMM150(const BMM150&) = delete;
|
||||
BMM150 &operator=(const BMM150&) = delete;
|
||||
|
||||
// Adding a private function definition for java bindings
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(BMM150_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
@ -20,19 +20,17 @@ import java.lang.Float;
|
||||
|
||||
%template(floatVector) std::vector<float>;
|
||||
|
||||
%include "bmm150_defs.h"
|
||||
%include "bmm150.hpp"
|
||||
%{
|
||||
#include "bmm150.hpp"
|
||||
#include "bmm150_defs.h"
|
||||
%}
|
||||
%include "bmm150_defs.h"
|
||||
%include "bmm150.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bmm150");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
%ignore installISR (BMM150_INTERRUPT_PINS_T , int , mraa::Edge , void *, void *);
|
||||
|
||||
%define INTERRUPT BMM150_INTERRUPT_PINS_T
|
||||
%enddef
|
||||
JAVA_ADD_INSTALLISR_INTERRUPT(upm::BMM150)
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmm150)
|
||||
|
@ -26,13 +26,4 @@
|
||||
#include "bme280.hpp"
|
||||
%}
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bmp280");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmp280)
|
||||
|
@ -15,13 +15,4 @@ import upm_interfaces.*;
|
||||
%include "bmpx8x_defs.h"
|
||||
%include "bmpx8x.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmpx8x)
|
||||
|
@ -44,13 +44,4 @@ import java.lang.Float;
|
||||
#include "bmi055.hpp"
|
||||
%}
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bmx055");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmx055)
|
||||
|
@ -622,12 +622,6 @@ namespace upm {
|
||||
BNO055_SYS_ERR_T getSystemError();
|
||||
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int gpio, mraa_gpio_edge_t level, jobject runnable)
|
||||
{
|
||||
installISR(gpio, level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* install an interrupt handler.
|
||||
*
|
||||
@ -641,7 +635,6 @@ namespace upm {
|
||||
*/
|
||||
void installISR(int gpio, mraa_gpio_edge_t level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* uninstall a previously installed interrupt handler
|
||||
@ -707,10 +700,5 @@ namespace upm {
|
||||
BNO055(const BNO055&) = delete;
|
||||
BNO055 &operator=(const BNO055&) = delete;
|
||||
|
||||
// Adding a private function definition for java bindings
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int gpio, mraa_gpio_edge_t level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
@ -18,19 +18,20 @@
|
||||
%template(byteVector) std::vector<uint8_t>;
|
||||
%template(intVector) std::vector<int>;
|
||||
|
||||
%include "bno055_regs.h"
|
||||
%include "bno055.hpp"
|
||||
%{
|
||||
#include "bno055.hpp"
|
||||
#include "bno055_regs.h"
|
||||
%}
|
||||
%include "bno055_regs.h"
|
||||
%include "bno055.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_bno055");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
%ignore installISR(int , mraa::Edge , void *, void *);
|
||||
|
||||
%extend upm::BNO055 {
|
||||
void installISR(int gpio, mraa_gpio_edge_t level, jobject runnable)
|
||||
{
|
||||
$self->installISR(gpio, level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
%}
|
||||
}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bno055)
|
||||
|
@ -59,12 +59,12 @@ int Button::value()
|
||||
return mraa_gpio_read(m_gpio);
|
||||
}
|
||||
|
||||
#ifdef JAVACALLBACK
|
||||
/*#ifdef JAVACALLBACK
|
||||
void Button::installISR(mraa::Edge level, jobject runnable)
|
||||
{
|
||||
installISR(level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
void Button::installISR(mraa::Edge level, void (*isr)(void *), void *arg)
|
||||
{
|
||||
|
@ -87,11 +87,11 @@ class Button{
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
/*#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(mraa::Edge level, jobject runnable);
|
||||
#else
|
||||
#else*/
|
||||
void installISR(mraa::Edge level, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
//#endif
|
||||
/**
|
||||
* Uninstalls the previously installed ISR
|
||||
*
|
||||
@ -99,9 +99,6 @@ class Button{
|
||||
void uninstallISR();
|
||||
|
||||
private:
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(mraa::Edge level, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
bool m_isrInstalled;
|
||||
std::string m_name;
|
||||
mraa_gpio_context m_gpio;
|
||||
|
@ -9,13 +9,8 @@
|
||||
|
||||
%include "button.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_button");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
#%ignore
|
||||
|
||||
JAVA_ADD_INSTALLISR_EDGE(upm::Button)
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_button)
|
||||
|
@ -8,13 +8,4 @@
|
||||
#include "buzzer.hpp"
|
||||
%}
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_buzzer)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "cjq4435.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_cjq4435)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "collision.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_collision");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_collision)
|
@ -30,13 +30,4 @@
|
||||
|
||||
%include "curieimu.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_curieimu");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_curieimu)
|
||||
|
@ -7,13 +7,4 @@
|
||||
#include "cwlsxxa.hpp"
|
||||
%}
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_cwlsxxa");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_cwlsxxa)
|
||||
|
@ -9,13 +9,4 @@
|
||||
#include "dfrec.hpp"
|
||||
%}
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_dfrec");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_dfrec)
|
||||
|
@ -9,13 +9,4 @@
|
||||
#include "dfrorp.hpp"
|
||||
%}
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_dfrorp");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_dfrorp)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "dfrph.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_dfrph)
|
@ -9,13 +9,4 @@
|
||||
|
||||
%include "ds1307.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ds1307)
|
@ -18,13 +18,4 @@ import upm_interfaces.*;
|
||||
|
||||
%include "ds1808lc.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_ds1808lc");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ds1808lc)
|
||||
|
@ -11,13 +11,4 @@
|
||||
|
||||
%array_class(char, charArray);
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_ds18b20");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ds18b20)
|
||||
|
@ -10,13 +10,4 @@
|
||||
%include "ds2413.hpp"
|
||||
%array_class(char, charArray);
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_ds2413");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ds2413)
|
||||
|
@ -22,13 +22,4 @@
|
||||
%}
|
||||
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_e50hx");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_e50hx)
|
||||
|
@ -10,13 +10,4 @@
|
||||
#include "ecezo.hpp"
|
||||
%}
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_ecezo");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ecezo)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "ecs1030.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ecs1030)
|
@ -9,13 +9,4 @@
|
||||
|
||||
%include "ehr.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_ehr");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_ehr)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "eldriver.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_eldriver");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_eldriver)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "electromagnet.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_electromagnet");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_electromagnet)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "emg.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_emg");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_emg)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "enc03r.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_enc03r)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "flex.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_flex)
|
@ -56,13 +56,4 @@
|
||||
%include "mq9.hpp"
|
||||
%include "tp401.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_gas)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "gp2y0a.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_gp2y0a)
|
@ -10,13 +10,4 @@
|
||||
%include "gprs.hpp"
|
||||
%array_class(char, charArray);
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_gprs");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_gprs)
|
@ -58,12 +58,12 @@ int GroveButton::value()
|
||||
return mraa_gpio_read(m_gpio);
|
||||
}
|
||||
|
||||
#ifdef JAVACALLBACK
|
||||
/*#ifdef JAVACALLBACK
|
||||
void GroveButton::installISR(mraa::Edge level, jobject runnable)
|
||||
{
|
||||
installISR(level, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
void GroveButton::installISR(mraa::Edge level, void (*isr)(void *), void *arg)
|
||||
{
|
||||
|
@ -84,11 +84,11 @@ class GroveButton: public Grove {
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(mraa::Edge level, jobject runnable);
|
||||
#else
|
||||
//#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
// void installISR(mraa::Edge level, jobject runnable);
|
||||
//#else
|
||||
void installISR(mraa::Edge level, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
//#endif
|
||||
/**
|
||||
* Uninstalls the previously installed ISR
|
||||
*
|
||||
@ -96,9 +96,6 @@ class GroveButton: public Grove {
|
||||
void uninstallISR();
|
||||
|
||||
private:
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(mraa::Edge level, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
bool m_isrInstalled;
|
||||
std::string m_name;
|
||||
mraa_gpio_context m_gpio;
|
||||
|
@ -49,13 +49,8 @@
|
||||
#include "grovetemp.hpp"
|
||||
%}
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_ADD_INSTALLISR_EDGE(upm::GroveButton)
|
||||
|
||||
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grove)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovecollision.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovecollision)
|
@ -9,13 +9,4 @@
|
||||
|
||||
%include "groveehr.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_groveehr)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "groveeldriver.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_groveeldriver)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "groveelectromagnet.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_groveelectromagnet)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "groveemg.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_groveemg)
|
@ -10,13 +10,4 @@
|
||||
%include "grovegprs.hpp"
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovegprs)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovegsr.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovegsr)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovelinefinder.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovelinefinder)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovemd.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovemd)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovemoisture.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovemoisture)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "groveo2.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_groveo2)
|
@ -8,13 +8,4 @@
|
||||
|
||||
%include "grovescam.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovescam)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovespeaker.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovespeaker)
|
@ -9,13 +9,4 @@
|
||||
|
||||
%include "groveultrasonic.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_groveultrasonic)
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovevdiv.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovevdiv)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "grovewater.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovewater)
|
@ -9,13 +9,4 @@
|
||||
|
||||
%include "grovewfs.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_grovewfs)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "gsr.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_gsr");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_gsr)
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "guvas12d.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_guvas12d)
|
@ -50,13 +50,4 @@
|
||||
|
||||
%include "h3lis331dl.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_h3lis331dl)
|
@ -8,13 +8,4 @@
|
||||
|
||||
%include "h803x.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_h803x");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_h803x)
|
||||
|
@ -8,14 +8,5 @@
|
||||
%include "hcsr04.h"
|
||||
%include "hcsr04.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hcsr04)
|
||||
|
||||
|
@ -7,13 +7,4 @@
|
||||
|
||||
%include "hdc1000.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_hdc1000");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hdc1000)
|
@ -9,13 +9,4 @@
|
||||
%include "hdxxvxta.hpp"
|
||||
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_hdxxvxta");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hdxxvxta)
|
||||
|
@ -9,13 +9,4 @@
|
||||
#include "hka5.hpp"
|
||||
%}
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_hka5");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hka5)
|
||||
|
@ -18,13 +18,4 @@ import upm_interfaces.*;
|
||||
|
||||
%include "hlg150h.hpp"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_hlg150h");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hlg150h)
|
||||
|
@ -12,13 +12,4 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hm11)
|
@ -20,13 +20,4 @@
|
||||
|
||||
%include "hmc5883l.hpp"
|
||||
|
||||
%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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hmc5883l)
|
@ -25,13 +25,4 @@ READDATA_EXCEPTION(getModSignalStrength())
|
||||
%include "hmtrp.hpp"
|
||||
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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_hmtrp)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user