Demo for Embedded World 2015.

Dependencies:   DMBasicGUI DMSupport

Demo running on several LPC4088 Display Modules on the Embedded World 2015 exhibition.

Information

To run the demo first drag-n-drop the to_sync.fs3 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.

This is what the launcher will look like:

/media/uploads/embeddedartists/ew2015_cap_000.png /media/uploads/embeddedartists/ew2015_cap_002.png /media/uploads/embeddedartists/ew2015_cap_003.png /media/uploads/embeddedartists/ew2015_cap_004.png /media/uploads/embeddedartists/ew2015_cap_005.png /media/uploads/embeddedartists/ew2015_cap_006.png

Committer:
alindvall
Date:
Thu Feb 19 13:54:53 2015 +0000
Revision:
0:6bd24cbb88a1
First public version

Who changed what in which revision?

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