![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Temperature Data Logger or Display. Program uses the EA LPCXpresso Board's on-board temp sensor and SD card to constantly monitor the temperature. Optionally, the temp can be displayed on the EA OLED display.
Dependencies: mbed SDFileSystem
GraphicsDisplay.h@1:37f2341e763b, 2010-06-16 (annotated)
- Committer:
- tyger23
- Date:
- Wed Jun 16 16:08:29 2010 +0000
- Revision:
- 1:37f2341e763b
- Parent:
- 0:e05fd3c9c4b3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tyger23 | 0:e05fd3c9c4b3 | 1 | /* mbed GraphicsDisplay Display Library Base Class |
tyger23 | 0:e05fd3c9c4b3 | 2 | * Copyright (c) 2007-2009 sford |
tyger23 | 0:e05fd3c9c4b3 | 3 | * Released under the MIT License: http://mbed.org/license/mit |
tyger23 | 0:e05fd3c9c4b3 | 4 | * |
tyger23 | 0:e05fd3c9c4b3 | 5 | * A library for providing a common base class for Graphics displays |
tyger23 | 0:e05fd3c9c4b3 | 6 | * To port a new display, derive from this class and implement |
tyger23 | 0:e05fd3c9c4b3 | 7 | * the constructor (setup the display), pixel (put a pixel |
tyger23 | 0:e05fd3c9c4b3 | 8 | * at a location), width and height functions. Everything else |
tyger23 | 0:e05fd3c9c4b3 | 9 | * (locate, printf, putc, cls, window, putp, fill, blit, blitbit) |
tyger23 | 0:e05fd3c9c4b3 | 10 | * will come for free. You can also provide a specialised implementation |
tyger23 | 0:e05fd3c9c4b3 | 11 | * of window and putp to speed up the results |
tyger23 | 0:e05fd3c9c4b3 | 12 | */ |
tyger23 | 0:e05fd3c9c4b3 | 13 | |
tyger23 | 0:e05fd3c9c4b3 | 14 | #ifndef MBED_GRAPHICSDISPLAY_H |
tyger23 | 0:e05fd3c9c4b3 | 15 | #define MBED_GRAPHICSDISPLAY_H |
tyger23 | 0:e05fd3c9c4b3 | 16 | |
tyger23 | 0:e05fd3c9c4b3 | 17 | #include "TextDisplay.h" |
tyger23 | 0:e05fd3c9c4b3 | 18 | |
tyger23 | 0:e05fd3c9c4b3 | 19 | class GraphicsDisplay : public TextDisplay { |
tyger23 | 0:e05fd3c9c4b3 | 20 | |
tyger23 | 0:e05fd3c9c4b3 | 21 | public: |
tyger23 | 0:e05fd3c9c4b3 | 22 | |
tyger23 | 0:e05fd3c9c4b3 | 23 | GraphicsDisplay(); |
tyger23 | 0:e05fd3c9c4b3 | 24 | |
tyger23 | 0:e05fd3c9c4b3 | 25 | virtual void pixel(int x, int y, int colour) = 0; |
tyger23 | 0:e05fd3c9c4b3 | 26 | virtual int width() = 0; |
tyger23 | 0:e05fd3c9c4b3 | 27 | virtual int height() = 0; |
tyger23 | 0:e05fd3c9c4b3 | 28 | |
tyger23 | 0:e05fd3c9c4b3 | 29 | virtual void window(int x, int y, int w, int h); |
tyger23 | 0:e05fd3c9c4b3 | 30 | virtual void putp(int colour); |
tyger23 | 0:e05fd3c9c4b3 | 31 | |
tyger23 | 0:e05fd3c9c4b3 | 32 | virtual void cls(); |
tyger23 | 0:e05fd3c9c4b3 | 33 | virtual void fill(int x, int y, int w, int h, int colour); |
tyger23 | 0:e05fd3c9c4b3 | 34 | virtual void blit(int x, int y, int w, int h, const int *colour); |
tyger23 | 0:e05fd3c9c4b3 | 35 | virtual void blitbit(int x, int y, int w, int h, const char* colour); |
tyger23 | 0:e05fd3c9c4b3 | 36 | |
tyger23 | 0:e05fd3c9c4b3 | 37 | virtual void character(int column, int row, int value); |
tyger23 | 0:e05fd3c9c4b3 | 38 | virtual int columns(); |
tyger23 | 0:e05fd3c9c4b3 | 39 | virtual int rows(); |
tyger23 | 0:e05fd3c9c4b3 | 40 | |
tyger23 | 0:e05fd3c9c4b3 | 41 | protected: |
tyger23 | 0:e05fd3c9c4b3 | 42 | |
tyger23 | 0:e05fd3c9c4b3 | 43 | // pixel location |
tyger23 | 0:e05fd3c9c4b3 | 44 | short _x; |
tyger23 | 0:e05fd3c9c4b3 | 45 | short _y; |
tyger23 | 0:e05fd3c9c4b3 | 46 | |
tyger23 | 0:e05fd3c9c4b3 | 47 | // window location |
tyger23 | 0:e05fd3c9c4b3 | 48 | short _x1; |
tyger23 | 0:e05fd3c9c4b3 | 49 | short _x2; |
tyger23 | 0:e05fd3c9c4b3 | 50 | short _y1; |
tyger23 | 0:e05fd3c9c4b3 | 51 | short _y2; |
tyger23 | 0:e05fd3c9c4b3 | 52 | |
tyger23 | 0:e05fd3c9c4b3 | 53 | }; |
tyger23 | 0:e05fd3c9c4b3 | 54 | |
tyger23 | 0:e05fd3c9c4b3 | 55 | #endif |