mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
lsm303: Modifications to js swig file
Signed-off-by: Zion Orent <zorent@ics.com> Signed-off-by: Jon Trulson <jtrulson@ics.com> Signed-off-by: Sarah Knepper <sarah.knepper@intel.com>
This commit is contained in:
parent
9d48301402
commit
405dab1725
@ -1,5 +1,12 @@
|
|||||||
%module jsupm_lsm303
|
%module jsupm_lsm303
|
||||||
%include "../upm.i"
|
%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.h"
|
#include "lsm303.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user