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

upm_led.Led 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_led;

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

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

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

  protected void finalize() {
    delete();
  }

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

  public Led(int pin) {
    this(javaupm_ledJNI.new_Led(pin), true);
  }

  public int write(int value) {
    return javaupm_ledJNI.Led_write(swigCPtr, this, value);
  }

  public int off() {
    return javaupm_ledJNI.Led_off(swigCPtr, this);
  }

  public int on() {
    return javaupm_ledJNI.Led_on(swigCPtr, this);
  }

  public String name() {
    return javaupm_ledJNI.Led_name(swigCPtr, this);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy