aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gdisp/gdisp_compiled_pictures/main.c
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2013-04-03 13:51:43 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2013-04-03 13:51:43 +1000
commit64971549fd63d131f136a16913deaec3bdbcf2f3 (patch)
treecfd2698ff4ce1f207ba8f776d1c8fff73718c71f /demos/modules/gdisp/gdisp_compiled_pictures/main.c
parentb5dceeead44b0b825ee2ef7d2d7943bec8200e30 (diff)
downloaduGFX-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.c26
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);
+ }
+}
+