mirror of
https://github.com/eclipse/upm.git
synced 2025-07-03 02:11:15 +03:00
Added new macros for installISR and applied where possible.
This commit is contained in:
@ -5,10 +5,18 @@
|
||||
|
||||
%ignore getAccelerometer(float *, float *, float *);
|
||||
|
||||
%include "lis3dh_defs.h"
|
||||
%include "lis3dh.hpp"
|
||||
%{
|
||||
#include "lis3dh.hpp"
|
||||
#include "lis3dh_defs.h"
|
||||
%}
|
||||
%include "lis3dh_defs.h"
|
||||
%include "lis3dh.hpp"
|
||||
|
||||
|
||||
%ignore installISR(LIS3DH_INTERRUPT_PINS_T , int , mraa::Edge , void *, void* );
|
||||
|
||||
%define INTERRUPT LIS3DH_INTERRUPT_PINS_T
|
||||
%enddef
|
||||
JAVA_ADD_INSTALLISR_INTERRUPT(upm::LIS3DH)
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_lis3dh)
|
||||
|
@ -329,13 +329,6 @@ class LIS3DH
|
||||
*/
|
||||
uint8_t getStatusAux();
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void
|
||||
installISR(LIS3DH_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
|
||||
*
|
||||
@ -354,7 +347,6 @@ class LIS3DH
|
||||
mraa::Edge level,
|
||||
void (*isr)(void*),
|
||||
void* arg);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Uninstall a previously installed interrupt handler
|
||||
@ -372,13 +364,5 @@ class LIS3DH
|
||||
LIS3DH(const LIS3DH&) = delete;
|
||||
LIS3DH& operator=(const LIS3DH&) = delete;
|
||||
|
||||
// Adding a private function definition for Java bindings
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(LIS3DH_INTERRUPT_PINS_T intr,
|
||||
int gpio,
|
||||
mraa::Edge level,
|
||||
void (*isr)(void*),
|
||||
void* arg);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user