summaryrefslogtreecommitdiff
path: root/peripheral/libupm/src/ads1x15/javaupm_ads1x15.i
blob: 88522e3a3ea868234f77bbaae0ac2969bb7f2409 (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
25
26
%module javaupm_ads1x15
%include "../upm.i"
%include "typemaps.i"

%{
    #include "ads1x15.h"
    #include "ads1015.h"
    #include "ads1115.h"
%}

%include "ads1x15.h"
%include "ads1015.h"
%include "ads1115.h"



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