diff options
author | Andreas Lindhé <andreas@lindhe.io> | 2017-10-31 08:33:46 +0100 |
---|---|---|
committer | Andreas Lindhé <andreas@lindhe.io> | 2017-10-31 08:41:40 +0100 |
commit | bc5ecd6da7f068a12b9ee5397178723481c7a3ea (patch) | |
tree | 6ac5bb33df7c3aacde8eb254c4aee1ce1df9dd29 /broccoli/includes | |
parent | 2d5d5be5702867a7a719312a5a148489c3b68f31 (diff) | |
download | midbro-bc5ecd6da7f068a12b9ee5397178723481c7a3ea.tar.gz midbro-bc5ecd6da7f068a12b9ee5397178723481c7a3ea.tar.bz2 |
Move all files one level down
Diffstat (limited to 'broccoli/includes')
-rw-r--r-- | broccoli/includes/broevent.h | 4 | ||||
-rw-r--r-- | broccoli/includes/fifoqueue.h | 18 | ||||
-rw-r--r-- | broccoli/includes/midbro.h | 6 | ||||
-rw-r--r-- | broccoli/includes/types.h | 37 |
4 files changed, 0 insertions, 65 deletions
diff --git a/broccoli/includes/broevent.h b/broccoli/includes/broevent.h deleted file mode 100644 index 5e34f5c..0000000 --- a/broccoli/includes/broevent.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef BROEVENT_H -#define BROEVENT_H -void * bro_event_listener(void * args); -#endif diff --git a/broccoli/includes/fifoqueue.h b/broccoli/includes/fifoqueue.h deleted file mode 100644 index 75b09c4..0000000 --- a/broccoli/includes/fifoqueue.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FIFOQUEUE_H -#define FIFOQUEUE_H -#include "types.h" - -Fifo_q * init_queue(int size); - -Sensor_t * create_sensor_object(int value, int uid); - -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); -#endif diff --git a/broccoli/includes/midbro.h b/broccoli/includes/midbro.h deleted file mode 100644 index e7143a3..0000000 --- a/broccoli/includes/midbro.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef MIDBRO_H -#define MIDBRO_H -void start_data_capture(); -int request_value(); -void request_n_values(int n, int dest[]); -#endif diff --git a/broccoli/includes/types.h b/broccoli/includes/types.h deleted file mode 100644 index 149415e..0000000 --- a/broccoli/includes/types.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef TYPES_H -#define TYPES_H -#include <semaphore.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; - int droppedValues; - int largestBufferSize; - int valuesReceived; - int valuesReleased; - sem_t bufferEmptyBlock; - sem_t bufferFullBlock; - sem_t lock; -}; - -#endif |