FINAL PROJECT isn't it

Fork of ELEC351 by Plymouth ELEC351 Group T

Revision:
52:99915f5240b2
Parent:
51:47f5db68500b
--- a/LED.hpp	Tue Jan 09 15:15:08 2018 +0000
+++ b/LED.hpp	Tue Jan 09 22:27:49 2018 +0000
@@ -1,5 +1,5 @@
 /*
-This is our LED Class it enables us to write to LED
+This is our LED Class it enables us to write to  an LED
 quickly and easily and it encapsulates a few functions
 to prompt ease of use.
 */
@@ -7,21 +7,22 @@
 #ifndef LED_HPP//Header Guards Prevents Multiple includes
 #define LED_HPP
 
-class LED //This creates a class called Led
+//Libraries and header includes
+#include "THREADS.hpp"
+#include "mbed.h"
+#include "rtos.h"
+class LED                       //This creates a class called Led
 {
-    
 //Below are methods of the class these are the opperations the class will support
-public: //The public: word enables the methods to be accessed outside of the class itself
+public:
 
     LED(PinName pinName);
-    void switchOn(); //Void is the return type as no values will be output the return type is void
-    void switchOff();   //SwitchOff is the name of the method/function
-    void flash(float time); //float time is the parameter of the function in this case it creates a floating poi t variable known as time and this is then passed o the function when called.
-    void Toggle();
+    void switchOn();            //Void is the return type as no values will be output the return type is void
+    void switchOff();           //SwitchOff is the name of the method/function
+    void flash(float time);     //float time is the parameter of the function in this case it creates a floating poi t variable known as time and this is then passed o the function when called.
+    void Toggle();              //This Toggles the LED object with a thread wait
     
-private:    //This is used here to make digitalout pin only useable from inside class Led    
-    DigitalOut pin; //DigitalOut is the Class and the object is called pin the object pin is now an attribute of led this is also known as a member variable or field    
+private:                        //This is used here to make digitalout pin only useable from inside class Led    
+    DigitalOut pin;             //DigitalOut is the Class and the object is called pin the object pin is now an attribute of led this is also known as a member variable or field    
 };
-
-
 #endif
\ No newline at end of file