mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 11:21:12 +03:00
Added new macros for installISR and applied where possible.
This commit is contained in:
@ -35,19 +35,8 @@
|
||||
|
||||
%ignore installISR(int , mraa::Edge , void *, void *);
|
||||
|
||||
%extend upm::MPU60X0 {
|
||||
void installISR(int gpio, mraa::Edge level,
|
||||
jobject runnable)
|
||||
{
|
||||
// delete any existing ISR and GPIO context
|
||||
$self->uninstallISR();
|
||||
|
||||
// greate gpio context
|
||||
mraa::Gpio* swg_gpioIRQ = $self->get_gpioIRQ();
|
||||
|
||||
swg_gpioIRQ->dir(mraa::DIR_IN);
|
||||
swg_gpioIRQ->isr(level, runnable);
|
||||
}
|
||||
}
|
||||
%define GETTER get_gpioIRQ()
|
||||
%enddef
|
||||
JAVA_ADD_INSTALLISR_GPIO(upm::MPU60X0)
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_mpu9150)
|
||||
|
Reference in New Issue
Block a user