All Downloads are FREE. Search and download functionalities are using the official Maven repository.

upm_max44000.MAX44000 Maven / Gradle / Ivy

There is a newer version: 1.7.1
Show newest version
/* ----------------------------------------------------------------------------
 * 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);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy