1 %module javaupm_i2clcd
2 %include "../upm.i"
3 %include "stdint.i"
4 %include "typemaps.i"
5 %include "arrays_java.i";
6 
7 %apply signed char[] {uint8_t []};
8 %ignore BasicFont;
9 
10 %typemap(jni) (uint8_t *data, int bytes) "jbyteArray";
11 %typemap(jtype) (uint8_t *data, int bytes) "byte[]";
12 %typemap(jstype) (uint8_t *data, int bytes) "byte[]";
13 
14 %typemap(javain) (uint8_t *data, int bytes) "$javainput";
15 
16 %typemap(in) (uint8_t *data, int bytes) {
17         $1 = (uint8_t *) JCALL2(GetByteArrayElements, jenv, $input, NULL);
18         $2 = JCALL1(GetArrayLength, jenv, $input);
19 }
20 
21 %typemap(freearg) (uint8_t *data, int bytes) {
22         JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte *)$1, 0);
23 }
24 
25 %{
26     #include "lcd.h"
27     #include "ssd.h"
28     #include "ssd1327.h"
29     #include "ssd1308.h"
30     #include "ssd1306.h"
31     #include "eboled.h"
32     #include "lcm1602.h"
33     #include "jhd1313m1.h"
34     #include "sainsmartks.h"
35 %}
36 
37 %include "lcd.h"
38 %include "ssd.h"
39 %include "ssd1327.h"
40 %include "ssd1308.h"
41 %include "ssd1306.h"
42 %include "eboled.h"
43 %include "lcm1602.h"
44 %include "jhd1313m1.h"
45 %include "sainsmartks.h"
46