Simple 6-LED bar library. Provides some useful functions.

Simple 6 leds bar library. It allows you to control individual leds, and provides masks.

Revision:
2:70b58ce02820
Parent:
1:248129e96f43
Child:
3:bb53fa90af91
--- a/6LedBar.h	Sun May 21 14:07:51 2017 +0000
+++ b/6LedBar.h	Sun May 21 14:20:27 2017 +0000
@@ -1,13 +1,60 @@
 #ifndef LED_BAR_H
 #define LED_BAR_H
 
+/*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
+
+Simple 6-LEDs bar library for using with MBed 2.0 library
+
+Copyright 2017 Dmitry Makarenko
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
+
 #include "mbed.h"
 
 
+/*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
 
-/*
+Example using on, off, toggle methods:
+
+@code
+
+#include "mbed.h"
+#include "6LedBar.h"
+
+
+LedBar leds (A0, A1, A2, A3, A4, A5);
 
-Example:
+int main() {
+    leds.on(0);
+    leds.on(2);
+    leds.on(4);
+    
+    while(true) {
+        for(int i = 0; i < 6; i++) {
+            leds.toggle(i);
+        }
+        wait(0.5);
+    }
+}
+
+
+@endcode
+
+*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
+
+Example using mask methods:
 
 @code
 
@@ -29,7 +76,7 @@
 
 @endcode
 
-*/
+*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  */
 
 
 class LedBar {