1%module jsupm_hmc5883l
2%include "../upm.i"
3%include "../carrays_int16_t.i"
4%{
5    #include "hmc5883l.h"
6%}
7
8// Adding this typemap because SWIG is converting int16 into a short by default
9// This forces SWIG to convert it correctly
10%typemap(out) int16_t* {
11  $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int16Array, 0 |  0 );
12}
13
14%include "hmc5883l.h"
15