Example using the application launcher.
Dependencies: DMBasicGUI DMSupport
Example use of the AppLauncher class in the DMBasicGUI library.
This project is used in the TBD
guide as a starting point when creating your own menu system. It can also 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:
If you click on the Something button:
Diff: main.cpp
- Revision:
- 4:7a016403f7fd
- Parent:
- 1:2b9c48157f2d
--- a/main.cpp Tue Apr 28 11:56:04 2015 +0000 +++ b/main.cpp Mon Nov 04 15:12:28 2019 +0000 @@ -50,7 +50,7 @@ return a; } -void guiTask(void const* args) +void guiTask(void) { RtosLog* log = DMBoard::instance().logger(); @@ -87,18 +87,19 @@ err = board->init(); if (err != DMBoard::Ok) { log->printf("Failed to initialize the board, got error %d\r\n", err); - wait_ms(2000); // allow RtosLog to flush messages + ThisThread::sleep_for(2000); // allow RtosLog to flush messages mbed_die(); } log->printf("\n\n---\nApplication Launcher Example\nBuilt: " __DATE__ " at " __TIME__ "\n\n"); - Thread tGui(guiTask, NULL, osPriorityNormal, 8192); + Thread tGui(osPriorityNormal, 8192); + tGui.start(guiTask); while(1) { // Wait forever (in 1h increments) to prevent the tGui // thread from being garbage collected. - Thread::wait(3600*1000); + ThisThread::sleep_for(3600*1000); } }