This Library for DOGS-102 Graphic LCD module. Based on Igor Skochinsky's "DOGLCDDemo" program.

Dependents:   DOGS102_Example1 DOGS102_Example2

Fork of DOGLCDDemo by Igor Skochinsky

Revision:
1:2145a74df666
Parent:
0:2a5dccfd318f
--- a/LCD/DogLCD.h	Thu Jan 14 00:49:39 2010 +0000
+++ b/LCD/DogLCD.h	Sat May 03 16:04:16 2014 +0000
@@ -8,10 +8,13 @@
  * Should be compatible with other modules using ST7565 controller
  ***********/
  
-#define LCDWIDTH 128
+#define LCDWIDTH 102
 #define LCDHEIGHT 64
 #define LCDPAGES  (LCDHEIGHT+7)/8
 
+//#define ENABLE_DOGLCD_POWERCTL
+//#define READJUST_SPI_FREQUENCY
+
 /*
 
  Each page is 8 lines, one byte per column
@@ -39,17 +42,28 @@
 class DogLCD: public AbstractLCD
 {
     SPI& _spi;
+#ifdef ENABLE_DOGLCD_POWERCTL
     DigitalOut _cs, _a0, _reset, _power;
+#else
+    DigitalOut _cs, _a0, _reset;
+#endif
     int _updating;
     void _send_commands(const unsigned char* buf, size_t size);
     void _send_data(const unsigned char* buf, size_t size);
     void _set_xy(int x, int y);
     unsigned char _framebuffer[LCDWIDTH*LCDPAGES];
 public:
-    DogLCD(SPI& spi, PinName power, PinName cs, PinName a0, PinName reset):
+#ifdef ENABLE_DOGLCD_POWERCTL
+    DogLCD(SPI& spi, PinName cs, PinName a0, PinName reset, PinName power):
     _spi(spi), _cs(cs), _a0(a0), _reset(reset), _power(power), _updating(0)
     {
     }
+#else
+    DogLCD(SPI& spi, PinName cs, PinName a0, PinName reset):
+    _spi(spi), _cs(cs), _a0(a0), _reset(reset), _updating(0)
+    {
+    }
+#endif
     // initialize and turn on the display
     void init();
     // send a 128x64 picture for the whole screen