Rune Langoy / Mbed 2 deprecated Nucleo_LCD_mcufriend_test

Dependencies:   mbed mcufriend_24_tft_lcd

Files at this revision

API Documentation at this revision

Comitter:
rlanghbv
Date:
Wed Nov 09 09:33:16 2016 +0000
Child:
1:9de6885fce8f
Commit message:
first commit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
moremcu_24_tft_lcd.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Nov 09 09:33:16 2016 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+#include "ili9328.h"
+
+// prepare the data bus for writing commands and pixel data
+BusOut dataBus( D8, D9, D2, D3, D4, D5, D6, D7 ); // 8 pins
+// create the lcd instance
+ILI9328_LCD lcd( A3,  A4, A2,A1, &dataBus, NC, A0); // control pins and data bus
+//ILI9328_LCD(  CS,  RESET,  RS, WR, BusOut* DATA_PORT, PinName BL = NC,  RD );
+   
+int main()
+{
+    int ii,height,width;
+    
+    height = lcd.GetHeight();
+    width =  lcd.GetWidth();
+    // initialize display - place it in standard portrait mode and set background to black and
+    //                      foreground to white color.
+    lcd.Initialize();
+
+    // print something on the screen
+    lcd.Print( "Hello, World!", CENTER, 50); // align text to center horizontally and use starndard colors
+ 
+    wait(2);
+   
+    lcd.ClearScreen();
+ 
+    for(ii=0;ii<width;ii++)
+    {
+        lcd.DrawLine(0, 0, height, ii,COLOR_GREEN);
+        ii = ii+10;    
+    }
+    wait(2);
+ 
+    lcd.DrawCircle(height/4, width/4, 20, COLOR_GREEN);
+    wait(2);
+ 
+    lcd.FillCircle(height/2, width/2, 50, COLOR_GREEN);
+    wait(2);
+ 
+    lcd.FillTriangle(height/4, width/4,(height/4)+20, (width/4)+40,(height/4)-20, (width/4)+40, COLOR_RED);
+ 
+    while ( 1 ) { }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Nov 09 09:33:16 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/moremcu_24_tft_lcd.lib	Wed Nov 09 09:33:16 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/cdtsilva/code/24_TFT_STMNUCLEO/#ede1a0a32e04