diff options
Diffstat (limited to 'gate.h')
-rw-r--r-- | gate.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#ifndef GATE_H +#define GATE_H + +#include <stddef.h> + +#include "logic.h" + +struct gate { + enum BINARY (*operation)(enum BINARY, enum BINARY); + enum BINARY output; + struct gate *in1; + struct gate *in2; +}; + +void gate_update_output(struct gate *); +int gate_add(struct gate *in1, struct gate *in2); +int tick(void); +void gate_init(void); + +#endif |