mirror of
https://github.com/eclipse/upm.git
synced 2025-09-14 22:25:19 +03:00
Added bindings for iAcceleration sensors
Signed-off-by: Serban Waltter <serban.waltter@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
f992876461
commit
b6e53f7da8
@@ -4,6 +4,7 @@ upm_mixed_module_init (NAME mma7660
|
||||
C_SRC mma7660.c
|
||||
CPP_HDR mma7660.hpp
|
||||
CPP_SRC mma7660.cxx
|
||||
IFACE_HDR iAcceleration.hpp
|
||||
FTI_SRC mma7660_fti.c
|
||||
CPP_WRAPS_C
|
||||
REQUIRES mraa)
|
||||
|
@@ -1,23 +1,57 @@
|
||||
#ifdef SWIGPYTHON
|
||||
%module (package="upm") mma7660
|
||||
#endif
|
||||
|
||||
%import "interfaces/new_interfaces.i"
|
||||
|
||||
%include "../common_top.i"
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%include "arrays_java.i";
|
||||
%include "../java_buffer.i"
|
||||
%include "std_vector.i"
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
import java.lang.Integer;
|
||||
%}
|
||||
|
||||
%{
|
||||
#include <vector>
|
||||
%}
|
||||
|
||||
%typemap(javaout) std::vector<int> {
|
||||
return (AbstractList<Integer>)(new $&javaclassname($jnicall, true));
|
||||
}
|
||||
%typemap(jstype) std::vector<int> "AbstractList<Integer>"
|
||||
|
||||
%template(intVector) std::vector<int>;
|
||||
|
||||
|
||||
%apply float *OUTPUT { float *ax, float *ay, float *az };
|
||||
%apply int *OUTPUT { int *x, int *y, int *z };
|
||||
%ignore installISR(int , void *, void *);
|
||||
|
||||
%template(IntVector) std::vector<int>;
|
||||
%template(FloatVector) std::vector<float>;
|
||||
|
||||
JAVA_ADD_INSTALLISR_PIN(upm::MMA7660)
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_mma7660)
|
||||
#endif
|
||||
/* END Java syntax */
|
||||
|
||||
/* BEGIN Javascript syntax ------------------------------------------------- */
|
||||
#ifdef SWIGJAVASCRIPT
|
||||
%include "../upm_vectortypes.i"
|
||||
#endif
|
||||
/* END Javascript syntax */
|
||||
|
||||
/* BEGIN Python syntax ----------------------------------------------------- */
|
||||
#ifdef SWIGPYTHON
|
||||
%include "../upm_vectortypes.i"
|
||||
#endif
|
||||
/* END Python syntax */
|
||||
|
||||
/* BEGIN Common SWIG syntax ------------------------------------------------- */
|
||||
%pointer_functions(int, intp);
|
||||
%pointer_functions(float, floatp);
|
||||
|
Reference in New Issue
Block a user