mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 09:20:39 +03:00

Previously, the C++ and C versions of this driver were separate. Now the C++ implementation wraps the C implementation. In addition, the C++ init() function has been deprecated. It currently does nothing, and examples have been modified to remove it's calls. This function will be removed in a separate release. The examples have been further modified to update all detected devices and print their respective temperatures, instead of only reporting the on the first device detected. Signed-off-by: Jon Trulson <jtrulson@ics.com>
24 lines
481 B
OpenEdge ABL
24 lines
481 B
OpenEdge ABL
%module javaupm_ds18b20
|
|
%include "../upm.i"
|
|
%include "carrays.i"
|
|
%include "std_string.i"
|
|
|
|
%include "ds18b20_defs.h"
|
|
%include "ds18b20.hpp"
|
|
%{
|
|
#include "ds18b20.hpp"
|
|
%}
|
|
|
|
%array_class(char, charArray);
|
|
|
|
%pragma(java) jniclasscode=%{
|
|
static {
|
|
try {
|
|
System.loadLibrary("javaupm_ds18b20");
|
|
} catch (UnsatisfiedLinkError e) {
|
|
System.err.println("Native code library failed to load. \n" + e);
|
|
System.exit(1);
|
|
}
|
|
}
|
|
%}
|