EmbeddedArtists AB
/
app_lcdboard_demo_picture
Example for the LPC4088 QSB Base Board
PictureDemo.h@3:33a36d79ab7d, 2014-04-09 (annotated)
- Committer:
- embeddedartists
- Date:
- Wed Apr 09 10:26:13 2014 +0000
- Revision:
- 3:33a36d79ab7d
- Parent:
- 0:83b8ee8e8d4b
Updated to latest version of EALib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:83b8ee8e8d4b | 1 | |
embeddedartists | 0:83b8ee8e8d4b | 2 | #ifndef PICTUREDEMO_H |
embeddedartists | 0:83b8ee8e8d4b | 3 | #define PICTUREDEMO_H |
embeddedartists | 0:83b8ee8e8d4b | 4 | |
embeddedartists | 0:83b8ee8e8d4b | 5 | class PictureDemo { |
embeddedartists | 0:83b8ee8e8d4b | 6 | public: |
embeddedartists | 0:83b8ee8e8d4b | 7 | |
embeddedartists | 0:83b8ee8e8d4b | 8 | |
embeddedartists | 0:83b8ee8e8d4b | 9 | /** Set the address of the frame buffer to use. |
embeddedartists | 0:83b8ee8e8d4b | 10 | * |
embeddedartists | 0:83b8ee8e8d4b | 11 | * It is the content of the frame buffer that is shown on the |
embeddedartists | 0:83b8ee8e8d4b | 12 | * display. All the drawing on the frame buffer can be done |
embeddedartists | 0:83b8ee8e8d4b | 13 | * 'offline' and whenever it should be shown this function |
embeddedartists | 0:83b8ee8e8d4b | 14 | * can be called with the address of the offline frame buffer. |
embeddedartists | 0:83b8ee8e8d4b | 15 | * |
embeddedartists | 0:83b8ee8e8d4b | 16 | * @param pFrameBuf Pointer to the frame buffer, which must be |
embeddedartists | 0:83b8ee8e8d4b | 17 | * 3 times as big as the frame size (for tripple |
embeddedartists | 0:83b8ee8e8d4b | 18 | * buffering). |
embeddedartists | 0:83b8ee8e8d4b | 19 | * dispWidth The width of the display (in pixels). |
embeddedartists | 0:83b8ee8e8d4b | 20 | * dispHeight The height of the display (in pixels). |
embeddedartists | 0:83b8ee8e8d4b | 21 | * loops Number of loops in the demo code. |
embeddedartists | 0:83b8ee8e8d4b | 22 | * delayMs Delay in milliseconds between schreen updates. |
embeddedartists | 0:83b8ee8e8d4b | 23 | * |
embeddedartists | 0:83b8ee8e8d4b | 24 | * @returns |
embeddedartists | 0:83b8ee8e8d4b | 25 | * none |
embeddedartists | 0:83b8ee8e8d4b | 26 | */ |
embeddedartists | 0:83b8ee8e8d4b | 27 | PictureDemo(uint8_t *pFrameBuf, uint16_t dispWidth, uint16_t dispHeight); |
embeddedartists | 0:83b8ee8e8d4b | 28 | |
embeddedartists | 0:83b8ee8e8d4b | 29 | void run(int image, uint32_t delayMs); |
embeddedartists | 0:83b8ee8e8d4b | 30 | |
embeddedartists | 0:83b8ee8e8d4b | 31 | private: |
embeddedartists | 0:83b8ee8e8d4b | 32 | int32_t windowX; |
embeddedartists | 0:83b8ee8e8d4b | 33 | int32_t windowY; |
embeddedartists | 0:83b8ee8e8d4b | 34 | uint16_t *pFrmBuf; |
embeddedartists | 0:83b8ee8e8d4b | 35 | uint16_t *pFrmBuf1; |
embeddedartists | 0:83b8ee8e8d4b | 36 | uint16_t *pFrmBuf2; |
embeddedartists | 0:83b8ee8e8d4b | 37 | uint16_t *pFrmBuf3; |
embeddedartists | 0:83b8ee8e8d4b | 38 | |
embeddedartists | 0:83b8ee8e8d4b | 39 | void drawCentered(const unsigned char* pData, int size, uint32_t delayMs); |
embeddedartists | 0:83b8ee8e8d4b | 40 | }; |
embeddedartists | 0:83b8ee8e8d4b | 41 | |
embeddedartists | 0:83b8ee8e8d4b | 42 | #endif /* PICTUREDEMO_H */ |
embeddedartists | 0:83b8ee8e8d4b | 43 |