Graphical demo for the LPC4088 Experiment Base Board with one of the Display Expansion Kits. This program displays how to use the emWin library from Segger.
Dependencies: EALib ewgui mbed
This program requires the emWin library. Instructions and more information.
EwGuiImpl.h@0:7f5765fcd048, 2015-07-14 (annotated)
- Committer:
- embeddedartists
- Date:
- Tue Jul 14 11:34:15 2015 +0000
- Revision:
- 0:7f5765fcd048
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:7f5765fcd048 | 1 | |
embeddedartists | 0:7f5765fcd048 | 2 | #ifndef EWGUIIMPL_H |
embeddedartists | 0:7f5765fcd048 | 3 | #define EWGUIIMPL_H |
embeddedartists | 0:7f5765fcd048 | 4 | |
embeddedartists | 0:7f5765fcd048 | 5 | #include "mbed.h" |
embeddedartists | 0:7f5765fcd048 | 6 | #include "EwGui.h" |
embeddedartists | 0:7f5765fcd048 | 7 | #include "EwPainter.h" |
embeddedartists | 0:7f5765fcd048 | 8 | #include "TouchPanel.h" |
embeddedartists | 0:7f5765fcd048 | 9 | |
embeddedartists | 0:7f5765fcd048 | 10 | class EwGuiImpl : public EwGui { |
embeddedartists | 0:7f5765fcd048 | 11 | public: |
embeddedartists | 0:7f5765fcd048 | 12 | |
embeddedartists | 0:7f5765fcd048 | 13 | enum WhichDisplay { |
embeddedartists | 0:7f5765fcd048 | 14 | TFT_5, // 5" display |
embeddedartists | 0:7f5765fcd048 | 15 | TFT_4_3, // 4.3" display |
embeddedartists | 0:7f5765fcd048 | 16 | }; |
embeddedartists | 0:7f5765fcd048 | 17 | |
embeddedartists | 0:7f5765fcd048 | 18 | EwGuiImpl(WhichDisplay which); |
embeddedartists | 0:7f5765fcd048 | 19 | |
embeddedartists | 0:7f5765fcd048 | 20 | virtual void* getMemoryBlockAddress(); |
embeddedartists | 0:7f5765fcd048 | 21 | virtual uint32_t getMemoryBlockSize(); |
embeddedartists | 0:7f5765fcd048 | 22 | |
embeddedartists | 0:7f5765fcd048 | 23 | virtual uint32_t getDisplayWidth(); |
embeddedartists | 0:7f5765fcd048 | 24 | virtual uint32_t getDisplayHeight(); |
embeddedartists | 0:7f5765fcd048 | 25 | |
embeddedartists | 0:7f5765fcd048 | 26 | virtual void* getFrameBufferAddress(); |
embeddedartists | 0:7f5765fcd048 | 27 | |
embeddedartists | 0:7f5765fcd048 | 28 | virtual void getTouchValues(int32_t* x, int32_t* y, int32_t* z); |
embeddedartists | 0:7f5765fcd048 | 29 | |
embeddedartists | 0:7f5765fcd048 | 30 | void calibrate(); |
embeddedartists | 0:7f5765fcd048 | 31 | |
embeddedartists | 0:7f5765fcd048 | 32 | |
embeddedartists | 0:7f5765fcd048 | 33 | private: |
embeddedartists | 0:7f5765fcd048 | 34 | |
embeddedartists | 0:7f5765fcd048 | 35 | uint32_t _width; |
embeddedartists | 0:7f5765fcd048 | 36 | uint32_t _height; |
embeddedartists | 0:7f5765fcd048 | 37 | uint32_t _fb; |
embeddedartists | 0:7f5765fcd048 | 38 | uint32_t _mem; |
embeddedartists | 0:7f5765fcd048 | 39 | uint32_t _memSz; |
embeddedartists | 0:7f5765fcd048 | 40 | TouchPanel* _touch; |
embeddedartists | 0:7f5765fcd048 | 41 | |
embeddedartists | 0:7f5765fcd048 | 42 | void drawCalibPoint(EwPainter &painter, int32_t x, int32_t y); |
embeddedartists | 0:7f5765fcd048 | 43 | }; |
embeddedartists | 0:7f5765fcd048 | 44 | |
embeddedartists | 0:7f5765fcd048 | 45 | #endif |
embeddedartists | 0:7f5765fcd048 | 46 |