upm_led.Led Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of upm_led Show documentation
Show all versions of upm_led Show documentation
Light-emitting Diode (LED)
/* ----------------------------------------------------------------------------
* 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);
}
}