mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 09:51:14 +03:00
Added new macros for installISR and applied where possible.
This commit is contained in:
@ -35,13 +35,18 @@
|
||||
JCALL4(SetIntArrayRegion, jenv, $result, 0, 3, (const signed int*)$1);
|
||||
}
|
||||
|
||||
|
||||
%ignore getRawValues(int *, int *, int *);
|
||||
%ignore getAcceleration(float *, float *, float *);
|
||||
|
||||
%include "mma7660_regs.h"
|
||||
%include "mma7660.hpp"
|
||||
%{
|
||||
#include "mma7660.hpp"
|
||||
#include "mma7660_regs.h"
|
||||
%}
|
||||
%include "mma7660_regs.h"
|
||||
%include "mma7660.hpp"
|
||||
|
||||
%ignore installISR(int , void *, void *);
|
||||
|
||||
JAVA_ADD_INSTALLISR_PIN(upm::MMA7660)
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_mma7660)
|
||||
|
@ -225,12 +225,7 @@ namespace upm {
|
||||
getRawValues(&values[0], &values[1], &values[2]);
|
||||
return values;
|
||||
}
|
||||
|
||||
void installISR(int pin, jobject runnable)
|
||||
{
|
||||
installISR(pin, mraa_java_isr_callback, runnable);
|
||||
}
|
||||
#else
|
||||
#endif
|
||||
/**
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* an interrupt occurs
|
||||
@ -241,7 +236,6 @@ namespace upm {
|
||||
* argument to the ISR.
|
||||
*/
|
||||
void installISR(int pin, void (*isr)(void *), void *arg);
|
||||
#endif // defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
|
||||
protected:
|
||||
mma7660_context m_mma7660;
|
||||
@ -251,9 +245,5 @@ namespace upm {
|
||||
MMA7660(const MMA7660&) = delete;
|
||||
MMA7660 &operator=(const MMA7660&) = delete;
|
||||
|
||||
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
|
||||
void installISR(int pin, void (*isr)(void *), void *arg);
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user