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

Committer:
alindvall
Date:
Tue Apr 28 11:49:03 2015 +0000
Revision:
29:be8b784873f5
Parent:
26:f07df116f3c9
Updated to latest version of the DMSupport library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 13:57e65aba9802 1 /*
embeddedartists 13:57e65aba9802 2 * Copyright 2014 Embedded Artists AB
embeddedartists 13:57e65aba9802 3 *
embeddedartists 13:57e65aba9802 4 * Licensed under the Apache License, Version 2.0 (the "License");
embeddedartists 13:57e65aba9802 5 * you may not use this file except in compliance with the License.
embeddedartists 13:57e65aba9802 6 * You may obtain a copy of the License at
embeddedartists 13:57e65aba9802 7 *
embeddedartists 13:57e65aba9802 8 * http://www.apache.org/licenses/LICENSE-2.0
embeddedartists 13:57e65aba9802 9 *
embeddedartists 13:57e65aba9802 10 * Unless required by applicable law or agreed to in writing, software
embeddedartists 13:57e65aba9802 11 * distributed under the License is distributed on an "AS IS" BASIS,
embeddedartists 13:57e65aba9802 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
embeddedartists 13:57e65aba9802 13 * See the License for the specific language governing permissions and
embeddedartists 13:57e65aba9802 14 * limitations under the License.
embeddedartists 13:57e65aba9802 15 */
embeddedartists 13:57e65aba9802 16
embeddedartists 13:57e65aba9802 17 #ifndef APP_IMAGEVIEWER_H
embeddedartists 13:57e65aba9802 18 #define APP_IMAGEVIEWER_H
embeddedartists 13:57e65aba9802 19
embeddedartists 13:57e65aba9802 20 #include "App.h"
embeddedartists 13:57e65aba9802 21 #include "DMBoard.h"
embeddedartists 13:57e65aba9802 22 #include "lpc_swim.h"
embeddedartists 13:57e65aba9802 23 #include "ImageButton.h"
embeddedartists 13:57e65aba9802 24 #include "Image.h"
embeddedartists 13:57e65aba9802 25
embeddedartists 13:57e65aba9802 26 /**
embeddedartists 13:57e65aba9802 27 * An App example. Searches for images on any connected media (USB Mass Storage,
embeddedartists 13:57e65aba9802 28 * SD Card or QSPI File System) and presents the images one at a time, scaled to
embeddedartists 13:57e65aba9802 29 * fit the display.
embeddedartists 13:57e65aba9802 30 *
embeddedartists 13:57e65aba9802 31 * The purpose of this example is to show how to recursively search the file
embeddedartists 13:57e65aba9802 32 * systems and how to load images. The image scaling could be replaced with
embeddedartists 13:57e65aba9802 33 * rotating, cropping or any other image operation. The two second delay between
embeddedartists 13:57e65aba9802 34 * images could be replaced with buttons or other touch events.
embeddedartists 13:57e65aba9802 35 */
embeddedartists 13:57e65aba9802 36 class AppImageViewer : public App {
embeddedartists 13:57e65aba9802 37 public:
embeddedartists 13:57e65aba9802 38
embeddedartists 26:f07df116f3c9 39 AppImageViewer();
embeddedartists 26:f07df116f3c9 40 virtual ~AppImageViewer();
embeddedartists 13:57e65aba9802 41
embeddedartists 13:57e65aba9802 42 virtual bool setup();
embeddedartists 13:57e65aba9802 43 virtual void runToCompletion();
embeddedartists 13:57e65aba9802 44 virtual bool teardown();
embeddedartists 13:57e65aba9802 45
embeddedartists 13:57e65aba9802 46 void load(const char* file);
embeddedartists 13:57e65aba9802 47
embeddedartists 13:57e65aba9802 48 private:
embeddedartists 13:57e65aba9802 49 Display* _disp;
embeddedartists 13:57e65aba9802 50 SWIM_WINDOW_T* _win;
embeddedartists 13:57e65aba9802 51 void* _fb1;
embeddedartists 13:57e65aba9802 52 void* _fb2;
embeddedartists 13:57e65aba9802 53 ImageButton* _btn;
embeddedartists 13:57e65aba9802 54 Mail<Image::ImageData_t, 2> _mailbox;
embeddedartists 13:57e65aba9802 55 int _active;
embeddedartists 13:57e65aba9802 56 int _next;
embeddedartists 13:57e65aba9802 57 Mutex _allowedToRender;
embeddedartists 13:57e65aba9802 58 Mutex _imageLoaded;
embeddedartists 13:57e65aba9802 59
embeddedartists 13:57e65aba9802 60 void draw();
embeddedartists 13:57e65aba9802 61 };
embeddedartists 13:57e65aba9802 62
embeddedartists 13:57e65aba9802 63 #endif