Library A: LED library to controll the led on the Happy Gecko.

Dependencies:   mbed mbed

Revision:
1:55b5e6d28fb3
Parent:
0:3cabc617d433
--- a/LED.h	Sat Nov 18 17:03:48 2017 +0000
+++ b/LED.h	Mon Feb 12 21:40:22 2018 +0000
@@ -6,8 +6,36 @@
 
 /** LED class.
  *  To use the library, its header file needs to be included and an object of the LED class created.
+ 
+ * Example: Turns the LED0 on. 
+ * @code
+ * #include "mbed.h"
+ * #include "LED.h"
+ *
+ *  LED gpio(LED0);
+ * 
+ * int main() {
+ *     gpio.ledOn();
+ * }
 
  *  @endcode
+ 
+* Example2: Toggles the LED on and off. 
+ * @code
+ * #include "mbed.h"
+ * #include "LED.h"
+ *
+ *  LED gpio(LED0);
+ * 
+ * int main() {
+ *  gpio.toggle();
+ *  wait(0.2);
+ *  gpio.toggle();
+ *  wait(0.2);
+ * }
+
+ *  @endcode
+ 
  */
 
 
@@ -25,8 +53,12 @@
      /** This function inverts the value of the led.
          */ 
     void toggle();
-     /** This function makes the led blink on a specific duration.
-         */ 
+    
+    /** This function makes the led blink on a specific duration.
+     *
+     * @param duration specifies how long the functions is going to wait during the blink.
+     */
+     
     void blink(float duration);
   
 private: