2020-08-17 20:47:05 +00:00
|
|
|
#include "configuration.h"
|
|
|
|
|
2020-08-17 21:06:31 +00:00
|
|
|
#ifdef ST7735_CS
|
|
|
|
|
2020-08-17 20:47:05 +00:00
|
|
|
#include <SPI.h>
|
|
|
|
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip
|
|
|
|
|
|
|
|
TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
|
|
|
|
|
|
|
|
void TFTinit()
|
|
|
|
{
|
2020-08-28 21:24:22 +00:00
|
|
|
DEBUG_MSG("Doing TFT init\n");
|
|
|
|
|
|
|
|
#ifdef ST7735_BACKLIGHT_EN
|
|
|
|
digitalWrite(ST7735_BACKLIGHT_EN, HIGH);
|
|
|
|
pinMode(ST7735_BACKLIGHT_EN, OUTPUT);
|
|
|
|
#endif
|
|
|
|
|
2020-08-17 20:47:05 +00:00
|
|
|
tft.init();
|
|
|
|
tft.setRotation(1);
|
2020-08-28 21:24:22 +00:00
|
|
|
tft.fillScreen(TFT_GREEN);
|
2020-08-17 20:47:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|