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.
Diff: EwGuiImpl.h
- Revision:
- 0:7f5765fcd048
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EwGuiImpl.h Tue Jul 14 11:34:15 2015 +0000 @@ -0,0 +1,46 @@ + +#ifndef EWGUIIMPL_H +#define EWGUIIMPL_H + +#include "mbed.h" +#include "EwGui.h" +#include "EwPainter.h" +#include "TouchPanel.h" + +class EwGuiImpl : public EwGui { +public: + + enum WhichDisplay { + TFT_5, // 5" display + TFT_4_3, // 4.3" display + }; + + EwGuiImpl(WhichDisplay which); + + virtual void* getMemoryBlockAddress(); + virtual uint32_t getMemoryBlockSize(); + + virtual uint32_t getDisplayWidth(); + virtual uint32_t getDisplayHeight(); + + virtual void* getFrameBufferAddress(); + + virtual void getTouchValues(int32_t* x, int32_t* y, int32_t* z); + + void calibrate(); + + +private: + + uint32_t _width; + uint32_t _height; + uint32_t _fb; + uint32_t _mem; + uint32_t _memSz; + TouchPanel* _touch; + + void drawCalibPoint(EwPainter &painter, int32_t x, int32_t y); +}; + +#endif +