projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Redefined PinUsages; cleaned component JSONs
[Mograsim.git]
/
plugins
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
model
/
wires
/
PinUsage.java
diff --git
a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/PinUsage.java
b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/PinUsage.java
index
f229d02
..
f31d860
100644
(file)
--- a/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/PinUsage.java
+++ b/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/PinUsage.java
@@
-3,16
+3,29
@@
package net.mograsim.logic.model.model.wires;
public enum PinUsage
{
/**
public enum PinUsage
{
/**
- * The component never a
ffects the value of
the wire connected to the pin.
+ * The component never a
pplies a value (other than Z) to
the wire connected to the pin.
*/
INPUT,
/**
*/
INPUT,
/**
- * The component
is never affected by the value of the wire connected to this pin. This includes the look of the
component.
+ * The component
expects that the wire is never pulled to a value (other than Z) by another
component.
*/
OUTPUT,
/**
*/
OUTPUT,
/**
- * The component (sometimes) affects the value of the wire connected to the pin, but is also (sometimes) affected by the value of this
- * wire.
+ * The component is free to use the pin in any way.
*/
TRISTATE;
*/
TRISTATE;
+
+ private PinUsage opposite;
+
+ static
+ {
+ INPUT.opposite = OUTPUT;
+ OUTPUT.opposite = INPUT;
+ TRISTATE.opposite = TRISTATE;
+ }
+
+ public PinUsage getOpposite()
+ {
+ return opposite;
+ }
}
\ No newline at end of file
}
\ No newline at end of file