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

Committer:
alindvall
Date:
Fri Mar 20 13:36:44 2015 +0000
Revision:
0:b94e330c98ac
First version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alindvall 0:b94e330c98ac 1 /*
alindvall 0:b94e330c98ac 2 * Copyright 2014 Embedded Artists AB
alindvall 0:b94e330c98ac 3 *
alindvall 0:b94e330c98ac 4 * Licensed under the Apache License, Version 2.0 (the "License");
alindvall 0:b94e330c98ac 5 * you may not use this file except in compliance with the License.
alindvall 0:b94e330c98ac 6 * You may obtain a copy of the License at
alindvall 0:b94e330c98ac 7 *
alindvall 0:b94e330c98ac 8 * http://www.apache.org/licenses/LICENSE-2.0
alindvall 0:b94e330c98ac 9 *
alindvall 0:b94e330c98ac 10 * Unless required by applicable law or agreed to in writing, software
alindvall 0:b94e330c98ac 11 * distributed under the License is distributed on an "AS IS" BASIS,
alindvall 0:b94e330c98ac 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
alindvall 0:b94e330c98ac 13 * See the License for the specific language governing permissions and
alindvall 0:b94e330c98ac 14 * limitations under the License.
alindvall 0:b94e330c98ac 15 */
alindvall 0:b94e330c98ac 16
alindvall 0:b94e330c98ac 17 #ifndef APP_LAUNCHER_SPECIAL_H
alindvall 0:b94e330c98ac 18 #define APP_LAUNCHER_SPECIAL_H
alindvall 0:b94e330c98ac 19
alindvall 0:b94e330c98ac 20 #include "App.h"
alindvall 0:b94e330c98ac 21 #include "DMBoard.h"
alindvall 0:b94e330c98ac 22 #include "lpc_swim.h"
alindvall 0:b94e330c98ac 23 #include "Clickable.h"
alindvall 0:b94e330c98ac 24 #include "Image.h"
alindvall 0:b94e330c98ac 25 #include "Resource.h"
alindvall 0:b94e330c98ac 26
alindvall 0:b94e330c98ac 27 /**
alindvall 0:b94e330c98ac 28 * An App example. This uses a number of buttons to launch different Apps.
alindvall 0:b94e330c98ac 29 *
alindvall 0:b94e330c98ac 30 * The purpose of this example is to demonstrate how to manage a set of
alindvall 0:b94e330c98ac 31 * Apps and launch them either as a result of clicked buttons or (in the
alindvall 0:b94e330c98ac 32 * case of the TouchCalibrationApp) after an extended press of the USER
alindvall 0:b94e330c98ac 33 * button on the back of the display module.
alindvall 0:b94e330c98ac 34 */
alindvall 0:b94e330c98ac 35 class AppLauncherSpecial : public App {
alindvall 0:b94e330c98ac 36 public:
alindvall 0:b94e330c98ac 37
alindvall 0:b94e330c98ac 38 AppLauncherSpecial(int iconWidth=64, int iconHeight=64);
alindvall 0:b94e330c98ac 39 virtual ~AppLauncherSpecial();
alindvall 0:b94e330c98ac 40
alindvall 0:b94e330c98ac 41 enum CommonApplicationIDs {
alindvall 0:b94e330c98ac 42 CalibrationApp = 0xffff,
alindvall 0:b94e330c98ac 43 };
alindvall 0:b94e330c98ac 44
alindvall 0:b94e330c98ac 45 virtual bool setup();
alindvall 0:b94e330c98ac 46 virtual void runToCompletion();
alindvall 0:b94e330c98ac 47 virtual bool teardown();
alindvall 0:b94e330c98ac 48
alindvall 0:b94e330c98ac 49 void setAppCreatorFunc(App*(*callback)(uint32_t buttonID));
alindvall 0:b94e330c98ac 50
alindvall 0:b94e330c98ac 51 bool addButton(uint32_t buttonID, const char* caption);
alindvall 0:b94e330c98ac 52 bool addImageButton(uint32_t buttonID, const char* imgUp, const char* imgDown = 0);
alindvall 0:b94e330c98ac 53 bool addImageButton(uint32_t buttonID, const unsigned char* imgUp, unsigned int imgUpSize, const unsigned char* imgDown = 0, unsigned int imgDownSize = 0);
alindvall 0:b94e330c98ac 54 bool addImageButton(uint32_t buttonID, const char* caption, COLOR_T color, const char* imgUp, const char* imgDown = 0);
alindvall 0:b94e330c98ac 55 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);
alindvall 0:b94e330c98ac 56 bool addImageButton(uint32_t buttonID, const char* caption, COLOR_T color, Resource* resUp, Resource* resDown = 0);
alindvall 0:b94e330c98ac 57
alindvall 0:b94e330c98ac 58 enum Resources {
alindvall 0:b94e330c98ac 59 Resource_Background,
alindvall 0:b94e330c98ac 60 };
alindvall 0:b94e330c98ac 61
alindvall 0:b94e330c98ac 62 /** Specifies the resource to use
alindvall 0:b94e330c98ac 63 *
alindvall 0:b94e330c98ac 64 * Adds a resource for a specific id. This allows the
alindvall 0:b94e330c98ac 65 * user program to select e.g. which image to use and
alindvall 0:b94e330c98ac 66 * if it should be loaded from a file or an array.
alindvall 0:b94e330c98ac 67 *
alindvall 0:b94e330c98ac 68 * @param id the identifier
alindvall 0:b94e330c98ac 69 * @param res the resource
alindvall 0:b94e330c98ac 70 */
alindvall 0:b94e330c98ac 71 void addResource(Resources id, Resource* res);
alindvall 0:b94e330c98ac 72
alindvall 0:b94e330c98ac 73 private:
alindvall 0:b94e330c98ac 74 enum Constants {
alindvall 0:b94e330c98ac 75 TitleHeight = 20,
alindvall 0:b94e330c98ac 76 ButtonWidth = 75,
alindvall 0:b94e330c98ac 77 ButtonHeight = 75,
alindvall 0:b94e330c98ac 78 ButtonRows = 2,
alindvall 0:b94e330c98ac 79 ButtonColumns = 5,
alindvall 0:b94e330c98ac 80 NumberOfButtons = ButtonRows*ButtonColumns,
alindvall 0:b94e330c98ac 81 };
alindvall 0:b94e330c98ac 82
alindvall 0:b94e330c98ac 83 Display* _disp;
alindvall 0:b94e330c98ac 84 SWIM_WINDOW_T* _win;
alindvall 0:b94e330c98ac 85 void* _fb;
alindvall 0:b94e330c98ac 86 Clickable* _buttons[NumberOfButtons];
alindvall 0:b94e330c98ac 87 int _usedButtons;
alindvall 0:b94e330c98ac 88 App*(*_callback)(uint32_t buttonID);
alindvall 0:b94e330c98ac 89 bool _supportsCalibration;
alindvall 0:b94e330c98ac 90 bool _newTouchEvent;
alindvall 0:b94e330c98ac 91 bool _newButtonEvent;
alindvall 0:b94e330c98ac 92 Image::ImageData_t _bgImg;
alindvall 0:b94e330c98ac 93 char _currentTime[30];
alindvall 0:b94e330c98ac 94 Resource* _resBg;
alindvall 0:b94e330c98ac 95 int _iconWidth;
alindvall 0:b94e330c98ac 96 int _iconHeight;
alindvall 0:b94e330c98ac 97
alindvall 0:b94e330c98ac 98 void draw();
alindvall 0:b94e330c98ac 99 void onTouchEvent();
alindvall 0:b94e330c98ac 100 void onButtonEvent();
alindvall 0:b94e330c98ac 101 };
alindvall 0:b94e330c98ac 102
alindvall 0:b94e330c98ac 103 #endif
alindvall 0:b94e330c98ac 104
alindvall 0:b94e330c98ac 105