From f23abfdde683aee4b808f2795af1a1418125156c Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 27 Dec 2017 21:21:54 +1300 Subject: Initual dump of partial work on parser and data structure --- wire.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 wire.h (limited to 'wire.h') diff --git a/wire.h b/wire.h new file mode 100644 index 0000000..74ff29b --- /dev/null +++ b/wire.h @@ -0,0 +1,27 @@ +#ifndef WIRE_H +#define WIRE_H + +#include + +#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 -- cgit v1.1