KS0108 LCD LIB with I2C I/O expander PCF8574 for Databus

Dependencies:   BusEnums

Dependents:   Menu

Files at this revision

API Documentation at this revision

Comitter:
GuiTwo
Date:
Mon Sep 10 16:33:35 2012 +0000
Parent:
3:5a3db2efe771
Commit message:
Classe fille de MendedDisplay ( Classe abstraite)

Changed in this revision

BusEnums_copy.h Show diff for this revision Revisions of this file
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/BusEnums_copy.h	Wed Sep 05 07:21:47 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-/* BusEnums - Use the MBED Port pins and PCF8574s for controlling the Bus
- * Copyright (c) 2011 Wim Huiskamp
- *
- * Released under the MIT License: http://mbed.org/license/mit
- *
- * version 0.2 Initial Release
-*/
-#ifndef _BUS_ENUMS_H
-#define _BUS_ENUMS_H
-
-//Enums for Control Bus and Enable Bus
-enum Bit_Level { LOW, HIGH };
-enum Bus_Dir   { READ, WRITE };
-enum Bus_Ena   { ENABLE, DISABLE };
-
-
-#endif
\ No newline at end of file
--- a/KS0108.cpp	Wed Sep 05 07:21:47 2012 +0000
+++ b/KS0108.cpp	Mon Sep 10 16:33:35 2012 +0000
@@ -16,8 +16,6 @@
     CS1(_CS1),
     DB(_DB)
 {
-
-
     RST.mode(OpenDrain);
     DI.mode(OpenDrain);
     RW.mode(OpenDrain);
@@ -905,19 +903,31 @@
     int x = Coord.x;
 
     Font = System5x7;
-    
+
     FontColor = BLACK;
-    
-   // LCD.SelectFont(System5x7,BLACK,ReadData);
-    
-    
-    
-    
+
+    // LCD.SelectFont(System5x7,BLACK,ReadData);
     GotoXY(x+10, Coord.y+7);
     PrintString(const_cast<char *> (line) );
     return 1;
 }
+void KS0108::showUpArrow (bool show)
+{
+
+}
+void KS0108::showDownArrow (bool show)
+{
+
+}
+uint8_t KS0108::getLines (void)
+{
+return 0;
+}
+
+uint8_t KS0108::getLineLength (void) 
+{
+return 0;
+}
 
 
 
-
--- a/KS0108.h	Wed Sep 05 07:21:47 2012 +0000
+++ b/KS0108.h	Mon Sep 10 16:33:35 2012 +0000
@@ -3,7 +3,7 @@
 
 #define VERSION 2.0
 
-#include <mbed.h>
+#include "mbed.h"
 #include "SystemFont5x7.h"
 #include "PCF8574_DataBus.h"
 #include "menbedDisplay.h"
@@ -84,7 +84,7 @@
 
 
 
-class KS0108  {
+class KS0108  : public MenbedDisplay {
 public:
 
    /**
@@ -94,8 +94,6 @@
     *@return none
     */
 
-   // KS0108 (PinName _RST,PinName _DI, PinName _RW, PinName _E, PinName _CS1, PinName _CS2, PinName DB0, PinName DB1, PinName DB2, PinName DB3, PinName DB4, PinName DB5, PinName DB6, PinName DB7);
-//KS0108 (PinName _DI, PinName _RW, PinName _E, PinName _CS2, PinName _CS1,PCF8574 _DB);//
 KS0108 (PinName _RST,PinName _DI, PinName _RW, PinName _E, PinName _CS2, PinName _CS1,PCF8574_DataBus &_DB);
    /**
     *@brief Write instruction to the specific controller.
@@ -525,8 +523,11 @@
      *@param  
      *@return 1
      */
-    bool writeLine (const char *line, uint8_t row);
-                                   
+    virtual bool writeLine (const char *line, uint8_t row);
+    virtual void showUpArrow (bool show);
+    virtual void showDownArrow (bool show);
+    virtual uint8_t getLines (void);
+    virtual uint8_t getLineLength (void);                          
     
 private:
     //BusInOut DB;