for TFT2P0327 aitendo.com 128*160 TFT LCD. LCD driver is S6D0151 Sumsung.

Dependents:   FRDM_tocos_x2_FIXED

Committer:
king33jp
Date:
Sun Aug 23 12:28:24 2015 +0000
Revision:
0:de7db46990d0
new

Who changed what in which revision?

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