X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fwires%2FPinUsage.java;h=f31d860e130fc86d4c270f56895b064707eade20;hb=83a0505e2c104f18ffc6c67c25f523c72cac88a5;hp=f229d023b2fe5ffa7bfa94d70089185de9d9e00b;hpb=09baae6dcfd3e0288e203e1a317c936890ac9726;p=Mograsim.git 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 f229d023..f31d860e 100644 --- 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 { /** - * The component never affects the value of the wire connected to the pin. + * The component never applies a value (other than Z) to the wire connected to the pin. */ 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, /** - * 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; + + private PinUsage opposite; + + static + { + INPUT.opposite = OUTPUT; + OUTPUT.opposite = INPUT; + TRISTATE.opposite = TRISTATE; + } + + public PinUsage getOpposite() + { + return opposite; + } } \ No newline at end of file