The out-of-the-box demo application flashed on all display modules before they are shipped.

Dependencies:   DMBasicGUI DMSupport

This is the software that is flashed on the LPC4088 Display Modules before they are shipped from Embedded Artists.

Information

This project works on both the 4.3" and 5" display modules but requires different file systems to handle the different display resolutions.

For the 4.3" displays first drag-n-drop the media/fs_480_raw.fs5 (if you are using the new DAPLINK firmware use fs_480_raw.hex) file to the MBED drive and then drag-n-drop the demo itself. This way both the file system and software are up to date.

For the 5" displays first drag-n-drop the media/fs_800_raw.fsF (if you are using the new DAPLINK firmware use fs_800_raw.hex) file to the MBED drive and then drag-n-drop the demo itself. This way both the file system and software are up to date.

There is a prebuilt version of the demo binary here.

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

/media/uploads/embeddedartists/demo480_cap_000.png /media/uploads/embeddedartists/demo480_cap_001.png /media/uploads/embeddedartists/demo480_cap_002.png /media/uploads/embeddedartists/demo480_cap_004.png /media/uploads/embeddedartists/demo480_cap_006.png /media/uploads/embeddedartists/demo480_cap_007.png /media/uploads/embeddedartists/demo480_cap_008.png
The first slide from the Slideshow:
/media/uploads/embeddedartists/demo480_cap_003.png
A couple of images from the Image Viewer
/media/uploads/embeddedartists/demo480_cap_009.png /media/uploads/embeddedartists/demo480_cap_010.png

Revision:
0:b94e330c98ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AppLauncherSpecial.h	Fri Mar 20 13:36:44 2015 +0000
@@ -0,0 +1,105 @@
+/*
+ *  Copyright 2014 Embedded Artists AB
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+ 
+#ifndef APP_LAUNCHER_SPECIAL_H
+#define APP_LAUNCHER_SPECIAL_H
+
+#include "App.h"
+#include "DMBoard.h"
+#include "lpc_swim.h"
+#include "Clickable.h"
+#include "Image.h"
+#include "Resource.h"
+
+/**
+ * An App example. This uses a number of buttons to launch different Apps.
+ *
+ * The purpose of this example is to demonstrate how to manage a set of
+ * Apps and launch them either as a result of clicked buttons or (in the 
+ * case of the TouchCalibrationApp) after an extended press of the USER
+ * button on the back of the display module.
+ */
+class AppLauncherSpecial : public App {
+public:
+
+	AppLauncherSpecial(int iconWidth=64, int iconHeight=64);
+	virtual ~AppLauncherSpecial();
+
+    enum CommonApplicationIDs {
+        CalibrationApp = 0xffff,
+    };
+
+    virtual bool setup();
+    virtual void runToCompletion();
+    virtual bool teardown();
+
+    void setAppCreatorFunc(App*(*callback)(uint32_t buttonID));
+
+    bool addButton(uint32_t buttonID, const char* caption);
+    bool addImageButton(uint32_t buttonID, const char* imgUp, const char* imgDown = 0);
+    bool addImageButton(uint32_t buttonID, const unsigned char* imgUp, unsigned int imgUpSize, const unsigned char* imgDown = 0, unsigned int imgDownSize = 0);
+    bool addImageButton(uint32_t buttonID, const char* caption, COLOR_T color, const char* imgUp, const char* imgDown = 0);
+    bool addImageButton(uint32_t buttonID, const char* caption, COLOR_T color, const unsigned char* imgUp, unsigned int imgUpSize, const unsigned char* imgDown = 0, unsigned int imgDownSize = 0);
+    bool addImageButton(uint32_t buttonID, const char* caption, COLOR_T color, Resource* resUp, Resource* resDown = 0);
+
+    enum Resources {
+        Resource_Background,
+    };
+
+    /** Specifies the resource to use
+     *
+     *  Adds a resource for a specific id. This allows the
+     *  user program to select e.g. which image to use and
+     *  if it should be loaded from a file or an array.
+     *
+     *  @param id  the identifier
+     *  @param res the resource
+     */
+    void addResource(Resources id, Resource* res);
+    
+private:
+    enum Constants {
+       TitleHeight = 20,
+       ButtonWidth = 75,
+       ButtonHeight = 75,
+       ButtonRows   = 2,
+       ButtonColumns = 5,
+       NumberOfButtons = ButtonRows*ButtonColumns,
+    };
+
+    Display* _disp;
+    SWIM_WINDOW_T* _win;
+    void* _fb;
+    Clickable* _buttons[NumberOfButtons];
+    int _usedButtons;
+    App*(*_callback)(uint32_t buttonID);
+    bool _supportsCalibration;
+    bool _newTouchEvent;
+    bool _newButtonEvent;
+    Image::ImageData_t _bgImg;
+    char _currentTime[30];
+    Resource* _resBg;
+    int _iconWidth;
+    int _iconHeight;
+
+    void draw();
+    void onTouchEvent();
+    void onButtonEvent();
+};
+
+#endif
+
+