LPC1768 Mini-DK board with 2.8" SPI TFT and SPI touch

Dependencies:   Mini-DK mbed SDFileSystem

WARNING: filetoflash (SD to CPU flash)

The SPI_TFT library called from Mini-DK.lib contains an option to copy an image from the SD card to the CPU flash memory. This allows you to use an image as background without speed loss when writing other text and graphics.

By default, this option is enabled.

It can be disabled by uncommenting the #define mentioned below in Mini_DK.h:

#define NO_FLASH_BUFFER

Since the flash memory has limited write endurance, DO NOT use this feature when you intend to read multiple images from the SD card (eg: when used as a photo frame).

Committer:
frankvnk
Date:
Tue Dec 11 08:58:06 2012 +0000
Revision:
0:ee7076d8260a
First version - LCD and touch working - no Ethernet

Who changed what in which revision?

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