1 %module(directors="1") javaupm_mpu9150
2 %include "../upm.i"
3 %include "typemaps.i"
4 %include "arrays_java.i"
5 %include "../java_buffer.i"
6 
7 %feature("director") IsrCallback;
8 
9 %ignore generic_callback_isr;
10 %include "../IsrCallback.h"
11 
12 %apply int {mraa::Edge};
13 
14 %{
15     #include "mpu60x0.h"
16     #include "mpu9150.h"
17 %}
18 
19 
20 %typemap(jni) float * "jfloatArray"
21 %typemap(jstype) float * "float[]"
22 %typemap(jtype) float * "float[]"
23 
24 %typemap(javaout) float * {
25     return $jnicall;
26 }
27 
28 %typemap(out) float * {
29     $result = JCALL1(NewFloatArray, jenv, 3);
30     JCALL4(SetFloatArrayRegion, jenv, $result, 0, 3, $1);
31     delete [] $1;
32 }
33 
34 %ignore getAccelerometer(float *, float *, float *);
35 %ignore getGyroscope(float *, float *, float *);
36 %ignore getMagnetometer(float *, float *, float *);
37 
38 %include "mpu60x0.h"
39 %include "mpu9150.h"
40