madhu sudhana
/
DL144128_LCD_b
output
Fork of display by
main.cpp
- Committer:
- madhusudhana
- Date:
- 2018-06-13
- Revision:
- 2:e7a5b9bc75b4
- Parent:
- 1:b64c81071d96
- Child:
- 3:7d97b4f535c6
File content as of revision 2:e7a5b9bc75b4:
/** * @file main.c * @brief ILI9163/DL144128TF 128x128 TFT LCD Test code * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * @author Jun Morita (iccraft) * * @copyright Copyright (C) 2012 Simon Inns * @author Simon Inns <simon.inns@gmail.com> */ #include "mbed.h" #include "ili9163lcd.h" #include "stdint.h" ILI9163 TFT(D2,D3,D4,D5,D6); int main() { while(1) { int X=DarkGreen; TFT.lcdInitialise(LCD_ORIENTATION0); TFT.lcdClearDisplay(X); wait_ms(300); TFT.lcdLine(0, 0, 127, 127, Red); wait_ms(300); TFT.lcdLine(0, 127, 127, 0, Red); wait_ms(300); TFT.lcdCircle(64, 64, 32, Red); wait_ms(300); TFT.lcdCircle(64, 64, 40, Blue); wait_ms(300); TFT.lcdCircle(64, 64, 48, Green); wait_ms(300); TFT.lcdFilledRectangle(12,12,120,120,Green); TFT.lcdFilledRectangle(62, 62, 65, 65, Green); wait_ms(300); TFT.lcdClearDisplay(X); TFT.set_font((unsigned char*)font11x16); TFT.lcdPutS("SENSESEMI", TFT.lcdTextX(1), TFT.lcdTextY(2),White,Blue); //TFT.lcdPutS("Hello World!", TFT.lcdTextX(4), TFT.lcdTextY(0), Blue, Cyan); // Vordergund, Hintergrund wait_ms(300); TFT.set_font((unsigned char*)font12x12); TFT.lcdClearDisplay(X); TFT.lcdPutS("The quick brown fox jumped over the lazy dog 0123456789", TFT.lcdTextX(0), TFT.lcdTextY(4), White, Red); wait_ms(300); TFT.lcdClearDisplay(X); TFT.lcdPutS("BP=120 ECG=78 SUGAR=80", TFT.lcdTextX(2), TFT.lcdTextY(4), White, Red); wait_ms(300); TFT.lcdInitialise(LCD_ORIENTATION1); TFT.set_font((unsigned char*)font12x12); TFT.lcdClearDisplay(White); TFT.lcdPutS("The quick brown fox jumped over the lazy dog 0123456789", TFT.lcdTextX(0), TFT.lcdTextY(4), White, Red); wait_ms(300); TFT.lcdClearDisplay(White); TFT.lcdPutS("BP=120 ECG=78 SUGAR=80", TFT.lcdTextX(2), TFT.lcdTextY(4), White, Red); wait_ms(300); TFT.lcdClearDisplay(White); TFT.lcdInitialise(LCD_ORIENTATION2); TFT.set_font((unsigned char*)font12x12); TFT.lcdClearDisplay(White); wait_ms(300); TFT.lcdPutS("The quick brown fox jumped over the lazy dog 0123456789", TFT.lcdTextX(0), TFT.lcdTextY(4), White, Red); wait_ms(300); TFT.lcdClearDisplay(White); TFT.lcdPutS("BP=120 ECG=78 SUGAR=80", TFT.lcdTextX(2), TFT.lcdTextY(4), White, Red); wait_ms(300); TFT.lcdClearDisplay(White); TFT.lcdInitialise(LCD_ORIENTATION3); TFT.set_font((unsigned char*)font12x12); TFT.lcdClearDisplay(White); wait_ms(300); TFT.lcdPutS("The quick brown fox jumped over the lazy dog 0123456789", TFT.lcdTextX(0), TFT.lcdTextY(4), White,Red); wait_ms(300); TFT.lcdClearDisplay(White); TFT.lcdPutS("BP=120 ECG=78 SUGAR=80", TFT.lcdTextX(2), TFT.lcdTextY(4), White, Red); wait_ms(300); TFT.lcdClearDisplay(White); wait_ms(300); // TFT.lcdWriteData(NXP_whole_bmp[i], NXP_whole_bmp[i+1]);// for bit mapping } }