Port of the LPC4088 QSB EA LCD Sphere Demo to the LPC4088 DM using the DMSupport lib. Dropping the QSB EALib
Dependencies: DMBasicGUI DMSupport
Fork of lpc4088_displaymodule_hello_world by
Just a quick hack to get something good looking on the LPC4088DM
/media/uploads/tecnosys/lpc4088dm.jpg
Diff: main.cpp
- Revision:
- 5:d2f1c9185c5b
- Parent:
- 0:8ef5f57e33dc
--- a/main.cpp Fri Mar 20 14:22:33 2015 +0000 +++ b/main.cpp Wed Apr 29 05:34:03 2015 +0000 @@ -1,14 +1,19 @@ #include "mbed.h" #include "DMBoard.h" -#include "lpc_swim.h" -#include "lpc_swim_font.h" +//#include "lpc_swim.h" +//#include "lpc_swim_font.h" +#include "SphereDemo.h" + +bool abortTest; int main() { + DMBoard::BoardError err; DMBoard* board = &DMBoard::instance(); RtosLog* log = board->logger(); Display* disp = board->display(); + abortTest=false; do { err = board->init(); @@ -17,9 +22,9 @@ break; } - log->printf("\n\nHello World!\n\n"); + //log->printf("\n\nHello World!\n\n"); - SWIM_WINDOW_T win; + // SWIM_WINDOW_T win; void* fb = disp->allocateFramebuffer(); if (fb == NULL) { log->printf("Failed to allocate memory for a frame buffer\r\n"); @@ -27,24 +32,23 @@ break; } - // Prepare fullscreen - swim_window_open(&win, - disp->width(), disp->height(), // full size - (COLOR_T*)fb, - 0,0,disp->width()-1, disp->height()-1, // window position and size - 1, // border - WHITE, BLUE, BLACK); // colors: pen, backgr, forgr - swim_set_title(&win, "My Program", BLACK); - - // Message - swim_put_text_xy(&win, "Hello World!", 100, 100); - + // Start display in default mode (16-bit) 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; } + + +//memset((void*)fb, 0x0, lcdCfg.width*lcdCfg.height*2 *3); + + SphereDemo sphereDemo(fb, disp->width(), disp->height());//(uint8_t *)frameBuf1 + while (1) { + sphereDemo.run(750, 50); + //.RESET_FLAG; + } + } while(false); if (err != DMBoard::Ok) {