aboutsummaryrefslogtreecommitdiff
path: root/includes/types.h
diff options
context:
space:
mode:
authorRobert Gustafsson <robg@student.chalmers.se>2017-09-28 13:41:45 +0200
committerRobert Gustafsson <robg@student.chalmers.se>2017-09-28 13:41:45 +0200
commit03bb5c1c6ddf0f6ea9ef3381769cc41969fc2a5d (patch)
tree7f66abedda352bf4c9e9a8ece7d173ed4c65ac58 /includes/types.h
parent24145fa0d3f33141ac074d022891b07e249f4582 (diff)
downloadmidbro-03bb5c1c6ddf0f6ea9ef3381769cc41969fc2a5d.tar.gz
midbro-03bb5c1c6ddf0f6ea9ef3381769cc41969fc2a5d.tar.bz2
Add basic fifoqueue to buffer events
Diffstat (limited to 'includes/types.h')
-rw-r--r--includes/types.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/includes/types.h b/includes/types.h
new file mode 100644
index 0000000..a8fa1cf
--- /dev/null
+++ b/includes/types.h
@@ -0,0 +1,29 @@
+#ifndef TYPES_H
+#define TYPES_H
+
+#define true 1
+#define false 0
+
+typedef int boolean;
+typedef struct sensor_t Sensor_t;
+typedef struct queue_t Queue_t;
+typedef struct fifo_q Fifo_q;
+
+struct sensor_t{
+ int uid;
+ int value;
+};
+
+struct queue_t{
+ Sensor_t * sensor;
+ Queue_t * next;
+};
+
+struct fifo_q{
+ Queue_t * head;
+ Queue_t * tail;
+ int maxSize;
+ int currentSize;
+};
+
+#endif