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

Files at this revision

API Documentation at this revision

Comitter:
embeddedartists
Date:
Wed Apr 15 09:45:35 2015 +0200
Parent:
27:4fe24decabf9
Child:
29:be8b784873f5
Commit message:
- Graphical improvements in the AppImageViewer
- Updated DMSupport library to include the new GPDMA class

Changed in this revision

AppImageViewer.cpp Show annotated file Show diff for this revision Revisions of this file
DMBasicGUI.lib Show annotated file Show diff for this revision Revisions of this file
DMSupport.lib Show annotated file Show diff for this revision Revisions of this file
--- 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) {
--- a/DMBasicGUI.lib	Fri Mar 20 15:12:38 2015 +0000
+++ b/DMBasicGUI.lib	Wed Apr 15 09:45:35 2015 +0200
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Embedded-Artists/code/DMBasicGUI/#6e2abf107800
+http://developer.mbed.org/teams/Embedded-Artists/code/DMBasicGUI/#1a7c743600e6
--- a/DMSupport.lib	Fri Mar 20 15:12:38 2015 +0000
+++ b/DMSupport.lib	Wed Apr 15 09:45:35 2015 +0200
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Embedded-Artists/code/DMSupport/#92193dc72995
+http://developer.mbed.org/teams/Embedded-Artists/code/DMSupport/#420cdc281467