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

sources.I2cMode 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 mraa;

public final class I2cMode {
  public final static I2cMode I2C_STD = new I2cMode("I2C_STD", mraaJNI.I2C_STD_get());
  public final static I2cMode I2C_FAST = new I2cMode("I2C_FAST", mraaJNI.I2C_FAST_get());
  public final static I2cMode I2C_HIGH = new I2cMode("I2C_HIGH", mraaJNI.I2C_HIGH_get());

  public final int swigValue() {
    return swigValue;
  }

  public String toString() {
    return swigName;
  }

  public static I2cMode swigToEnum(int swigValue) {
    if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
      return swigValues[swigValue];
    for (int i = 0; i < swigValues.length; i++)
      if (swigValues[i].swigValue == swigValue)
        return swigValues[i];
    throw new IllegalArgumentException("No enum " + I2cMode.class + " with value " + swigValue);
  }

  private I2cMode(String swigName) {
    this.swigName = swigName;
    this.swigValue = swigNext++;
  }

  private I2cMode(String swigName, int swigValue) {
    this.swigName = swigName;
    this.swigValue = swigValue;
    swigNext = swigValue+1;
  }

  private I2cMode(String swigName, I2cMode swigEnum) {
    this.swigName = swigName;
    this.swigValue = swigEnum.swigValue;
    swigNext = this.swigValue+1;
  }

  private static I2cMode[] swigValues = { I2C_STD, I2C_FAST, I2C_HIGH };
  private static int swigNext = 0;
  private final int swigValue;
  private final String swigName;
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy