1 %module javaupm_st7735 2 %include "../upm.i" 3 %include "arrays_java.i" 4 %include "typemaps.i" 5 %include "stdint.i" 6 7 %ignore m_map; 8 %ignore Bcmd; 9 %ignore font; 10 %ignore Rcmd1; 11 %ignore Rcmd2green; 12 %ignore Rcmd2red; 13 %ignore Rcmd3; 14 15 16 /* 17 %typemap(jni) unsigned char[] "jbyteArray"; 18 %typemap(jtype) unsigned char[] "byte[]"; 19 %typemap(jstype) unsigned char[] "byte[]"; 20 21 %typemap(out) unsigned char[] { 22 $result = SWIG_JavaArrayOutSchar(jenv, reinterpret_cast<signed char*>($1), sizeof($1)); 23 } 24 %typemap(freearg) unsigned char* { 25 JCALL3(ReleaseByteArrayElements, jenv, $input, reinterpret_cast<jbyte*>($1), 0); 26 } 27 */ 28 %typemap(jni) unsigned char* "jbyteArray"; 29 %typemap(jtype) unsigned char* "byte[]"; 30 %typemap(jstype) unsigned char* "byte[]"; 31 32 %typemap(javain) unsigned char* "$javainput" 33 34 %typemap(in) unsigned char* { 35 $1 = (unsigned char *)JCALL2(GetByteArrayElements, jenv, $input, NULL); 36 } 37 38 %include "gfx.h" 39 %{ 40 #include "gfx.h" 41 %} 42 43 %include "st7735.h" 44 %{ 45 #include "st7735.h" 46 %} 47