summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/hm11/javaupm_hm11.i
blob: df710826739e5bad767db5f803539ba559e7c197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
%module javaupm_hm11
%include "../upm.i"
%include "carrays.i"
%include "../java_buffer.i"

%{
    #include "hm11.h"
    speed_t int_B9600 = B9600;
%}

%include "hm11.h"
speed_t int_B9600 = B9600;
%array_class(char, charArray);

%pragma(java) jniclasscode=%{
    static {
        try {
            System.loadLibrary("javaupm_hm11");
        } catch (UnsatisfiedLinkError e) {
            System.err.println("Native code library failed to load. \n" + e);
            System.exit(1);
        }
    }
%}