Modifier and Type | Field and Description |
---|---|
String |
name
The port's (short) name.
|
int |
pud
A flag to record the port's pull resistor setting.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Equal with other port.
|
int |
getGpio()
The pin and GPIO number.
|
int |
getPin()
The pin number.
|
int |
hashCode()
Hashcode.
|
boolean |
isIO()
Usable for IO.
|
void |
setGpio(int gpio)
Set GPIO for IO operations.
|
void |
setPin(int pin)
Set pin for IO operations.
|
void |
setPort(String port)
Change IO settings.
|
String |
toString()
Short description of the port.
|
public final String name
public int pud
public int getPin()
setPin(int)
,
getGpio()
,
setGpio(int)
,
setPort(String)
public int getGpio()
getPin()
,
setPin(int)
,
setGpio(int)
,
setPort(String)
public final boolean isIO()
true
when this port's GPIO can be used for
both real input and output operations.gpio
< 32public void setGpio(int gpio)
public void setPin(int pin)
public void setPort(String port)
pud
will be kept
untouched.port
- pin (12N, e.g.) or gpio (with leading G; G18, e.g.)public final String toString()
name
, the port number, a letter
for the pull resistor setting and the gpio number with a prefix "G".public final boolean equals(Object other)
hashCode()
.public final int hashCode()
hashCode
in class Object
gpio
equals(Object)