Added Discovery F429ZI 8 bit SPI support. Added helper methods to character based locate.

Fork of SPI_TFT_ILI9341 by Peter Drescher

Added Discovery F429ZI 8 bit SPI support to the original lib.

Committer:
vargham
Date:
Sun Feb 12 10:34:05 2017 +0000
Revision:
15:b7848705d2ab
Parent:
14:a1133923c034
Added text align modes (left, center, right) when used with monospaced font.

Who changed what in which revision?

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