summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/nunchuck/javaupm_nunchuck.i
blob: 57b0d92bda88e7d7db1c421321b7382f3f626c09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
%module javaupm_nunchuck
%include "../upm.i"
%include "../java_buffer.i"

%{
    #include "nunchuck.hpp"
%}

%include "nunchuck.hpp"

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