java: solved callbacks

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Stefan Andritoiu
2015-08-19 19:27:16 +03:00
committed by Mihai Tudor Panu
parent 323905a215
commit 19bcbc7c42
13 changed files with 108 additions and 16 deletions

View File

@ -34,6 +34,10 @@
#include <mraa/gpio.hpp>
#endif
#ifdef SWIGJAVA
#include "../IsrCallback.h"
#endif
#define MPU60X0_I2C_BUS 0
#define MPU60X0_DEFAULT_I2C_ADDR 0x68
@ -904,7 +908,11 @@ namespace upm {
* @param isr the interrupt handler, accepting a void * argument
* @param arg the argument to pass the the interrupt handler
*/
#ifdef SWIGJAVA
void installISR(int gpio, mraa::Edge level, IsrCallback *cb);
#else
void installISR(int gpio, mraa::Edge level, void (*isr)(void *), void *arg);
#endif
/**
* uninstall a previously installed interrupt handler
@ -931,6 +939,10 @@ namespace upm {
float m_gyroScale;
private:
#ifdef SWIGJAVA
void installISR(int gpio, mraa::Edge level, void (*isr)(void *), void *arg);
#endif
mraa::I2c m_i2c;
uint8_t m_addr;