diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-04-03 15:34:48 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-04-03 15:34:48 +0200 |
commit | b386962981d7667cd0d14cc50969eb82d0d71dcc (patch) | |
tree | d75928a8b0dba43763b67cd505467f2a9309fe38 /demos | |
parent | 4871a420573d1a4986eb8a3cee18e4a8c58faee5 (diff) | |
parent | 8b15aab802024434bd8565aebb33368e66532a97 (diff) | |
download | uGFX-b386962981d7667cd0d14cc50969eb82d0d71dcc.tar.gz uGFX-b386962981d7667cd0d14cc50969eb82d0d71dcc.tar.bz2 uGFX-b386962981d7667cd0d14cc50969eb82d0d71dcc.zip |
merged inmarket
Diffstat (limited to 'demos')
-rw-r--r-- | demos/modules/gdisp/gdisp_images/main.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/demos/modules/gdisp/gdisp_images/main.c b/demos/modules/gdisp/gdisp_images/main.c index 6ca5f640..8f14750e 100644 --- a/demos/modules/gdisp/gdisp_images/main.c +++ b/demos/modules/gdisp/gdisp_images/main.c @@ -22,12 +22,22 @@ #include "hal.h" #include "gfx.h" +#ifdef WIN32 + #define USE_MEMORY_FILE FALSE // Can be true or false for Win32 +#else + #define USE_MEMORY_FILE TRUE // Non-Win32 - use the compiled in image +#endif + +#if USE_MEMORY_FILE + #include "test-pal8.h" +#endif + static gdispImage myImage; int main(void) { coord_t swidth, sheight; - halInit(); // Initialise the Hardware + halInit(); // Initialize the Hardware chSysInit(); // Initialize the OS gdispInit(); // Initialize the display @@ -38,7 +48,11 @@ int main(void) { sheight = gdispGetHeight(); // Set up IO for our image +#if USE_MEMORY_FILE + gdispImageSetMemoryReader(&myImage, test_pal8); +#else gdispImageSetSimulFileReader(&myImage, "test-pal8.bmp"); +#endif gdispImageOpen(&myImage); gdispImageDraw(&myImage, 0, 0, swidth, sheight, 0, 0); |