mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
apds9930: updated java bindings and iio calls to match API
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
828a9ce7d8
commit
5b7522bec4
@ -48,7 +48,7 @@ int
|
||||
APDS9930::getAmbient()
|
||||
{
|
||||
int iio_value = 0;
|
||||
mraa_iio_read_integer(m_iio, "in_illuminance_input", &iio_value);
|
||||
mraa_iio_read_int(m_iio, "in_illuminance_input", &iio_value);
|
||||
return iio_value;
|
||||
}
|
||||
|
||||
@ -56,6 +56,6 @@ int
|
||||
APDS9930::getProximity()
|
||||
{
|
||||
int iio_value = 0;
|
||||
mraa_iio_read_integer(m_iio, "in_proximity_raw", &iio_value);
|
||||
mraa_iio_read_int(m_iio, "in_proximity_raw", &iio_value);
|
||||
return iio_value;
|
||||
}
|
||||
|
@ -1,14 +1,18 @@
|
||||
%module javaupm_apds9930
|
||||
%include "../upm.i"
|
||||
%include "stdint.i"
|
||||
%include "typemaps.i"
|
||||
|
||||
%feature("director") IsrCallback;
|
||||
|
||||
%ignore generic_callback_isr;
|
||||
%include "../IsrCallback.h"
|
||||
|
||||
%{
|
||||
#include "apds9930.h"
|
||||
%}
|
||||
%include "apds9930.h"
|
||||
|
||||
%pragma(java) jniclasscode=%{
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("javaupm_apds9930");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. \n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
Loading…
x
Reference in New Issue
Block a user