7 segment display library for mbed This routine support 2,4 and 8 digit anode-common or cathode-common LED.

Dependents:   7segMbed

Revision:
8:eed5cc9aaeb3
Parent:
4:858e42224b50
diff -r d99849505bf7 -r eed5cc9aaeb3 Sseg.cpp
--- a/Sseg.cpp	Thu Aug 07 03:13:38 2014 +0000
+++ b/Sseg.cpp	Mon Jan 12 08:10:07 2015 +0000
@@ -284,6 +284,7 @@
 }
 
 void Sseg::updateWithDelay(int ms) {
+    timer.reset();  // to avoid overflow 32bit counter  (~=30min)
     int start = timer.read_ms();
     do {
         bool sync = update();