Home | History | Annotate | Download | only in lsm303
      1 %module javaupm_lsm303
      2 %include "../upm.i"
      3 
      4 %{
      5     #include "lsm303.h"
      6 %}
      7 
      8 %typemap(jni) int16_t* "jintArray"
      9 %typemap(jstype) int16_t* "int[]"
     10 %typemap(jtype) int16_t* "int[]"
     11 
     12 %typemap(javaout) int16_t* {
     13     return $jnicall;
     14 }
     15 
     16 %typemap(out) int16_t *getRawAccelData {
     17     $result = JCALL1(NewIntArray, jenv, 3);
     18     JCALL4(SetIntArrayRegion, jenv, $result, 0, 3, (const signed int*)$1);
     19     //delete [] $1;
     20 }
     21 
     22 %include "lsm303.h"
     23