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:
gmehmet
Date:
Wed Jan 02 13:20:35 2019 +0300
Revision:
12:ca0bcb4777e9
Parent:
11:0f8ae10b308d
adapt memorylcd code to use it with maxim boards

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
gmehmet 12:ca0bcb4777e9 17 #include "../screen/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();
stevew817 11:0f8ae10b308d 33 virtual void rect(int x0, int y0, int x1, int y1, int colour);
stevew817 11:0f8ae10b308d 34 virtual void fillrect(int x0, int y0, int w, int h, int colour);
stevew817 11:0f8ae10b308d 35 // fill equals fillrect, name has been kept to not break compatibility
Steven Cooreman 0:a0faa86660d4 36 virtual void fill(int x, int y, int w, int h, int colour);
stevew817 11:0f8ae10b308d 37
stevew817 11:0f8ae10b308d 38 // To draw circle using ellipse, set a and b to the same values
stevew817 11:0f8ae10b308d 39 virtual void ellipse(int xc, int yc, int a, int b, unsigned int colour);
stevew817 11:0f8ae10b308d 40 virtual void fillellipse(int xc, int yc, int a, int b, unsigned int colour);
srodk 5:26851f9655cf 41 virtual void circle(int x, int y, int r, int colour);
stevew817 11:0f8ae10b308d 42
stevew817 11:0f8ae10b308d 43 virtual void hline(int x0, int x1, int y, int colour);
stevew817 11:0f8ae10b308d 44 virtual void vline(int x0, int y0, int y1, int colour);
stevew817 11:0f8ae10b308d 45 virtual void line(int x0, int y0, int x1, int y1, int colour);
stevew817 11:0f8ae10b308d 46
Steven Cooreman 0:a0faa86660d4 47 virtual void blit(int x, int y, int w, int h, const int *colour);
Steven Cooreman 0:a0faa86660d4 48 virtual void blitbit(int x, int y, int w, int h, const char* colour);
Steven Cooreman 0:a0faa86660d4 49
Steven Cooreman 0:a0faa86660d4 50 virtual void character(int column, int row, int value);
Steven Cooreman 0:a0faa86660d4 51 virtual int columns();
Steven Cooreman 0:a0faa86660d4 52 virtual int rows();
Steven Cooreman 0:a0faa86660d4 53
Steven Cooreman 0:a0faa86660d4 54 protected:
Steven Cooreman 0:a0faa86660d4 55
Steven Cooreman 0:a0faa86660d4 56 // pixel location
Steven Cooreman 0:a0faa86660d4 57 short _x;
Steven Cooreman 0:a0faa86660d4 58 short _y;
Steven Cooreman 0:a0faa86660d4 59
Steven Cooreman 0:a0faa86660d4 60 // window location
Steven Cooreman 0:a0faa86660d4 61 short _x1;
Steven Cooreman 0:a0faa86660d4 62 short _x2;
Steven Cooreman 0:a0faa86660d4 63 short _y1;
Steven Cooreman 0:a0faa86660d4 64 short _y2;
Steven Cooreman 0:a0faa86660d4 65
Steven Cooreman 0:a0faa86660d4 66 };
Steven Cooreman 0:a0faa86660d4 67
Steven Cooreman 0:a0faa86660d4 68 #endif