Plymouth ELEC351 Group T / Mbed OS ELEC351_Group_T

Fork of ELEC351 by Plymouth ELEC351 Group T

Revision:
52:99915f5240b2
Parent:
49:d51f96a46cc3
Child:
53:71f59e195f06
--- a/sample_hardware.hpp	Tue Jan 09 15:15:08 2018 +0000
+++ b/sample_hardware.hpp	Tue Jan 09 22:27:49 2018 +0000
@@ -1,7 +1,11 @@
-#ifndef __sample_hardware__
-#define __sample_hardware__
+/*
+This is where we define and declare our Hardware
+*/
+#ifndef sample_hardware//Header Guards Prevents Multiple includes
+#define sample_hardware
 //#define BME
 #ifdef BME
+//Libraries and header includes
 #include "BME280.h"
 #else
 #include "BMP280.h"
@@ -13,25 +17,29 @@
 #include "NETWORK.hpp"
 #include "SERIAL_COMMANDS.hpp"
 #include "SD_CARD.hpp"
+#include "mbed.h"
 
-enum ELEC350_ERROR_CODE {OK, NETWORK_FATAL,SD_CARD_REMOVED,FATAL};//Error Codes
+#define RED_DONE 1
+#define YELLOW_DONE 2
 
-extern DigitalOut onBoardLED;
 
-extern DigitalIn  onBoardSwitch;
-extern InterruptIn  SW1;
-extern InterruptIn  SW2;
-//extern Serial pc;
-extern AnalogIn adcIn;
+enum ELEC350_ERROR_CODE {OK, NETWORK_FATAL,SD_CARD_REMOVED,SD_FATAL,FATAL};  //Error Codes
+
+extern DigitalOut onBoardLED;                                       //Set the onBoard Led to a digital Out
+
+extern DigitalIn  onBoardSwitch;                                    //Set the OnBoard switch to a digtal In
+extern InterruptIn  SW1;                                            //Set SW1 to an interrupt in
+extern InterruptIn  SW2;                                            //Set SW2 to an interrupt in
+extern AnalogIn adcIn;                                              //Set adc to an Analogue in
 
 #ifdef BME
-extern BME280 sensor;
+extern BME280 sensor;                                               //Define Sensor Board
 #else
-extern BMP280 sensor;
+extern BMP280 sensor;                                               //Define Sensor Board
 #endif
-extern SDBlockDevice sd;
+extern SDBlockDevice sd;                                            //Define SD Card
 
-extern void post();
-extern void errorCode(ELEC350_ERROR_CODE err);
+extern void post();                                                 //Used to perform a power on self test
+extern void errorCode(ELEC350_ERROR_CODE err);                      //Used to handle error code
 
 #endif
\ No newline at end of file