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
@@ -2,4 +2,5 @@ set (libname "mma7455")
|
||||
set (libdescription "Three Axis +/- 2/4/8 g Digital Accelerometer")
|
||||
set (module_src ${libname}.cxx)
|
||||
set (module_hpp ${libname}.hpp)
|
||||
set (module_iface iAcceleration.hpp)
|
||||
upm_module_init(mraa)
|
||||
|
||||
@@ -1,17 +1,52 @@
|
||||
#ifdef SWIGPYTHON
|
||||
%module (package="upm") mma7455
|
||||
#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"
|
||||
%apply short *OUTPUT { short * ptrX, short * ptrY, short * ptrZ };
|
||||
%template(ShortVector) std::vector<short>;
|
||||
|
||||
%typemap(javaimports) SWIGTYPE %{
|
||||
import upm_new_interfaces.*;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.lang.Float;
|
||||
import java.lang.Short;
|
||||
%}
|
||||
|
||||
%{
|
||||
#include <vector>
|
||||
%}
|
||||
|
||||
%typemap(javaout) std::vector<short> {
|
||||
return (AbstractList<Short>)(new $&javaclassname($jnicall, true));
|
||||
}
|
||||
%typemap(jstype) std::vector<short> "AbstractList<Short>"
|
||||
|
||||
%template(shortVector) std::vector<short>;
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_mma7455)
|
||||
#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 ------------------------------------------------- */
|
||||
%{
|
||||
#include "mma7455.hpp"
|
||||
|
||||
Reference in New Issue
Block a user