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:
@ -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 *);
|
||||
|
||||
|
Reference in New Issue
Block a user