Added new macros for installISR and applied where possible.

This commit is contained in:
Serban Waltter
2018-01-19 13:12:50 +02:00
committed by Noel Eck
parent 63b2b33df7
commit e192a125f3
20 changed files with 111 additions and 144 deletions

View File

@ -30,21 +30,9 @@
%include "bma220.hpp"
%extend upm::BMA220 {
void installISR(int gpio, mraa::Edge level, jobject runnable)
{
// delete any existing ISR and GPIO context
$self->uninstallISR();
// create gpio context
mraa::Gpio* swg_gpioIntr = $self->get_gpioIntr();
swg_gpioIntr->dir(mraa::DIR_IN);
swg_gpioIntr->isr(level, runnable);
}
}
%define GETTER get_gpioIntr();
%enddef
JAVA_ADD_INSTALLISR_GPIO(upm::BMA220)
%ignore installISR(int, mraa::Edge, void *, void *);