mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
java: fix Java arrays for lcd modules
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
fbf68d1dd8
commit
2ceb6a9d8d
@ -4,48 +4,40 @@
|
|||||||
%include "typemaps.i"
|
%include "typemaps.i"
|
||||||
%include "arrays_java.i";
|
%include "arrays_java.i";
|
||||||
|
|
||||||
%apply signed char[] {uint8_t *};
|
%apply signed char[] {uint8_t []};
|
||||||
%apply uint8_t *OUTPUT { uint8_t *data };
|
|
||||||
|
|
||||||
|
|
||||||
%include "lcd.h"
|
|
||||||
%{
|
%{
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
%}
|
|
||||||
|
|
||||||
%include "ssd.h"
|
|
||||||
%{
|
|
||||||
#include "ssd.h"
|
#include "ssd.h"
|
||||||
%}
|
|
||||||
|
|
||||||
%include "ssd1327.h"
|
|
||||||
%{
|
|
||||||
#include "ssd1327.h"
|
#include "ssd1327.h"
|
||||||
%}
|
|
||||||
|
|
||||||
%include "ssd1308.h"
|
|
||||||
%{
|
|
||||||
#include "ssd1308.h"
|
#include "ssd1308.h"
|
||||||
%}
|
|
||||||
|
|
||||||
%include "eboled.h"
|
|
||||||
%{
|
|
||||||
#include "eboled.h"
|
#include "eboled.h"
|
||||||
%}
|
|
||||||
|
|
||||||
%include "lcm1602.h"
|
|
||||||
%{
|
|
||||||
#include "lcm1602.h"
|
#include "lcm1602.h"
|
||||||
%}
|
|
||||||
|
|
||||||
%include "jhd1313m1.h"
|
|
||||||
%{
|
|
||||||
#include "jhd1313m1.h"
|
#include "jhd1313m1.h"
|
||||||
%}
|
|
||||||
|
|
||||||
%include "sainsmartks.h"
|
|
||||||
%{
|
|
||||||
#include "sainsmartks.h"
|
#include "sainsmartks.h"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
|
%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);
|
||||||
|
}
|
||||||
|
|
||||||
|
%include "lcd.h"
|
||||||
|
%include "ssd.h"
|
||||||
|
%include "ssd1327.h"
|
||||||
|
%include "ssd1308.h"
|
||||||
|
%include "eboled.h"
|
||||||
|
%include "lcm1602.h"
|
||||||
|
%include "jhd1313m1.h"
|
||||||
|
%include "sainsmartks.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user