Graphical demo for the LPC4088 Experiment Base Board with one of the Display Expansion Kits. This demo shows a number of bubbles bouncing around.

Dependencies:   EALib mbed

Committer:
embeddedartists
Date:
Fri Oct 03 13:09:11 2014 +0000
Revision:
0:4839ec6c350d
First version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
embeddedartists 0:4839ec6c350d 1 /*
embeddedartists 0:4839ec6c350d 2 * Copyright 2013 Embedded Artists AB
embeddedartists 0:4839ec6c350d 3 *
embeddedartists 0:4839ec6c350d 4 * Licensed under the Apache License, Version 2.0 (the "License");
embeddedartists 0:4839ec6c350d 5 * you may not use this file except in compliance with the License.
embeddedartists 0:4839ec6c350d 6 * You may obtain a copy of the License at
embeddedartists 0:4839ec6c350d 7 *
embeddedartists 0:4839ec6c350d 8 * http://www.apache.org/licenses/LICENSE-2.0
embeddedartists 0:4839ec6c350d 9 *
embeddedartists 0:4839ec6c350d 10 * Unless required by applicable law or agreed to in writing, software
embeddedartists 0:4839ec6c350d 11 * distributed under the License is distributed on an "AS IS" BASIS,
embeddedartists 0:4839ec6c350d 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
embeddedartists 0:4839ec6c350d 13 * See the License for the specific language governing permissions and
embeddedartists 0:4839ec6c350d 14 * limitations under the License.
embeddedartists 0:4839ec6c350d 15 */
embeddedartists 0:4839ec6c350d 16
embeddedartists 0:4839ec6c350d 17 #ifndef TESTDISPLAY_H
embeddedartists 0:4839ec6c350d 18 #define TESTDISPLAY_H
embeddedartists 0:4839ec6c350d 19
embeddedartists 0:4839ec6c350d 20 #include "AR1021I2C.h"
embeddedartists 0:4839ec6c350d 21 #include "Graphics.h"
embeddedartists 0:4839ec6c350d 22 #include "LcdController.h"
embeddedartists 0:4839ec6c350d 23 #include "EaLcdBoardGPIO.h"
embeddedartists 0:4839ec6c350d 24
embeddedartists 0:4839ec6c350d 25 /**
embeddedartists 0:4839ec6c350d 26 * Test the display connected with a FPC cable to the LPC4088 Experiment Base Board
embeddedartists 0:4839ec6c350d 27 * as well as the AR1021 touch sensor on the board.
embeddedartists 0:4839ec6c350d 28 */
embeddedartists 0:4839ec6c350d 29 class TestDisplay {
embeddedartists 0:4839ec6c350d 30 public:
embeddedartists 0:4839ec6c350d 31 enum WhichDisplay {
embeddedartists 0:4839ec6c350d 32 TFT_5, // 5" display
embeddedartists 0:4839ec6c350d 33 TFT_4_3, // 4.3" display
embeddedartists 0:4839ec6c350d 34 };
embeddedartists 0:4839ec6c350d 35
embeddedartists 0:4839ec6c350d 36 /**
embeddedartists 0:4839ec6c350d 37 * Create an interface to the display
embeddedartists 0:4839ec6c350d 38 */
embeddedartists 0:4839ec6c350d 39 TestDisplay(WhichDisplay which);
embeddedartists 0:4839ec6c350d 40 ~TestDisplay();
embeddedartists 0:4839ec6c350d 41
embeddedartists 0:4839ec6c350d 42 /**
embeddedartists 0:4839ec6c350d 43 * Test the display
embeddedartists 0:4839ec6c350d 44 *
embeddedartists 0:4839ec6c350d 45 * @return true if the test was successful; otherwise false
embeddedartists 0:4839ec6c350d 46 */
embeddedartists 0:4839ec6c350d 47 bool runTest();
embeddedartists 0:4839ec6c350d 48
embeddedartists 0:4839ec6c350d 49 private:
embeddedartists 0:4839ec6c350d 50
embeddedartists 0:4839ec6c350d 51 void calibrate_drawMarker(Graphics &g, uint16_t x, uint16_t y, bool erase);
embeddedartists 0:4839ec6c350d 52 bool calibrate_display();
embeddedartists 0:4839ec6c350d 53
embeddedartists 0:4839ec6c350d 54 char* _initStr;
embeddedartists 0:4839ec6c350d 55 LcdController::Config* _lcdCfg;
embeddedartists 0:4839ec6c350d 56 EaLcdBoardGPIO _lcdBoard;
embeddedartists 0:4839ec6c350d 57 AR1021I2C _touch;
embeddedartists 0:4839ec6c350d 58
embeddedartists 0:4839ec6c350d 59 uint32_t _framebuffer;
embeddedartists 0:4839ec6c350d 60 };
embeddedartists 0:4839ec6c350d 61
embeddedartists 0:4839ec6c350d 62 #endif
embeddedartists 0:4839ec6c350d 63