128x64 grafical display with KS0107B and KS0108B controller

Revision:
0:45771b38d50d
Child:
1:1d06bc155ef3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Display.h	Tue Nov 17 22:42:50 2009 +0000
@@ -0,0 +1,47 @@
+#ifndef DISPLAY_H
+#define DISPLAY_H
+
+#define RS_f = 1
+#define RW_f = 2
+#define CS1_f = 4
+#define CS2_f = 8
+
+#include "mbed.h"
+#include "font.h"
+
+class Display {
+    public:
+        // Constructor:
+        Display (PinName _RS, PinName _RW, PinName _E, PinName _CS1, PinName _CS2, PinName DB0, PinName DB1, PinName DB2, PinName DB3, PinName DB4, PinName DB5, PinName DB6, PinName DB7);
+        // Send write command to Display
+        // Page 0-7, y 0-127
+        void write (int page, int y, unsigned int data);
+        // 
+        int SendCommand(unsigned int, int);
+        // Row 0-7, col 0-122
+        void writec(int row, int Y, char c);
+    private:
+        BusInOut DB;
+        DigitalOut RS;
+        DigitalOut RW;
+        DigitalOut E;
+        DigitalOut CS1;
+        DigitalOut CS2;
+        int CurCol;
+};
+
+class DisplayTTY {
+    public:
+        DisplayTTY (Display *d, int row, int startY, int numOfChars, int numOfRows, int charOffset, int flags);
+        int putc (int c);
+    private:
+        Display *display;
+        int row;
+        int startY;
+        int numOfChars;
+        int numOfRows;
+        int charOffset;
+        int flags;
+};
+
+#endif
\ No newline at end of file