mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 18:01:18 +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
@ -31,7 +31,7 @@
|
||||
|
||||
using namespace upm;
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#ifdef JAVACALLBACK
|
||||
HCSR04::HCSR04 (uint8_t triggerPin, uint8_t echoPin, IsrCallback *cb)
|
||||
{
|
||||
HCSR04 (triggerPin, echoPin, generic_callback_isr);
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <mraa/pwm.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
#include "../IsrCallback.h"
|
||||
#endif
|
||||
|
||||
@ -62,8 +62,8 @@ namespace upm {
|
||||
*/
|
||||
class HCSR04 {
|
||||
public:
|
||||
#ifdef SWIGJAVA
|
||||
HCSR04 (uint8_t triggerPin, uint8_t echoPin, IsrCallback *cb);
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
HCSR04 (uint8_t triggerPin, uint8_t echoPin, IsrCallback *cb);
|
||||
#else
|
||||
/**
|
||||
* Instantiates an HCSR04 object
|
||||
@ -103,7 +103,7 @@ class HCSR04 {
|
||||
}
|
||||
|
||||
private:
|
||||
#ifdef SWIGJAVA
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
HCSR04 (uint8_t triggerPin, uint8_t echoPin, void (*fptr)(void *));
|
||||
#endif
|
||||
mraa_pwm_context m_pwmTriggerCtx;
|
||||
|
Reference in New Issue
Block a user