upm_max44000.MAX44000 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of upm_max44000 Show documentation
Show all versions of upm_max44000 Show documentation
Ambient and Infrared Proximity Sensor
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.6
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package upm_max44000;
public class MAX44000 {
private long swigCPtr;
protected boolean swigCMemOwn;
protected MAX44000(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(MAX44000 obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
javaupm_max44000JNI.delete_MAX44000(swigCPtr);
}
swigCPtr = 0;
}
}
public MAX44000(int bus, int devAddr) {
this(javaupm_max44000JNI.new_MAX44000__SWIG_0(bus, devAddr), true);
}
public MAX44000(int bus) {
this(javaupm_max44000JNI.new_MAX44000__SWIG_1(bus), true);
}
public int getProximity() {
return javaupm_max44000JNI.MAX44000_getProximity(swigCPtr, this);
}
public int getAmbient() {
return javaupm_max44000JNI.MAX44000_getAmbient(swigCPtr, this);
}
public String name() {
return javaupm_max44000JNI.MAX44000_name(swigCPtr, this);
}
public short i2cReadReg_8(int reg) {
return javaupm_max44000JNI.MAX44000_i2cReadReg_8(swigCPtr, this, reg);
}
public int i2cReadReg_16(int reg) {
return javaupm_max44000JNI.MAX44000_i2cReadReg_16(swigCPtr, this, reg);
}
public int i2cWriteReg(short reg, short value) {
return javaupm_max44000JNI.MAX44000_i2cWriteReg(swigCPtr, this, reg, value);
}
}