Fork of Silabs MemoryLCD library

Dependents:   demoUI whrmDemoUI Host_Software_MAX32664GWEB_HR_EXTENDED Host_Software_MAX32664GWEC_SpO2_HR-_EXTE ... more

C++ library for Sharp Microelectronics 1.28 inch LCD TFT, LS013B7DH03, SPI bus. Forked from Silicon Labs MemoryLCD display driver.

Committer:
Steven Cooreman
Date:
Wed Mar 18 10:57:16 2015 -0500
Revision:
0:a0faa86660d4
Child:
5:26851f9655cf
Initial commit

Who changed what in which revision?

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