Fast! Install BurstSPI library! https://os.mbed.com/users/peekpt/code/BurstSPI/ New display (greentab2 blue module compact).
Diff: Adafruit_ST7735.h
- Revision:
- 8:66c5dc727281
- Parent:
- 7:856a3443f68d
--- a/Adafruit_ST7735.h Mon Apr 20 18:17:52 2020 +0000 +++ b/Adafruit_ST7735.h Fri Apr 24 11:14:56 2020 +0000 @@ -16,16 +16,16 @@ MIT license, all text above must be included in any redistribution ****************************************************/ - - // + GREENTAB2 display +// + GREENTAB2 display +// BurstSPI #ifndef _ADAFRUIT_ST7735H_ #define _ADAFRUIT_ST7735H_ #include "Adafruit_GFX.h" +#include "BurstSPI.h" #include "mbed.h" - #define boolean bool // some flags for initR() :( @@ -102,6 +102,7 @@ #define ST7735_MAGENTA 0xF81F #define ST7735_YELLOW 0xFFE0 #define ST7735_WHITE 0xFFFF +#define ST7735_ORANGE 0xFC00 class Adafruit_ST7735 : public Adafruit_GFX { @@ -131,10 +132,10 @@ uint8_t colstart, rowstart; // some displays need this changed - SPI lcdPort; // does SPI MOSI, MISO and SCK - DigitalOut _cs; // does SPI CE - DigitalOut _rs; // register/date select - DigitalOut _rst; // does 3310 LCD_RST + BurstSPI lcdPort; // does SPI MOSI, MISO and SCK + DigitalOut _cs; // does SPI CE + DigitalOut _rs; // register/date select + DigitalOut _rst; // does 3310 LCD_RST }; -#endif +#endif \ No newline at end of file