summaryrefslogtreecommitdiff
path: root/wire.h
blob: 74ff29b7bb377074b0f2d87f6df25df5c513acb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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