mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 11:21:12 +03:00
java: Eliminated double definition of SWIGJAVA and the need for "#undefine SWIGJAVA"
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com> Conflicts: src/CMakeLists.txt
This commit is contained in:

committed by
Mihai Tudor Panu

parent
f991bcf915
commit
ef74a7b137
@ -380,7 +380,7 @@ uint8_t MPU60X0::getInterruptPinConfig()
|
||||
return readReg(REG_INT_PIN_CFG);
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#ifdef JAVACALLBACK
|
||||
void MPU60X0::installISR(int gpio, mraa::Edge level,
|
||||
IsrCallback *cb)
|
||||
{
|
||||
|
@ -27,15 +27,9 @@
|
||||
#include <mraa/common.hpp>
|
||||
#include <mraa/i2c.hpp>
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#undef SWIGJAVA
|
||||
#include <mraa/gpio.hpp>
|
||||
#define SWIGJAVA
|
||||
#else
|
||||
#include <mraa/gpio.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
#include "../IsrCallback.h"
|
||||
#endif
|
||||
|
||||
@ -809,7 +803,7 @@ namespace upm {
|
||||
*/
|
||||
void getGyroscope(float *x, float *y, float *z);
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
/**
|
||||
* get the accelerometer values
|
||||
*
|
||||
@ -926,7 +920,7 @@ namespace upm {
|
||||
* @param isr the interrupt handler, accepting a void * argument
|
||||
* @param arg the argument to pass the the interrupt handler
|
||||
*/
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int gpio, mraa::Edge level, IsrCallback *cb);
|
||||
#else
|
||||
void installISR(int gpio, mraa::Edge level, void (*isr)(void *), void *arg);
|
||||
@ -957,7 +951,7 @@ namespace upm {
|
||||
float m_gyroScale;
|
||||
|
||||
private:
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int gpio, mraa::Edge level, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user