2014-09-05 18:57:56 +01:00
|
|
|
%module jsupm_lsm303
|
|
|
|
|
%include "../upm.i"
|
2014-12-10 16:30:46 -05:00
|
|
|
%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 );
|
|
|
|
|
}
|
2014-09-05 18:57:56 +01:00
|
|
|
|
|
|
|
|
%{
|
|
|
|
|
#include "lsm303.h"
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
|
|
%include "lsm303.h"
|