1.44 tft lcd display

Dependencies:   TFT_fonts mbed-os

Fork of newTFTLCD by madhu sudhana

Revision:
2:81ed304b7e9b
Parent:
1:14bef43daf6f
diff -r 14bef43daf6f -r 81ed304b7e9b ssd.cpp
--- a/ssd.cpp	Sat Dec 01 23:49:10 2012 +0000
+++ b/ssd.cpp	Sun Dec 02 00:12:43 2012 +0000
@@ -54,51 +54,51 @@
     wait_ms( 15 );
     
     
-    writeCmdData( 0x00, 0x0001 ); wait_ms( 1 );
-    writeCmdData( 0x03, 0xA8A4 ); wait_ms( 1 );
-    writeCmdData( 0x0C, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x0D, 0x080C ); wait_ms( 1 );
-    writeCmdData( 0x0E, 0x2B00 ); wait_ms( 1 );
-    writeCmdData( 0x1E, 0x00B7 ); wait_ms( 1 );
-    writeCmdData( 0x01, 0x2B3F ); wait_ms( 1 );
-    writeCmdData( 0x02, 0x0600 ); wait_ms( 1 );
-    writeCmdData( 0x10, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x11, 0x6070 ); wait_ms( 1 );
-    writeCmdData( 0x05, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x06, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x16, 0xEF1C ); wait_ms( 1 );
-    writeCmdData( 0x17, 0x0003 ); wait_ms( 1 );
-    writeCmdData( 0x07, 0x0233 ); wait_ms( 1 );
-    writeCmdData( 0x0B, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x0F, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x41, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x42, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x48, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x49, 0x013F ); wait_ms( 1 );
-    writeCmdData( 0x4A, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x4B, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x44, 0xEF00 ); wait_ms( 1 );
-    writeCmdData( 0x45, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x46, 0x013F ); wait_ms( 1 );
-    writeCmdData( 0x30, 0x0707 ); wait_ms( 1 );
-    writeCmdData( 0x31, 0x0204 ); wait_ms( 1 );
-    writeCmdData( 0x32, 0x0204 ); wait_ms( 1 );
-    writeCmdData( 0x33, 0x0502 ); wait_ms( 1 );
-    writeCmdData( 0x34, 0x0507 ); wait_ms( 1 );
-    writeCmdData( 0x35, 0x0204 ); wait_ms( 1 );
-    writeCmdData( 0x36, 0x0204 ); wait_ms( 1 );
-    writeCmdData( 0x37, 0x0502 ); wait_ms( 1 );
-    writeCmdData( 0x3A, 0x0302 ); wait_ms( 1 );
-    writeCmdData( 0x3B, 0x0302 ); wait_ms( 1 );
-    writeCmdData( 0x23, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x24, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x25, 0x8000 ); wait_ms( 1 );
-    writeCmdData( 0x4f, 0x0000 ); wait_ms( 1 );
-    writeCmdData( 0x4e, 0x0000 ); wait_ms( 1 );
-    writeCmd( 0x22 );
+    WriteCmdData( 0x00, 0x0001 ); wait_ms( 1 );
+    WriteCmdData( 0x03, 0xA8A4 ); wait_ms( 1 );
+    WriteCmdData( 0x0C, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x0D, 0x080C ); wait_ms( 1 );
+    WriteCmdData( 0x0E, 0x2B00 ); wait_ms( 1 );
+    WriteCmdData( 0x1E, 0x00B7 ); wait_ms( 1 );
+    WriteCmdData( 0x01, 0x2B3F ); wait_ms( 1 );
+    WriteCmdData( 0x02, 0x0600 ); wait_ms( 1 );
+    WriteCmdData( 0x10, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x11, 0x6070 ); wait_ms( 1 );
+    WriteCmdData( 0x05, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x06, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x16, 0xEF1C ); wait_ms( 1 );
+    WriteCmdData( 0x17, 0x0003 ); wait_ms( 1 );
+    WriteCmdData( 0x07, 0x0233 ); wait_ms( 1 );
+    WriteCmdData( 0x0B, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x0F, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x41, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x42, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x48, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x49, 0x013F ); wait_ms( 1 );
+    WriteCmdData( 0x4A, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x4B, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x44, 0xEF00 ); wait_ms( 1 );
+    WriteCmdData( 0x45, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x46, 0x013F ); wait_ms( 1 );
+    WriteCmdData( 0x30, 0x0707 ); wait_ms( 1 );
+    WriteCmdData( 0x31, 0x0204 ); wait_ms( 1 );
+    WriteCmdData( 0x32, 0x0204 ); wait_ms( 1 );
+    WriteCmdData( 0x33, 0x0502 ); wait_ms( 1 );
+    WriteCmdData( 0x34, 0x0507 ); wait_ms( 1 );
+    WriteCmdData( 0x35, 0x0204 ); wait_ms( 1 );
+    WriteCmdData( 0x36, 0x0204 ); wait_ms( 1 );
+    WriteCmdData( 0x37, 0x0502 ); wait_ms( 1 );
+    WriteCmdData( 0x3A, 0x0302 ); wait_ms( 1 );
+    WriteCmdData( 0x3B, 0x0302 ); wait_ms( 1 );
+    WriteCmdData( 0x23, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x24, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x25, 0x8000 ); wait_ms( 1 );
+    WriteCmdData( 0x4f, 0x0000 ); wait_ms( 1 );
+    WriteCmdData( 0x4e, 0x0000 ); wait_ms( 1 );
+    WriteCmd( 0x22 );
 }
 
-void SSD1289LCD::writeCmd( unsigned short cmd )
+void SSD1289LCD::WriteCmd( unsigned short cmd )
 {
     _lcd_pin_rs = LOW;
     _lcd_pin_cs = LOW;
@@ -107,7 +107,7 @@
     _lcd_pin_cs = HIGH;
 }
 
-void SSD1289LCD::writeData( unsigned short data )
+void SSD1289LCD::WriteData( unsigned short data )
 {
     _lcd_pin_rs = HIGH;
     _lcd_pin_cs = LOW;
@@ -116,7 +116,7 @@
     _lcd_pin_cs = HIGH;
 }
 
-void SSD1289LCD::setXY( uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2 )
+void SSD1289LCD::SetXY( uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2 )
 {
     if ( _orientation == LANDSCAPE )
     {
@@ -127,10 +127,10 @@
         swap( uint16_t, y1, y2 )
     }
 
-    writeCmdData( 0x44, ( x2 << 8 ) + x1 );
-    writeCmdData( 0x45, y1 );
-    writeCmdData( 0x46, y2 );
-    writeCmdData( 0x4e, x1 );
-    writeCmdData( 0x4f, y1 );
-    writeCmd( 0x22 );
+    WriteCmdData( 0x44, ( x2 << 8 ) + x1 );
+    WriteCmdData( 0x45, y1 );
+    WriteCmdData( 0x46, y2 );
+    WriteCmdData( 0x4e, x1 );
+    WriteCmdData( 0x4f, y1 );
+    WriteCmd( 0x22 );
 }