A basic graphics package for the LPC4088 Display Module.
Dependents: lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more
Fork of DMBasicGUI by
Application/AppTouchCalibration.h@1:46c8df4608c8, 2014-12-11 (annotated)
- Committer:
- embeddedartists
- Date:
- Thu Dec 11 18:15:52 2014 +0000
- Revision:
- 1:46c8df4608c8
- Parent:
- 0:4977187e90c7
- Child:
- 10:651861441108
Updated documentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 1:46c8df4608c8 | 1 | /* |
embeddedartists | 1:46c8df4608c8 | 2 | * Copyright 2014 Embedded Artists AB |
embeddedartists | 1:46c8df4608c8 | 3 | * |
embeddedartists | 1:46c8df4608c8 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
embeddedartists | 1:46c8df4608c8 | 5 | * you may not use this file except in compliance with the License. |
embeddedartists | 1:46c8df4608c8 | 6 | * You may obtain a copy of the License at |
embeddedartists | 1:46c8df4608c8 | 7 | * |
embeddedartists | 1:46c8df4608c8 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
embeddedartists | 1:46c8df4608c8 | 9 | * |
embeddedartists | 1:46c8df4608c8 | 10 | * Unless required by applicable law or agreed to in writing, software |
embeddedartists | 1:46c8df4608c8 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
embeddedartists | 1:46c8df4608c8 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
embeddedartists | 1:46c8df4608c8 | 13 | * See the License for the specific language governing permissions and |
embeddedartists | 1:46c8df4608c8 | 14 | * limitations under the License. |
embeddedartists | 1:46c8df4608c8 | 15 | */ |
embeddedartists | 1:46c8df4608c8 | 16 | |
embeddedartists | 0:4977187e90c7 | 17 | #ifndef APP_TOUCHCALIBRATION_H |
embeddedartists | 0:4977187e90c7 | 18 | #define APP_TOUCHCALIBRATION_H |
embeddedartists | 0:4977187e90c7 | 19 | |
embeddedartists | 0:4977187e90c7 | 20 | #include "App.h" |
embeddedartists | 0:4977187e90c7 | 21 | #include "DMBoard.h" |
embeddedartists | 0:4977187e90c7 | 22 | #include "lpc_swim.h" |
embeddedartists | 0:4977187e90c7 | 23 | #include "Button.h" |
embeddedartists | 0:4977187e90c7 | 24 | |
embeddedartists | 0:4977187e90c7 | 25 | /** |
embeddedartists | 1:46c8df4608c8 | 26 | * An App example. Guides the user throug the steps needed to (re)calibrate the |
embeddedartists | 1:46c8df4608c8 | 27 | * touch controller. After the user presses each of the four corner for calibration |
embeddedartists | 1:46c8df4608c8 | 28 | * the program turns into a very simple drawing application until the Done button |
embeddedartists | 1:46c8df4608c8 | 29 | * is pressed. |
embeddedartists | 0:4977187e90c7 | 30 | * |
embeddedartists | 1:46c8df4608c8 | 31 | * The purpose of this example is to show how to (re)calibrate the touch controller |
embeddedartists | 1:46c8df4608c8 | 32 | * if that is ever needed. |
embeddedartists | 0:4977187e90c7 | 33 | */ |
embeddedartists | 0:4977187e90c7 | 34 | class AppTouchCalibration : public App { |
embeddedartists | 0:4977187e90c7 | 35 | public: |
embeddedartists | 0:4977187e90c7 | 36 | |
embeddedartists | 0:4977187e90c7 | 37 | AppTouchCalibration(); |
embeddedartists | 0:4977187e90c7 | 38 | ~AppTouchCalibration(); |
embeddedartists | 0:4977187e90c7 | 39 | |
embeddedartists | 0:4977187e90c7 | 40 | virtual bool setup(); |
embeddedartists | 0:4977187e90c7 | 41 | virtual void runToCompletion(); |
embeddedartists | 0:4977187e90c7 | 42 | virtual bool teardown(); |
embeddedartists | 0:4977187e90c7 | 43 | |
embeddedartists | 0:4977187e90c7 | 44 | private: |
embeddedartists | 0:4977187e90c7 | 45 | Display* _disp; |
embeddedartists | 0:4977187e90c7 | 46 | TouchPanel* _touch; |
embeddedartists | 0:4977187e90c7 | 47 | SWIM_WINDOW_T* _win; |
embeddedartists | 0:4977187e90c7 | 48 | SWIM_WINDOW_T* _msg; |
embeddedartists | 0:4977187e90c7 | 49 | void* _fb; |
embeddedartists | 0:4977187e90c7 | 50 | Button* _btn; |
embeddedartists | 0:4977187e90c7 | 51 | |
embeddedartists | 0:4977187e90c7 | 52 | void draw(); |
embeddedartists | 0:4977187e90c7 | 53 | void drawMarker(uint16_t x, uint16_t y, bool erase); |
embeddedartists | 0:4977187e90c7 | 54 | bool calibrate(); |
embeddedartists | 0:4977187e90c7 | 55 | void showStatus(const char* message, int line=0); |
embeddedartists | 0:4977187e90c7 | 56 | }; |
embeddedartists | 0:4977187e90c7 | 57 | |
embeddedartists | 0:4977187e90c7 | 58 | #endif |