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

upm_mma7455.MMA7455 Maven / Gradle / Ivy

/* ----------------------------------------------------------------------------
 * 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_mma7455;

public class MMA7455 {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected MMA7455(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(MMA7455 obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        javaupm_mma7455JNI.delete_MMA7455(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public MMA7455(int bus, int devAddr) {
    this(javaupm_mma7455JNI.new_MMA7455__SWIG_0(bus, devAddr), true);
  }

  public MMA7455(int bus) {
    this(javaupm_mma7455JNI.new_MMA7455__SWIG_1(bus), true);
  }

  public MMA7455() {
    this(javaupm_mma7455JNI.new_MMA7455__SWIG_2(), true);
  }

  public String name() {
    return javaupm_mma7455JNI.MMA7455_name(swigCPtr, this);
  }

  public int calibrate() {
    return javaupm_mma7455JNI.MMA7455_calibrate(swigCPtr, this);
  }

  public short[] readData() {
    return javaupm_mma7455JNI.MMA7455_readData(swigCPtr, this);
}

  public int i2cReadReg(short reg, byte[] buffer) {
    return javaupm_mma7455JNI.MMA7455_i2cReadReg(swigCPtr, this, reg, buffer);
  }

  public int i2cWriteReg(short reg, byte[] buffer) {
    return javaupm_mma7455JNI.MMA7455_i2cWriteReg(swigCPtr, this, reg, buffer);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy