summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/adxl345/jsupm_adxl345.i
blob: 6f72b795a39b3af9c98cc2e4ec412626a96b7b26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
%module jsupm_adxl345
%include "../upm.i"
%include "../carrays_int16_t.i"
%include "../carrays_float.i"

%{
    #include "adxl345.h"
%}

%typemap(out) int16_t * {
    $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int16Array, 0 | 0 );
}

%typemap(out) float * {
    $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_floatArray, 0 | 0 );
}

%include "adxl345.h"

%include <carrays.i>