Y-con P020 Electric Paper Display

Dependents:   YconP020_USBIFEx

This is a library for Y-con P020 Electric Paper Display.

sample program is here.

詳しくはこちら(sorry only in Japanese)をご覧ください。

Committer:
jk1lot
Date:
Fri Jul 01 13:22:18 2016 +0000
Revision:
0:4dbc7e226777
create library

Who changed what in which revision?

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