Code to run the cheap 2.4" TFT made by mcufriend.com on the STM nucleo. No modifications required, this plugs into the arduino header.

Dependents:   ST7735_V2_STM32F407

Fork of TFTLCD_8bit by Thiha Electronics

Revision:
15:af3cd35886fb
Parent:
14:8efbe7361dae
Child:
20:4bdca8d8dadc
--- a/st7735.cpp	Tue Dec 11 20:52:22 2012 +0000
+++ b/st7735.cpp	Tue Dec 11 23:42:47 2012 +0000
@@ -237,7 +237,7 @@
         unsigned short clr = ( ( ( ( r ) & 0xF8 ) | ( ( g ) >> 5 ) ) << 8 ) | ( ( ( ( g ) & 0x1C ) << 3 ) | ( ( b ) >> 3 ) );
         WriteData( clr );
     }
-    else
+    else if ( _colorDepth == RGB18 )
     {
         WriteByteData( r & 0xFC );
         WriteByteData( g & 0xFC );