2015-08-05 19:43:31 +03:00
|
|
|
%module javaupm_i2clcd
|
|
|
|
%include "../upm.i"
|
|
|
|
%include "stdint.i"
|
|
|
|
%include "typemaps.i"
|
2015-08-17 18:25:09 +03:00
|
|
|
%include "arrays_java.i";
|
2015-09-01 15:09:12 +03:00
|
|
|
|
2015-09-01 18:54:20 +03:00
|
|
|
%apply signed char[] {uint8_t []};
|
2015-09-08 15:36:07 +03:00
|
|
|
%ignore BasicFont;
|
2015-08-05 19:43:31 +03:00
|
|
|
|
2015-09-01 18:54:20 +03:00
|
|
|
%typemap(jni) (uint8_t *data, int bytes) "jbyteArray";
|
|
|
|
%typemap(jtype) (uint8_t *data, int bytes) "byte[]";
|
|
|
|
%typemap(jstype) (uint8_t *data, int bytes) "byte[]";
|
|
|
|
|
|
|
|
%typemap(javain) (uint8_t *data, int bytes) "$javainput";
|
|
|
|
|
|
|
|
%typemap(in) (uint8_t *data, int bytes) {
|
|
|
|
$1 = (uint8_t *) JCALL2(GetByteArrayElements, jenv, $input, NULL);
|
|
|
|
$2 = JCALL1(GetArrayLength, jenv, $input);
|
|
|
|
}
|
|
|
|
|
|
|
|
%typemap(freearg) (uint8_t *data, int bytes) {
|
|
|
|
JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte *)$1, 0);
|
|
|
|
}
|
|
|
|
|
2015-09-07 19:00:30 +03:00
|
|
|
%{
|
2016-04-25 14:27:51 -07:00
|
|
|
#include "lcd.hpp"
|
|
|
|
#include "ssd.hpp"
|
|
|
|
#include "ssd1327.hpp"
|
|
|
|
#include "ssd1308.hpp"
|
|
|
|
#include "ssd1306.hpp"
|
|
|
|
#include "eboled.hpp"
|
|
|
|
#include "lcm1602.hpp"
|
|
|
|
#include "jhd1313m1.hpp"
|
|
|
|
#include "sainsmartks.hpp"
|
2015-09-07 19:00:30 +03:00
|
|
|
%}
|
|
|
|
|
2016-04-25 14:27:51 -07:00
|
|
|
%include "lcd.hpp"
|
|
|
|
%include "ssd.hpp"
|
|
|
|
%include "ssd1327.hpp"
|
|
|
|
%include "ssd1308.hpp"
|
|
|
|
%include "ssd1306.hpp"
|
|
|
|
%include "eboled.hpp"
|
|
|
|
%include "lcm1602.hpp"
|
|
|
|
%include "jhd1313m1.hpp"
|
|
|
|
%include "sainsmartks.hpp"
|
2015-11-23 17:04:32 +02:00
|
|
|
|
|
|
|
%pragma(java) jniclasscode=%{
|
|
|
|
static {
|
|
|
|
try {
|
|
|
|
System.loadLibrary("javaupm_i2clcd");
|
|
|
|
} catch (UnsatisfiedLinkError e) {
|
|
|
|
System.err.println("Native code library failed to load. \n" + e);
|
|
|
|
System.exit(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%}
|