mirror of
https://github.com/eclipse/upm.git
synced 2025-07-06 11:51:10 +03:00
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:

committed by
Mihai Tudor Panu

parent
323905a215
commit
19bcbc7c42
@ -27,6 +27,10 @@
|
||||
#include <mraa/i2c.h>
|
||||
#include <mraa/gpio.h>
|
||||
|
||||
#ifdef SWIGJAVA
|
||||
#include "../IsrCallback.h"
|
||||
#endif
|
||||
|
||||
#define MMA7660_I2C_BUS 0
|
||||
#define MMA7660_DEFAULT_I2C_ADDR 0x4c
|
||||
|
||||
@ -248,8 +252,11 @@ namespace upm {
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
#ifdef SWIGJAVA
|
||||
void installISR(int pin, IsrCallback *cb);
|
||||
#else
|
||||
void installISR(int pin, void (*isr)(void *), void *arg);
|
||||
|
||||
#endif
|
||||
/**
|
||||
* Uninstalls the previously installed ISR
|
||||
*
|
||||
@ -276,6 +283,10 @@ namespace upm {
|
||||
bool setSampleRate(MMA7660_AUTOSLEEP_T sr);
|
||||
|
||||
private:
|
||||
#ifdef SWIGJAVA
|
||||
void installISR(int pin, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
bool m_isrInstalled;
|
||||
mraa_i2c_context m_i2c;
|
||||
mraa_gpio_context m_gpio;
|
||||
|
Reference in New Issue
Block a user