diff options
author | Andrew Hannam <andrewh@inmarket.com.au> | 2013-04-03 13:51:43 +1000 |
---|---|---|
committer | Andrew Hannam <andrewh@inmarket.com.au> | 2013-04-03 13:51:43 +1000 |
commit | 64971549fd63d131f136a16913deaec3bdbcf2f3 (patch) | |
tree | cfd2698ff4ce1f207ba8f776d1c8fff73718c71f /demos/modules/gdisp/gdisp_compiled_pictures/main.c | |
parent | b5dceeead44b0b825ee2ef7d2d7943bec8200e30 (diff) | |
download | uGFX-64971549fd63d131f136a16913deaec3bdbcf2f3.tar.gz uGFX-64971549fd63d131f136a16913deaec3bdbcf2f3.tar.bz2 uGFX-64971549fd63d131f136a16913deaec3bdbcf2f3.zip |
New GDISP image handling with demo
Images currently support Native and BMP (except RLE4,8 and 16 bit - due
to bugs)
Supports reading from Memory, BaseFileStream or real files (only on the
Win32 simulator).
Move gdisp_pictures demo to better refect its purpose.
Bug fixes for BMP RLE4,8 & 16 bit to come very soon
GIF support very soon.
Diffstat (limited to 'demos/modules/gdisp/gdisp_compiled_pictures/main.c')
-rw-r--r-- | demos/modules/gdisp/gdisp_compiled_pictures/main.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/demos/modules/gdisp/gdisp_compiled_pictures/main.c b/demos/modules/gdisp/gdisp_compiled_pictures/main.c new file mode 100644 index 00000000..b437619e --- /dev/null +++ b/demos/modules/gdisp/gdisp_compiled_pictures/main.c @@ -0,0 +1,26 @@ +#include "ch.h" +#include "hal.h" +#include "gfx.h" +#include "matterhorn1.h" +#include "matterhorn2.h" +#include "fruits1.h" + +int main(void) { + halInit(); + chSysInit(); + + gdispInit(); + gdispSetOrientation(GDISP_ROTATE_90); + + while(1) { + gdispBlitArea(0, 0, fruits1.width, fruits1.height, (const pixel_t*)fruits1.pixel_data); + chThdSleepMilliseconds(3000); + + gdispBlitArea(0, 0, matterhorn1.width, matterhorn1.height, (const pixel_t*)matterhorn1.pixel_data); + chThdSleepMilliseconds(3000); + + gdispBlitArea(0, 0, matterhorn2.width, matterhorn2.height, (const pixel_t*)matterhorn2.pixel_data); + chThdSleepMilliseconds(3000); + } +} + |