summaryrefslogtreecommitdiff
path: root/includes/fifoqueue.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/fifoqueue.h
parent24145fa0d3f33141ac074d022891b07e249f4582 (diff)
downloadmidbro-03bb5c1c6ddf0f6ea9ef3381769cc41969fc2a5d.tar.gz
midbro-03bb5c1c6ddf0f6ea9ef3381769cc41969fc2a5d.tar.bz2
Add basic fifoqueue to buffer events
Diffstat (limited to 'includes/fifoqueue.h')
-rw-r--r--includes/fifoqueue.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/includes/fifoqueue.h b/includes/fifoqueue.h
new file mode 100644
index 0000000..9ee5c53
--- /dev/null
+++ b/includes/fifoqueue.h
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include "types.h"
+
+Fifo_q * init_queue(int size);
+
+boolean is_full(Fifo_q * q);
+
+boolean is_empty(Fifo_q * q);
+
+int add_to_queue(Fifo_q * q, Sensor_t * sensor);
+
+Sensor_t * pop_from_queue(Fifo_q * q);
+
+void print_queue(Fifo_q * q);