mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +03:00
Moved SWIG code from C++ files (hpp and cxx) to SWIG interface files (.i). Added getter/setter methods for classes with protected or private vars.
This commit is contained in:
@ -5,10 +5,23 @@
|
||||
|
||||
%ignore getAccelerometer(float *, float *, float *);
|
||||
|
||||
%include "lis2ds12_defs.h"
|
||||
%include "lis2ds12.hpp"
|
||||
%{
|
||||
#include "lis2ds12.hpp"
|
||||
#include "lis2ds12_defs.h"
|
||||
%}
|
||||
%include "lis2ds12_defs.h"
|
||||
%include "lis2ds12.hpp"
|
||||
|
||||
|
||||
#%ignore installISR(LIS2DS12_INTERRUPT_PINS_T , int , mraa::Edge, void *, void *);
|
||||
|
||||
%extend upm::LIS2DS12 {
|
||||
void installISR(LIS2DS12_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level, jobject runnable)
|
||||
{
|
||||
$self->installISR(intr, gpio, level, mraa_java_isr_callback,
|
||||
runnable);
|
||||
}
|
||||
}
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_lis2ds12)
|
||||
|
@ -247,14 +247,6 @@ namespace upm {
|
||||
*/
|
||||
uint8_t getStatus();
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(LIS2DS12_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
|
||||
*
|
||||
@ -271,7 +263,6 @@ namespace upm {
|
||||
void installISR(LIS2DS12_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* uninstall a previously installed interrupt handler
|
||||
@ -316,12 +307,6 @@ namespace upm {
|
||||
/* Disable implicit copy and assignment operators */
|
||||
LIS2DS12(const LIS2DS12&) = delete;
|
||||
LIS2DS12 &operator=(const LIS2DS12&) = delete;
|
||||
|
||||
// Adding a private function definition for java bindings
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(LIS2DS12_INTERRUPT_PINS_T intr, int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user