mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-18 09:24:42 -04:00
simplified AbstractBusHandler.java
This commit is contained in:
parent
0f767fee52
commit
edb26aa362
@ -83,16 +83,14 @@ public abstract class AbstractBusHandler {
|
|||||||
highz &= input.getHighZ();
|
highz &= input.getHighZ();
|
||||||
value |= input.getValue();
|
value |= input.getValue();
|
||||||
}
|
}
|
||||||
value &= ~highz;
|
|
||||||
|
|
||||||
// check for a burn!
|
// check for a burn condition!
|
||||||
for (ObservableValue input : getInputs()) {
|
for (ObservableValue input : getInputs()) {
|
||||||
long bothDefine = ~(highz | input.getHighZ());
|
long bothDefine = ~(highz | input.getHighZ());
|
||||||
if ((value & bothDefine) != (input.getValue() & bothDefine))
|
if ((value & bothDefine) != (input.getValue() & bothDefine))
|
||||||
burn = State.burn;
|
burn = State.burn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (highz != 0) {
|
|
||||||
switch (getResistor()) {
|
switch (getResistor()) {
|
||||||
case pullUp:
|
case pullUp:
|
||||||
set(value | highz, 0);
|
set(value | highz, 0);
|
||||||
@ -103,8 +101,6 @@ public abstract class AbstractBusHandler {
|
|||||||
default:
|
default:
|
||||||
set(value, highz);
|
set(value, highz);
|
||||||
}
|
}
|
||||||
} else
|
|
||||||
set(value, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if burn condition and not yet added for post step check add for post step check
|
// if burn condition and not yet added for post step check add for post step check
|
||||||
|
Loading…
x
Reference in New Issue
Block a user