Driver to control the EM027BS013 board from Embedded Artists

Dependencies:   EM027BS013

EM027BS013 Simple Driver

This library provides an easy way to write data to the EM027BS013 display, by providing interfaces to common C functions and methods. The library was originally written by Peter Drescher, who created the "EaEpaper" library for the EM027AS012 display (available here, but adapted to use the newer display type and driver (available here), as the existing display is now discontinued.

Big thanks go to the team from Pervasive Displays and Electronic Artists for producing such a nice display, and to Peter for providing the initial interface used in this driver.

Committer:
Leigh_LbR
Date:
Thu May 19 14:08:34 2016 +0000
Revision:
1:46dfef41919b
Parent:
0:e36f1973a674
Added API documentation;

Who changed what in which revision?

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