madhu sudhana
/
DL144128_LCD_b
output
Fork of display by
main.cpp@1:b64c81071d96, 2015-02-28 (annotated)
- Committer:
- rs27
- Date:
- Sat Feb 28 20:26:45 2015 +0000
- Revision:
- 1:b64c81071d96
- Parent:
- 0:c0be4e018a09
- Child:
- 2:e7a5b9bc75b4
TFT
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
morita | 0:c0be4e018a09 | 1 | /** |
morita | 0:c0be4e018a09 | 2 | * @file main.c |
morita | 0:c0be4e018a09 | 3 | * @brief ILI9163/DL144128TF 128x128 TFT LCD Test code |
morita | 0:c0be4e018a09 | 4 | * |
morita | 0:c0be4e018a09 | 5 | * This program is free software: you can redistribute it and/or modify |
morita | 0:c0be4e018a09 | 6 | * it under the terms of the GNU General Public License as published by |
morita | 0:c0be4e018a09 | 7 | * the Free Software Foundation, either version 3 of the License, or |
morita | 0:c0be4e018a09 | 8 | * (at your option) any later version. |
morita | 0:c0be4e018a09 | 9 | * |
morita | 0:c0be4e018a09 | 10 | * This program is distributed in the hope that it will be useful, |
morita | 0:c0be4e018a09 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
morita | 0:c0be4e018a09 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
morita | 0:c0be4e018a09 | 13 | * GNU General Public License for more details. |
morita | 0:c0be4e018a09 | 14 | * |
morita | 0:c0be4e018a09 | 15 | * You should have received a copy of the GNU General Public License |
morita | 0:c0be4e018a09 | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
morita | 0:c0be4e018a09 | 17 | * |
morita | 0:c0be4e018a09 | 18 | * @author Jun Morita (iccraft) |
morita | 0:c0be4e018a09 | 19 | * |
morita | 0:c0be4e018a09 | 20 | * @copyright Copyright (C) 2012 Simon Inns |
morita | 0:c0be4e018a09 | 21 | * @author Simon Inns <simon.inns@gmail.com> |
morita | 0:c0be4e018a09 | 22 | */ |
morita | 0:c0be4e018a09 | 23 | |
morita | 0:c0be4e018a09 | 24 | #include "mbed.h" |
morita | 0:c0be4e018a09 | 25 | #include "ili9163lcd.h" |
morita | 0:c0be4e018a09 | 26 | |
rs27 | 1:b64c81071d96 | 27 | ILI9163 TFT(D2,D3,D4,D5,D6); |
morita | 0:c0be4e018a09 | 28 | |
morita | 0:c0be4e018a09 | 29 | int main() |
morita | 0:c0be4e018a09 | 30 | { |
rs27 | 1:b64c81071d96 | 31 | |
rs27 | 1:b64c81071d96 | 32 | TFT.lcdInitialise(LCD_ORIENTATION2); |
morita | 0:c0be4e018a09 | 33 | |
rs27 | 1:b64c81071d96 | 34 | TFT.lcdClearDisplay(Black); |
morita | 0:c0be4e018a09 | 35 | |
rs27 | 1:b64c81071d96 | 36 | TFT.lcdLine(0, 0, 127, 127, White); |
rs27 | 1:b64c81071d96 | 37 | TFT.lcdLine(0, 127, 127, 0, White); |
rs27 | 1:b64c81071d96 | 38 | TFT.lcdCircle(64, 64, 32, Red); |
rs27 | 1:b64c81071d96 | 39 | TFT.lcdCircle(64, 64, 40, Blue); |
rs27 | 1:b64c81071d96 | 40 | TFT.lcdCircle(64, 64, 48, Green); |
morita | 0:c0be4e018a09 | 41 | |
rs27 | 1:b64c81071d96 | 42 | TFT.lcdFilledRectangle(62, 62, 65, 65, Green); |
morita | 0:c0be4e018a09 | 43 | |
rs27 | 1:b64c81071d96 | 44 | TFT.set_font((unsigned char*)font11x16); |
rs27 | 1:b64c81071d96 | 45 | TFT.lcdPutS("Hallo", TFT.lcdTextX(2), TFT.lcdTextY(0),Black, White); |
rs27 | 1:b64c81071d96 | 46 | //TFT.lcdPutS("Hello World!", TFT.lcdTextX(4), TFT.lcdTextY(0), Blue, Cyan); // Vordergund, Hintergrund |
morita | 0:c0be4e018a09 | 47 | |
rs27 | 1:b64c81071d96 | 48 | TFT.set_font((unsigned char*)font5x8); |
rs27 | 1:b64c81071d96 | 49 | TFT.lcdPutS("The quick brown fox jumped over the lazy dog 0123456789", TFT.lcdTextX(0), TFT.lcdTextY(4), Black, Magenta); |
rs27 | 1:b64c81071d96 | 50 | |
rs27 | 1:b64c81071d96 | 51 | |
morita | 0:c0be4e018a09 | 52 | while(1) |
morita | 0:c0be4e018a09 | 53 | { |
rs27 | 1:b64c81071d96 | 54 | |
morita | 0:c0be4e018a09 | 55 | } |
morita | 0:c0be4e018a09 | 56 | } |