mirror of
https://github.com/mist64/perfect6502.git
synced 2025-08-09 15:24:59 +00:00
cleanup
This commit is contained in:
@@ -63,13 +63,13 @@ typedef int BOOL;
|
|||||||
************************************************************/
|
************************************************************/
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
STATE_VCC,
|
STATE_VCC, /* node is VCC */
|
||||||
STATE_PU,
|
STATE_PU, /* node is connected to VCC */
|
||||||
STATE_FH,
|
STATE_FH, /* node was connected to VCC */
|
||||||
#define isNodeHigh(nn) (nodes_state[nn] <= STATE_FH) /* everything above is high */
|
#define isNodeHigh(nn) (nodes_state[nn] <= STATE_FH) /* everything above is high */
|
||||||
STATE_GND,
|
STATE_GND, /* node is GND */
|
||||||
STATE_FL,
|
STATE_PD, /* node is connexted to GND */
|
||||||
STATE_PD,
|
STATE_FL, /* node was connected to GND */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* the smallest types to fit the numbers */
|
/* the smallest types to fit the numbers */
|
||||||
@@ -313,12 +313,14 @@ addNodeToGroup(nodenum_t i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 1. if there is a pullup node, it's STATE_PU
|
* 1. if the group is connected to GND, it's STATE_GND
|
||||||
* 2. if there is a pulldown node, it's STATE_PD
|
* 2. if the group is connected to VCC, it's STATE_VCC
|
||||||
|
* 3a. if there is a pullup node, it's STATE_PU
|
||||||
|
* 3b. if there is a pulldown node, it's STATE_PD
|
||||||
* (if both 1 and 2 are true, the first pullup or pulldown wins, with
|
* (if both 1 and 2 are true, the first pullup or pulldown wins, with
|
||||||
* a statistical advantage towards STATE_PU)
|
* a statistical advantage towards STATE_PU)
|
||||||
* 3. otherwise, if there is an FH node, it's STATE_FH
|
* 4. otherwise, if there is an FH node, it's STATE_FH
|
||||||
* 4. otherwise, it's STATE_FL (if there is an FL node, which is always the case)
|
* 5. otherwise, it's STATE_FL (if there is an FL node, which is always the case)
|
||||||
*/
|
*/
|
||||||
state_t
|
state_t
|
||||||
getNodeValue()
|
getNodeValue()
|
||||||
|
Reference in New Issue
Block a user