summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/nunchuck/javaupm_nunchuck.i
blob: e479d05316ab1a97cb7b4d04cfde8e9479d1185d (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.h"
%}

%include "nunchuck.h"

%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);
        }
    }
%}