Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.

Dependents:   FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more

Fork of SPI_TFT by Peter Drescher

See Components - RA8875 Based Display

Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.

Offline Help Manual (Windows chm)

/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)

Committer:
dreschpe
Date:
Mon Sep 10 19:23:26 2012 +0000
Revision:
0:de9d1462a835
Child:
11:9bb71766cafc
[mbed] converted /TFT/SPI_TFT

Who changed what in which revision?

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