Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DMBasicGUI DMSupport
Fork of lpc4088_displaymodule_hello_world by
A minimal example showing how to initialize the display module and draw a message on the display.
This project can be selected as a template when creating a new project based on the LPC4088 Display Module.
Information
This project works on both the 4.3" and 5" display modules.
This is what it looks like:

Revision 7:791d32dd9dd9, committed 2019-10-23
- Comitter:
- embeddedartists
- Date:
- Wed Oct 23 07:00:18 2019 +0000
- Parent:
- 6:f50a0a91b2fb
- Commit message:
- Updates related to mbed OS 5
Changed in this revision
--- a/DMBasicGUI.lib Thu Oct 17 09:44:11 2019 +0000 +++ b/DMBasicGUI.lib Wed Oct 23 07:00:18 2019 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Embedded-Artists/code/DMBasicGUI/#1a7c743600e6 +http://developer.mbed.org/teams/Embedded-Artists/code/DMBasicGUI/#0038059e3a8f
--- a/DMSupport.lib Thu Oct 17 09:44:11 2019 +0000 +++ b/DMSupport.lib Wed Oct 23 07:00:18 2019 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/Embedded-Artists/code/DMSupport/#6df4f63aa406 +http://developer.mbed.org/teams/Embedded-Artists/code/DMSupport/#e06e764ff4fd
--- a/dm_board_config.h Thu Oct 17 09:44:11 2019 +0000 +++ b/dm_board_config.h Wed Oct 23 07:00:18 2019 +0000 @@ -27,7 +27,7 @@ // #define DM_BOARD_USE_QSPI #define DM_BOARD_USE_DISPLAY #define DM_BOARD_USE_TOUCH -// #define DM_BOARD_USE_ETHERNET +//#define DM_BOARD_USE_ETHERNET #define DM_BOARD_USE_FAST_UART // #define DM_BOARD_USE_USBSERIAL_IN_RTOSLOG // #define DM_BOARD_DISABLE_STANDARD_PRINTF
--- a/main.cpp Thu Oct 17 09:44:11 2019 +0000
+++ b/main.cpp Wed Oct 23 07:00:18 2019 +0000
@@ -1,15 +1,17 @@
#include "mbed.h"
+#include "platform/mbed_thread.h"
#include "DMBoard.h"
#include "lpc_swim.h"
#include "lpc_swim_font.h"
int main()
{
+
DMBoard::BoardError err;
DMBoard* board = &DMBoard::instance();
RtosLog* log = board->logger();
Display* disp = board->display();
-
+
do {
err = board->init();
if (err != DMBoard::Ok) {
@@ -26,7 +28,7 @@
err = DMBoard::MemoryError;
break;
}
-
+
// Prepare fullscreen
swim_window_open(&win,
disp->width(), disp->height(), // full size
@@ -37,19 +39,20 @@
swim_set_title(&win, "My Program", BLACK);
// Message
- swim_put_text_xy(&win, "Hello World!", 100, 100);
-
+ swim_put_text_xy(&win, "Hello World!", 100, 100);
+
// Start display in default mode (16-bit)
- Display::DisplayError disperr = disp->powerUp(fb);
+ Display::DisplayError disperr = disp->powerUp(fb);
if (disperr != Display::DisplayError_Ok) {
log->printf("Failed to initialize the display, got error %d\r\n", disperr);
break;
}
+
} while(false);
if (err != DMBoard::Ok) {
log->printf("\nTERMINATING\n");
- wait_ms(2000); // allow RtosLog to flush messages
+ thread_sleep_for(2000); // allow RtosLog to flush messages
mbed_die();
}
