Display text on LCD displays (even on multiple ones). Allow to create windows (frames) on display, and to combine them (split, add, duplicate, scroll). See http://mbed.org/users/hlipka/notebook/lcdwindow/ for more information.

Dependents:   Mbell

Revision:
3:e5d5e2fe4bf6
Parent:
2:5ac5bab7daaf
Child:
9:2fe93daa2106
--- a/dogm_spi.cpp	Sat Nov 27 22:54:13 2010 +0000
+++ b/dogm_spi.cpp	Sun Nov 28 22:09:54 2010 +0000
@@ -50,15 +50,18 @@
 void DogmLCDSPI::character(int column, int row, int c)
 {
     int address=(row)*0x40+(column);
+    _guard->take();
     sendCmd((char)address|0x80);
     wait_ms(1);
     sendData(c);
+    _guard->release();
     wait_ms(1);
 }
 
 void DogmLCDSPI::writeText(const unsigned int column, const unsigned int row, const char text[])
 {
     int address=(row)*0x40+(column);
+    _guard->take();
     sendCmd((char)address|0x80);
     wait_ms(1);
     
@@ -69,10 +72,13 @@
         wait_ms(1);
         i++;
     }
+    _guard->release();
 }
 
 void DogmLCDSPI::clear()
 {
+    _guard->take();
     sendCmd(1);
+    _guard->release();
 }