[Project] Fixed JavaDocs
This commit is contained in:
parent
58d1c8a032
commit
56da48c411
|
@ -9,7 +9,7 @@ package ch.eitchnet.beaglebone;
|
|||
* A {@link Gpio} can be either an input pin, or an output pin. This is defined by this enum
|
||||
* </p>
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public enum Direction {
|
||||
IN("in"), OUT("out");
|
||||
|
@ -20,10 +20,21 @@ public enum Direction {
|
|||
this.direction = direction;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the direction
|
||||
*/
|
||||
public String getDirection() {
|
||||
return this.direction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the direction enum from the given value
|
||||
*
|
||||
* @param directionS
|
||||
* the direction string to parse
|
||||
*
|
||||
* @return the direction parsed from the given string
|
||||
*/
|
||||
public static Direction getDirection(String directionS) {
|
||||
if (directionS.equals(IN.direction))
|
||||
return IN;
|
||||
|
|
|
@ -14,7 +14,7 @@ package ch.eitchnet.beaglebone;
|
|||
* written.
|
||||
* </p>
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class Gpio {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Map;
|
|||
* {@link Gpio} objects are cached and their {@link Signal} is set by the {@link GpioBridge} accordingly
|
||||
* </p>
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class GpioBridge {
|
||||
|
||||
|
@ -63,6 +63,7 @@ public class GpioBridge {
|
|||
*
|
||||
* @param gpio
|
||||
* the {@link Gpio} for which the path is to be returned
|
||||
*
|
||||
* @return the Path to the {@link Gpio}'s value
|
||||
*/
|
||||
private File getGpioValuePath(Gpio gpio) {
|
||||
|
@ -74,6 +75,7 @@ public class GpioBridge {
|
|||
*
|
||||
* @param gpio
|
||||
* the {@link Gpio} for which the path is to be returned
|
||||
*
|
||||
* @return the Path to the {@link Gpio}'s direction
|
||||
*/
|
||||
private File getGpioDirectionPath(Gpio gpio) {
|
||||
|
@ -123,7 +125,6 @@ public class GpioBridge {
|
|||
*
|
||||
* @param gpio
|
||||
* the {@link Gpio} for which the {@link Signal} should be read
|
||||
* @param gpio
|
||||
*
|
||||
* @return The {@link Gpio}'s current signal
|
||||
*
|
||||
|
@ -224,7 +225,7 @@ public class GpioBridge {
|
|||
}
|
||||
}
|
||||
}
|
||||
} , "gpio_reader");
|
||||
}, "gpio_reader");
|
||||
this.thread.start();
|
||||
System.out.println("Started GPIO bridge.");
|
||||
}
|
||||
|
@ -378,6 +379,8 @@ public class GpioBridge {
|
|||
* the {@link Gpio} for which the listener is to be removed
|
||||
* @param listener
|
||||
* the {@link GpioSignalListener} to be removed from changes to the given {@link Gpio}
|
||||
*
|
||||
* @return true if the listener was unregistered, false if not
|
||||
*/
|
||||
public boolean unregister(GpioBridgeTest gpio, GpioSignalListener listener) {
|
||||
synchronized (this.listeners) {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package ch.eitchnet.beaglebone;
|
||||
|
||||
/**
|
||||
* Bridge test class
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class GpioBridgeTest {
|
||||
|
||||
private static Gpio redBtn;
|
||||
|
|
|
@ -3,7 +3,7 @@ package ch.eitchnet.beaglebone;
|
|||
/**
|
||||
* General {@link Exception} for exceptional situations while using the {@link GpioBridge}
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class GpioException extends Exception {
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ package ch.eitchnet.beaglebone;
|
|||
* {@link Gpio} is {@link Direction#IN}
|
||||
* </p>
|
||||
*
|
||||
* </p>
|
||||
* <p>
|
||||
* Register the {@link GpioSignalListener} calling {@link GpioBridge#register(Gpio, GpioSignalListener)}
|
||||
* </p>
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public interface GpioSignalListener {
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ package ch.eitchnet.beaglebone;
|
|||
* input/outpunt) pin.
|
||||
* </p>
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public enum Pin {
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ package ch.eitchnet.beaglebone;
|
|||
* A signal of {@link #LOW} means that the value is 0, and a value of {@link #HIGH} means the value is 1
|
||||
* </p>
|
||||
*
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public enum Signal {
|
||||
LOW(0, "0", false, "low"), HIGH(1, "1", true, "high");
|
||||
|
@ -87,7 +87,7 @@ public enum Signal {
|
|||
/**
|
||||
* Returns the {@link Signal} enum for the given string value
|
||||
*
|
||||
* @param value
|
||||
* @param valueS
|
||||
* the value for which to return the {@link Signal}
|
||||
*
|
||||
* @return the {@link Signal} for the given string value
|
||||
|
|
Loading…
Reference in New Issue