Fork of LCD-Window which works with Enhanced TextLCD from Wim

Fork of LcdWindow by Hendrik Lipka

Revision:
9:2fe93daa2106
Parent:
3:e5d5e2fe4bf6
--- a/ks0108_8bit.cpp	Mon Jan 10 22:57:59 2011 +0000
+++ b/ks0108_8bit.cpp	Tue Feb 22 22:57:44 2011 +0000
@@ -39,7 +39,8 @@
 }
 
 void KS0108LCD8bit::clear() {
-    _guard->take();
+    if (!_guard->take())
+        return;
     clearHalf(_left);
     if (NULL!=_right)
         clearHalf(_right);
@@ -76,7 +77,8 @@
     if (NULL==cs)
         return;
     
-    _guard->take();
+    if (!_guard->take())
+        return;
     sendCmd(0xb8|row,cs); // set x page    
 
     unsigned int y=icolumn*8;