summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/lsm303/jsupm_lsm303.i
blob: ba6d27b3f81c2606d209eb779069ea26e91f3313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
%module jsupm_lsm303
%include "../upm.i"
%include "../carrays_int16_t.i"

// Adding this typemap because SWIG is converting int16 into a short by default
// This forces SWIG to convert it correctly
%typemap(out) int16_t* {
	jsresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int16Array, 0 |  0 );
}

%{
    #include "lsm303.hpp"
%}

%include "lsm303.hpp"