Example using the support package for LPC4088 DisplayModule

Dependencies:   DMBasicGUI DMSupport

Example using a lot of the features in the software package for the LPC4088 Display Module.

This project can be selected as a template when creating a new project based on the LPC4088 Display Module.

Information

This project works on the 4.3" display modules.

Some of the apps works on the 5" display modules. The ImageViewer and Slideshow app will show the images distorted as it does not take the resolution into consideration.

Information

The USB Status app is disabled. The Image viewer looks for images in the root of SD cards, USB memory sticks or the file system on the QSPI flash. The Slideshow app expects to find a slideshow script in /mci/elec14/ea_logo.txt.

This is what it looks like on the 4.3" display:

/media/uploads/embeddedartists/everything_cap_000.png /media/uploads/embeddedartists/everything_cap_001.png /media/uploads/embeddedartists/everything_cap_003.png /media/uploads/embeddedartists/everything_cap_004.png /media/uploads/embeddedartists/everything_cap_006.png /media/uploads/embeddedartists/everything_cap_008.png

Revision:
28:be5b06633d98
Parent:
24:768f5958c308
Child:
30:e1cded731965
--- a/AppImageViewer.cpp	Fri Mar 20 15:12:38 2015 +0000
+++ b/AppImageViewer.cpp	Wed Apr 15 09:45:35 2015 +0200
@@ -58,6 +58,8 @@
 
     _btn = new ImageButton(_win->fb, _win->xpmax - BTN_OFF - BTN_WIDTH, _win->ypmax - BTN_OFF - BTN_HEIGHT, BTN_WIDTH, BTN_HEIGHT);
     _btn->loadImages(img_ok, img_size_ok);
+    // Copy everything onto the back buffer
+    memcpy(_fb2, _fb1, _disp->fbSize());
 }
 
 void AppImageViewer::load(const char* file)
@@ -188,7 +190,11 @@
         }
         _win->fb = fb;
         Image::ImageData_t* data = (Image::ImageData_t*)evt.value.p;
-        swim_put_image_xy(_win, (COLOR_T*)data->pixels, data->width, data->height, _disp->width()-data->width, _disp->height()-data->height);
+        if ((data->width < _disp->width()) || (data->height < _disp->height())) {
+          // clear display if the image isn't fullscreen
+          memset(_win->fb, 0, _disp->fbSize());
+        }
+        swim_put_image_xy(_win, (COLOR_T*)data->pixels, data->width, data->height, (_disp->width()-data->width)/2, (_disp->height()-data->height)/2);
         free(data->pointerToFree);
         _mailbox.free(data);
         if (first) {