LCD TFT for ssd0139 driver 8 bit mode - using portout for max speed

Dependents:   TFT_CJS_ssd01399_portver_prettyfont TFT_CJS_ssd01399_portver_prettyfont snake_main_game ServerLatest

Fork of LCDTFT_ssd01399 by chris stevens

Revision:
2:ebedda77b33b
Parent:
1:1085b6177f6e
Child:
4:1c2f9e3b9b12
--- a/LCDTFT.h	Tue Mar 15 01:47:35 2011 +0000
+++ b/LCDTFT.h	Tue Sep 02 09:02:18 2014 +0000
@@ -14,8 +14,8 @@
 ////                                                                   ////
 ////                                                                   ////
 ////        (C) Copyright 2011 www.micros-designs.com.ar               ////
-//// Este código puede ser usado, modificado y distribuido libremente  ////
-//// sin eliminar esta cabecera y  sin garantía de ningún tipo.        ////
+//// Este c�digo puede ser usado, modificado y distribuido libremente  ////
+//// sin eliminar esta cabecera y  sin garant�a de ning�n tipo.        ////
 ////                                                                   ////
 ////                                                                   ////
 /////////////////////////////////////////////////////////////////////////// 
@@ -68,7 +68,7 @@
 #define    ColorLime            0x7e0
 #define    ColorAqua            0x7ff
 
-#define       LCD_X_MAX            240
+#define       LCD_X_MAX            240 // these swapped
 #define       LCD_Y_MAX            320
 
 class LCDTFT: public Stream {
@@ -84,9 +84,9 @@
          */
         LCDTFT(PinName PIN_RD,PinName PIN_WR,PinName PIN_RS,PinName PIN_CS,PinName PIN_RESET, BusOut *BUSLCD);
         /** Inicializa LCD
-        *
+        * format =0 portrait and 1 for landscape
         */
-        void vLCDTFTInit(void);
+        void vLCDTFTInit(bool format);
         /** Fija parametros para escritura mediante printf
         *
         * @param Xo X inicial
@@ -95,8 +95,9 @@
         * @param Xmax X maximo
         * @param Alto Alto de letra (1,2,3..)
         * @param Color Color de letra 16-bits
+        * and the background color for clearing
         */
-        void vLCDTFTSetParametersPrintf(unsigned short Xo,unsigned short Yo,unsigned short Xmin,unsigned short Xmax,unsigned char Alto, unsigned short Color);
+        void vLCDTFTSetParametersPrintf(unsigned short Xo,unsigned short Yo,unsigned short Xmin,unsigned short Xmax,unsigned char Alto, unsigned short Color, unsigned short BackColor);
         /** Pinta pantalla completa de color
         * @param Color Color de 16-bits
         */
@@ -115,7 +116,7 @@
         * @param Alto Alto de letra (1,2,3)
         * @param Color Color de 16-bits
         */
-        void vLCDTFTText(unsigned short x,unsigned short y,const char *PtrText,const char (*Fuente)[5],unsigned char Alto,unsigned short Color);
+        void vLCDTFTText(unsigned short x,unsigned short y,const char *PtrText,const char (*Fuente)[5],unsigned char Alto,unsigned short Color,unsigned short BackColor);
         
         void vLCDTFTLine(unsigned short x1,unsigned short y1,unsigned short x2,unsigned short y2,unsigned short Color);
         void vLCDTFTRectangle(unsigned short x1,unsigned short y1,unsigned short x2,unsigned short y2,bool Filled,unsigned short Color);
@@ -143,7 +144,7 @@
     private:
         DigitalOut LCD_PIN_RD,LCD_PIN_WR,LCD_PIN_RS,LCD_PIN_CS,LCD_PIN_RESET;    
         BusOut *LCD_PORT;    
-        unsigned short X,Y,X_min,X_max,_Alto,_Color;
+        unsigned short X,Y,X_min,X_max,_Alto,_Color,_Background;
         // Stream implementation functions
         virtual int _putc(int value);
         virtual int _getc();