Added new macros for installISR and applied where possible.

This commit is contained in:
Serban Waltter
2018-01-19 13:12:50 +02:00
committed by Noel Eck
parent 63b2b33df7
commit e192a125f3
20 changed files with 111 additions and 144 deletions

View File

@ -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)

View File

@ -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
};
}