Fork of Dimiter program. "Wait" commands adjusted and added Arial 10 font.

Fork of KS0108 by Dimiter K

Files at this revision

API Documentation at this revision

Comitter:
DimiterK
Date:
Thu Feb 10 03:06:19 2011 +0000
Parent:
3:366a6b7d6259
Child:
5:e4b50f4c13a8
Commit message:
Added two helper functions. Ver1.11

Changed in this revision

KS0108.cpp Show annotated file Show diff for this revision Revisions of this file
KS0108.h Show annotated file Show diff for this revision Revisions of this file
--- a/KS0108.cpp	Fri Feb 04 02:32:25 2011 +0000
+++ b/KS0108.cpp	Thu Feb 10 03:06:19 2011 +0000
@@ -20,6 +20,9 @@
 THE SOFTWARE.
 *******************************************************************************/
 
+/*
+ *@Includes
+ */
 #include "KS0108.h"     
 
 
@@ -153,6 +156,15 @@
 }     
 
 
+void KS0108::TurnOn(){
+    WriteInstruction(LCD_ON,BOTH);
+}
+
+
+void KS0108::TurnOff(){
+    WriteInstruction(LCD_OFF,BOTH);
+}
+
 /*******************************************************************************************/      
 
  
--- a/KS0108.h	Fri Feb 04 02:32:25 2011 +0000
+++ b/KS0108.h	Thu Feb 10 03:06:19 2011 +0000
@@ -23,7 +23,7 @@
 #ifndef KS0108_H
 #define KS0108_H
 
-#define VERSION 1.1
+#define VERSION 1.11
 
 #include "mbed.h"
 #include "SystemFont5x7.h"
@@ -74,7 +74,7 @@
 #define FONT_WIDTH_TABLE    6
 
 /*************************************************************************************/
-#define MAX_IMG_SIZE 127*64
+#define MAX_IMG_SIZE 128*64
 
 typedef struct {      
      unsigned int imgWidth;
@@ -84,16 +84,6 @@
 
 /**************************************************************************************/
 
-typedef struct {
-    unsigned int x;
-    unsigned int y;
-    unsigned int page;
-} LCDCoord;
-
-
-/****************************************************************************************/
-
-
 class KS0108  {
 public:
 
@@ -167,6 +157,26 @@
      *
      */
     void ClearScreen();
+    
+        
+    /**
+     *@brief Turn on display
+     *
+     *@param none
+     *@return none
+     *
+     */
+    void TurnOn();
+    
+    
+    /**
+     *@brief Turn Off display
+     *
+     *@param none
+     *@return none
+     *
+     */
+    void TurnOff();
 
     /*******************************Graphic functions************************************************/
 
@@ -345,12 +355,12 @@
 
     /**
      *@brief Draws an image on screen.
-     *@param PictureData  128x64 image array
+     *@param IamgeData  128x64 image array
      *@return none
      *
      *
      */
-    void FullScreenBMP (unsigned char *PictureData);
+    void FullScreenBMP (unsigned char *ImageData);
 
 
     /**
@@ -434,8 +444,7 @@
     DigitalInOut CS1;
 
     unsigned int color;
-    unsigned int*            Font;
-    LCDCoord                Coord;
+    unsigned int*            Font;  
 };