An example of GT20L16J1Y (15x16 Japanese Kanji ROM) and C12823 LCD

Dependencies:   C12832_lcd mbed

Fork of app-board-LCD by Chris Styles

Committer:
dreschpe
Date:
Mon Oct 15 21:48:28 2012 +0000
Revision:
0:f6a57b843f79
first test of the lcd driver

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dreschpe 0:f6a57b843f79 1 /* mbed GraphicsDisplay Display Library Base Class
dreschpe 0:f6a57b843f79 2 * Copyright (c) 2007-2009 sford
dreschpe 0:f6a57b843f79 3 * Released under the MIT License: http://mbed.org/license/mit
dreschpe 0:f6a57b843f79 4 *
dreschpe 0:f6a57b843f79 5 * A library for providing a common base class for Graphics displays
dreschpe 0:f6a57b843f79 6 * To port a new display, derive from this class and implement
dreschpe 0:f6a57b843f79 7 * the constructor (setup the display), pixel (put a pixel
dreschpe 0:f6a57b843f79 8 * at a location), width and height functions. Everything else
dreschpe 0:f6a57b843f79 9 * (locate, printf, putc, cls, window, putp, fill, blit, blitbit)
dreschpe 0:f6a57b843f79 10 * will come for free. You can also provide a specialised implementation
dreschpe 0:f6a57b843f79 11 * of window and putp to speed up the results
dreschpe 0:f6a57b843f79 12 */
dreschpe 0:f6a57b843f79 13
dreschpe 0:f6a57b843f79 14 #ifndef MBED_GRAPHICSDISPLAY_H
dreschpe 0:f6a57b843f79 15 #define MBED_GRAPHICSDISPLAY_H
dreschpe 0:f6a57b843f79 16
dreschpe 0:f6a57b843f79 17 #include "TextDisplay.h"
dreschpe 0:f6a57b843f79 18
dreschpe 0:f6a57b843f79 19 class GraphicsDisplay : public TextDisplay {
dreschpe 0:f6a57b843f79 20
dreschpe 0:f6a57b843f79 21 public:
dreschpe 0:f6a57b843f79 22
dreschpe 0:f6a57b843f79 23 GraphicsDisplay(const char* name);
dreschpe 0:f6a57b843f79 24
dreschpe 0:f6a57b843f79 25 virtual void pixel(int x, int y, int colour) = 0;
dreschpe 0:f6a57b843f79 26 virtual int width() = 0;
dreschpe 0:f6a57b843f79 27 virtual int height() = 0;
dreschpe 0:f6a57b843f79 28
dreschpe 0:f6a57b843f79 29 virtual void window(int x, int y, int w, int h);
dreschpe 0:f6a57b843f79 30 virtual void putp(int colour);
dreschpe 0:f6a57b843f79 31
dreschpe 0:f6a57b843f79 32 virtual void cls();
dreschpe 0:f6a57b843f79 33 virtual void fill(int x, int y, int w, int h, int colour);
dreschpe 0:f6a57b843f79 34 virtual void blit(int x, int y, int w, int h, const int *colour);
dreschpe 0:f6a57b843f79 35 virtual void blitbit(int x, int y, int w, int h, const char* colour);
dreschpe 0:f6a57b843f79 36
dreschpe 0:f6a57b843f79 37 virtual void character(int column, int row, int value);
dreschpe 0:f6a57b843f79 38 virtual int columns();
dreschpe 0:f6a57b843f79 39 virtual int rows();
dreschpe 0:f6a57b843f79 40
dreschpe 0:f6a57b843f79 41 protected:
dreschpe 0:f6a57b843f79 42
dreschpe 0:f6a57b843f79 43 // pixel location
dreschpe 0:f6a57b843f79 44 short _x;
dreschpe 0:f6a57b843f79 45 short _y;
dreschpe 0:f6a57b843f79 46
dreschpe 0:f6a57b843f79 47 // window location
dreschpe 0:f6a57b843f79 48 short _x1;
dreschpe 0:f6a57b843f79 49 short _x2;
dreschpe 0:f6a57b843f79 50 short _y1;
dreschpe 0:f6a57b843f79 51 short _y2;
dreschpe 0:f6a57b843f79 52
dreschpe 0:f6a57b843f79 53 };
dreschpe 0:f6a57b843f79 54
dreschpe 0:f6a57b843f79 55 #endif