EA OLED Hello World (Runs through the different possibilities with the OLED software

Dependencies:   mbed

Committer:
Lerche
Date:
Sun Oct 03 08:40:47 2010 +0000
Revision:
0:ff072ee9597c

        

Who changed what in which revision?

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