Added bindings for iAcceleration sensors

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
This commit is contained in:
Serban Waltter
2018-08-07 17:12:08 +03:00
parent a411723e5c
commit fae1da6c6f
47 changed files with 448 additions and 84 deletions

View File

@ -4,6 +4,7 @@ upm_mixed_module_init (NAME bma250e
C_SRC bma250e.c
CPP_HDR bma250e.hpp
CPP_SRC bma250e.cxx
IFACE_HDR iAcceleration.hpp
FTI_SRC bma250e_fti.c
CPP_WRAPS_C
REQUIRES mraa utilities-c)

View File

@ -1,3 +1,9 @@
#ifdef SWIGPYTHON
%module (package="upm") bma250e
#endif
%import "interfaces/new_interfaces.i"
%include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */
@ -8,6 +14,8 @@
%ignore installISR (BMA250E_INTERRUPT_PINS_T, int, mraa::Edge , void *, void *);
%typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*;
import java.util.AbstractList;
import java.lang.Float;
%}
@ -15,12 +23,6 @@ import java.lang.Float;
%typemap(javaout) upm::BMA250E {
return new $&javaclassname($jnicall, true);
}
%typemap(javaout) std::vector<float> {
return (AbstractList<Float>)(new $&javaclassname($jnicall, true));
}
%typemap(jstype) std::vector<float> "AbstractList<Float>"
%template(floatVector) std::vector<float>;
%define INTERRUPT BMA250E_INTERRUPT_PINS_T
%enddef