Plymouth ELEC351 Group T / Mbed OS ELEC351

Dependencies:   BME280 BMP280 TextLCD

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FIFO.hpp Source File

FIFO.hpp

00001 #ifndef __FIFO_HPP_
00002 #define __FIFO_HPP_
00003 #include "DATA.hpp"
00004 #include "mbed.h"
00005 #include "rtos.h"
00006 //Definition of Data buffer size (120 in specification)
00007 #define mailsize 120
00008 
00009 //Variables
00010 
00011 extern DATA Data_Active;//Current data sample
00012 extern DATA Data_Buffer[mailsize];//Data buffer
00013 extern int Data_Buffer_Write_Pointer;
00014 extern int Write_To_Data_Buffer(DATA Data_Store, int Write_Pointer);
00015 extern int Write_Pointer;
00016 extern Mutex Data_Buffer_Lock;
00017 
00018 //Functions
00019 int Write_Data(DATA Data_Store, int Write_Pointer);
00020 DATA Read_Data(int Read_Pointer);
00021 void Delete_Data(int Delete_Pointer);
00022 #endif