fuck this

Dependencies:   BMP280

Revision:
19:40c721f01ed2
Parent:
12:03589f1d5c30
Child:
21:6e733076f49c
--- a/SDCard.h	Tue Jan 09 10:25:17 2018 +0000
+++ b/SDCard.h	Tue Jan 09 11:39:59 2018 +0000
@@ -1,17 +1,37 @@
 #ifndef __SDCard__
 #define __SDCard__
-
+/*
+*
+*/
+#include "mbed.h"
+#include "Sampling.h"
+#include "SDCard.h"
+#include "SDBlockDevice.h"
+#include "FATFileSystem.h"
+#include "LCD.h"
 
-enum SDCardStates;
-extern bool SDCardPresent;
-extern bool SDCardMounted;
-extern unsigned short SDinternalIndex;
-extern SDCardStates SDCurrentState;
+//Hardware devices
+extern InterruptIn SD_WP;   //Pin that indicates if the card has been inserted (active low)
+extern InterruptIn UserButton;//Demount request
+extern SDBlockDevice sd;      //SD Card device
+extern DigitalOut GreenLED;   //Shows its safe to demount
+extern DigitalOut SDCardStatusLED;//Shows if the card is inserted
+
+enum SDCardStates{INSERTED,REMOVED,DISMOUNTREQUEST};
+
+//Variables
+extern bool SDCardPresent;  //Is the SD card inserted?
+extern bool SDCardMounted;  //Is the SD card initialised?
+extern unsigned short SDinternalIndex;//Used for clocking out the data from the sample index
+extern SDCardStates SDCurrentState; //State machine state
 
 extern Thread SDCardThread;
 
+//Functions
 void SDCardInit(void);
+//Starts the thread and sets up the interrupts
 void SDCardRemovedISR(void);
+//
 void SDCardInsertedISR(void);
 void SDCardButtonISR(void);
 void SDCardCode(void);