summaryrefslogtreecommitdiff
path: root/wire.h
diff options
context:
space:
mode:
Diffstat (limited to 'wire.h')
-rw-r--r--wire.h27
1 files changed, 27 insertions, 0 deletions
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 <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