SPI based library for the ST7735 LCD controller.

Dependents:   RayCastingEngine RETRO_LCD_PerformanceTest RETRO_loop_test RETRO_RickGame ... more

Revision:
7:f39c980a589c
Parent:
5:21c987ee68d2
Child:
8:12f16befa7e1
--- a/LCD_ST7735.h	Sun Oct 05 22:26:57 2014 +0000
+++ b/LCD_ST7735.h	Sun Oct 05 23:57:36 2014 +0000
@@ -190,6 +190,7 @@
         void drawString(const uint8_t *pFont, int x, int y, const char *pString);    
         
     private:
+        void setPixelFast(int x, int y, uint16_t color);
         void drawVertLine(int x1, int y1, int y2, uint16_t color);
         void drawHorizLine(int x1, int y1, int x2, uint16_t color);
         void drawChar(const uint8_t *pFont, int x, int y, char c);
@@ -233,6 +234,13 @@
                 {
                 }
                 
+                void prepareFastSPI()
+                {
+                    #ifdef TARGET_LPC11U24
+                    aquire();
+                    #endif
+                }
+                
                 void waitWhileBusy()
                 {
                     #ifdef TARGET_LPC11U24
@@ -241,7 +249,7 @@
                 }
                 
                 void fastWrite(uint8_t data)
-                {                    
+                {       
                     #ifdef TARGET_LPC11U24
                         while (((_spi.spi->SR) & 0x01) == 0);
                         _spi.spi->DR = data;
@@ -251,7 +259,7 @@
                 }       
                 
                 void clearRx()
-                {
+                { 
                     #ifdef TARGET_LPC11U24
                         while (((_spi.spi->SR) & 0x14) != 0)
                         {