mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +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
@ -88,7 +88,7 @@ void MMA7660::getRawValues(int *x, int *y, int *z)
|
||||
*z = getVerifiedAxis(REG_ZOUT);
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#ifdef JAVACALLBACK
|
||||
int *MMA7660::getRawValues()
|
||||
{
|
||||
int *values = new int[3];
|
||||
@ -204,7 +204,7 @@ bool MMA7660::tiltShake()
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#ifdef JAVACALLBACK
|
||||
void MMA7660::installISR(int pin, IsrCallback *cb)
|
||||
{
|
||||
installISR(pin, generic_callback_isr, cb);
|
||||
@ -263,7 +263,7 @@ void MMA7660::getAcceleration(float *ax, float *ay, float *az)
|
||||
*az = z/21.33;
|
||||
}
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#ifdef JAVACALLBACK
|
||||
float *MMA7660::getAcceleration()
|
||||
{
|
||||
float *values = new float[3];
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <mraa/i2c.h>
|
||||
#include <mraa/gpio.h>
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
#include "../IsrCallback.h"
|
||||
#endif
|
||||
|
||||
@ -169,7 +169,7 @@ namespace upm {
|
||||
*/
|
||||
void getRawValues(int *x, int *y, int *z);
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
/**
|
||||
* Reads the current value of conversion
|
||||
*
|
||||
@ -187,7 +187,7 @@ namespace upm {
|
||||
*/
|
||||
void getAcceleration(float *ax, float *ay, float *az);
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
/**
|
||||
* Gets the computed acceleration
|
||||
*
|
||||
@ -270,7 +270,7 @@ namespace upm {
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int pin, IsrCallback *cb);
|
||||
#else
|
||||
void installISR(int pin, void (*isr)(void *), void *arg);
|
||||
@ -301,7 +301,7 @@ namespace upm {
|
||||
bool setSampleRate(MMA7660_AUTOSLEEP_T sr);
|
||||
|
||||
private:
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int pin, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user