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:
Diff: main.cpp
- Revision:
- 2:070e9c054796
- Parent:
- 1:15ea03d72dd7
- Child:
- 3:4301d34173cf
diff -r 15ea03d72dd7 -r 070e9c054796 main.cpp --- a/main.cpp Wed Dec 03 16:18:34 2014 +0000 +++ b/main.cpp Mon Dec 08 12:50:50 2014 +0000 @@ -15,6 +15,10 @@ #include "DMBoard.h" #include "Graphics.h" +#include "AppLauncher.h" +#include "meas.h" + + /****************************************************************************** * Typedefs and defines *****************************************************************************/ @@ -34,13 +38,16 @@ * Local variables *****************************************************************************/ -EthernetInterface eth; Mutex usbInitGuard; /****************************************************************************** * Global variables *****************************************************************************/ +EthernetInterface eth; +bool ethInitialized = false; +bool ethUsingDHCP = true; + /****************************************************************************** * Local functions *****************************************************************************/ @@ -223,6 +230,27 @@ //readMessageFile(DISPLAY_TASK_PREFIX); } } + +#define SWIM_TASK_PREFIX "[SWIM] " +void swimTask(void const* args) +{ + RtosLog* log = DMBoard::instance().logger(); + + log->printf(SWIM_TASK_PREFIX"swimTask started\n"); + + AppLauncher launcher; + if (launcher.setup()) { + log->printf(SWIM_TASK_PREFIX"Starting menu system\n"); + launcher.runToCompletion(); + launcher.teardown(); + } else { + log->printf(SWIM_TASK_PREFIX"Failed to prepare meny system\n"); + } + + // Should never end up here + mbed_die(); +} + #endif //DM_BOARD_USE_DISPLAY #define MSD_TASK_PREFIX "[MSD] " @@ -282,11 +310,13 @@ log->printf(NET_TASK_PREFIX"EthernetInterface Initialize Error \r\n"); mbed_die(); } - if(eth.connect()!=0) { - log->printf(NET_TASK_PREFIX"EthernetInterface Connect Error \r\n"); - mbed_die(); + while (eth.connect() != 0) { + Thread::wait(1000); } + ethInitialized = true; + ethUsingDHCP = true; + log->printf(NET_TASK_PREFIX"IP Address is %s\r\n", eth.getIPAddress()); log->printf(NET_TASK_PREFIX"NetMask is %s\r\n", eth.getNetworkMask()); log->printf(NET_TASK_PREFIX"Gateway Address is %s\r\n", eth.getGateway()); @@ -433,7 +463,8 @@ Thread tAlive(aliveTask); #if defined(DM_BOARD_USE_DISPLAY) - Thread tDisplay(displayTask, NULL, osPriorityNormal, 8192); + //Thread tDisplay(displayTask, NULL, osPriorityNormal, 8192); + Thread tSwim(swimTask, NULL, osPriorityNormal, 8192); #endif Thread tMemstick(msdTask, NULL, osPriorityNormal, 8192); Thread tNetwork(netTask, NULL, osPriorityNormal, 8192);