uLCD

Dependencies:   4DGL-uLCD-SE mbed

Fork of uLCD144G2_demo by jim hamblen

Committer:
4180_1
Date:
Mon Nov 11 01:33:12 2013 +0000
Revision:
2:75727e89a717
Parent:
1:38ef731c7bdf
Child:
3:454d1f4c8fd7
Ver 1.0 Demo for the uLCD144-G2 display using the 4DGL library with modifications.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
4180_1 0:cfcf73272647 1 //
4180_1 0:cfcf73272647 2 // TFT_4DGL is a class to drive 4D Systems TFT touch screens
4180_1 0:cfcf73272647 3 //
4180_1 0:cfcf73272647 4 // Copyright (C) <2010> Stephane ROCHON <stephane.rochon at free.fr>
4180_1 0:cfcf73272647 5 //
4180_1 0:cfcf73272647 6 // TFT_4DGL is free software: you can redistribute it and/or modify
4180_1 0:cfcf73272647 7 // it under the terms of the GNU General Public License as published by
4180_1 0:cfcf73272647 8 // the Free Software Foundation, either version 3 of the License, or
4180_1 0:cfcf73272647 9 // (at your option) any later version.
4180_1 0:cfcf73272647 10 //
4180_1 0:cfcf73272647 11 // TFT_4DGL is distributed in the hope that it will be useful,
4180_1 0:cfcf73272647 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
4180_1 0:cfcf73272647 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4180_1 0:cfcf73272647 14 // GNU General Public License for more details.
4180_1 0:cfcf73272647 15 //
4180_1 0:cfcf73272647 16 // You should have received a copy of the GNU General Public License
4180_1 0:cfcf73272647 17 // along with TFT_4DGL. If not, see <http://www.gnu.org/licenses/>.
4180_1 0:cfcf73272647 18
4180_1 0:cfcf73272647 19 #include "mbed.h"
4180_1 2:75727e89a717 20 #include "uLCD_4DGL.h"
4180_1 0:cfcf73272647 21
4180_1 2:75727e89a717 22 #define SIZE_X 128
4180_1 2:75727e89a717 23 #define SIZE_Y 128
4180_1 1:38ef731c7bdf 24 //
4180_1 1:38ef731c7bdf 25
4180_1 2:75727e89a717 26 uLCD_4DGL uLCD(p9,p10,p11); // serial tx, serial rx, reset pin;
4180_1 0:cfcf73272647 27
4180_1 2:75727e89a717 28 int main()
4180_1 2:75727e89a717 29 {
4180_1 1:38ef731c7bdf 30
4180_1 2:75727e89a717 31 uLCD.baudrate(115200);
4180_1 2:75727e89a717 32 uLCD.background_color(DGREY);
4180_1 2:75727e89a717 33 uLCD.circle(60, 50, 30, 0xFF00FF);
4180_1 2:75727e89a717 34 uLCD.triangle(120, 100, 40, 40, 10, 100, 0x0000FF);
4180_1 2:75727e89a717 35 uLCD.line(0, 0, 80, 60, 0xFF0000);
4180_1 2:75727e89a717 36 uLCD.rectangle(50, 50, 100, 90, 0x00FF00);
4180_1 2:75727e89a717 37 uLCD.pixel(60, 60, BLACK);
4180_1 2:75727e89a717 38 uLCD.read_pixel(120, 70);
4180_1 2:75727e89a717 39 uLCD.circle(120, 60, 10, BLACK);
4180_1 2:75727e89a717 40 uLCD.set_font(FONT_8X8);
4180_1 2:75727e89a717 41 uLCD.text_mode(TRANSPARENT);
4180_1 2:75727e89a717 42 uLCD.text_char('B', 9, 8, BLACK);
4180_1 2:75727e89a717 43 uLCD.text_char('I',10, 8, BLACK);
4180_1 2:75727e89a717 44 uLCD.text_char('G',11, 8, BLACK);
4180_1 2:75727e89a717 45 uLCD.text_string("This is a test of string", 1, 14, FONT_5X7, WHITE);
4180_1 0:cfcf73272647 46
4180_1 2:75727e89a717 47 }