diff options
author | David Phillips <david@sighup.nz> | 2017-12-27 21:21:54 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-12-27 21:21:54 +1300 |
commit | f23abfdde683aee4b808f2795af1a1418125156c (patch) | |
tree | f6faf313a32395b41ca4db628ef2eb4d4d950c1f /wire.h | |
download | hence-f23abfdde683aee4b808f2795af1a1418125156c.tar.xz |
Initual dump of partial work on parser and data structure
Diffstat (limited to 'wire.h')
-rw-r--r-- | wire.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -0,0 +1,27 @@ +#ifndef WIRE_H +#define WIRE_H + +#include <stddef.h> + +#include "logic.h" + +enum NODE_TYPE { + NODE_OUTPUT, + NODE_INPUT +}; + +struct node { + enum NODE_TYPE type; + enum BINARY value; +}; + +struct wire { + struct node *a; + struct node *b; +}; + +int wire_add(size_t aoffs, size_t boffs); +int tick(void); +void wire_init(void); + +#endif |