Add files via upload
This commit is contained in:
parent
086e52804f
commit
a18c7a307b
24
TFT_eSPI.cpp
24
TFT_eSPI.cpp
|
|
@ -159,6 +159,10 @@ void TFT_eSPI::init(void)
|
|||
#endif
|
||||
|
||||
SPI.begin(); // This will set MISO to input
|
||||
|
||||
#ifdef D6_NOT_USED_FOR_MISO
|
||||
pinMode(D6, OUTPUT);
|
||||
#endif
|
||||
|
||||
#ifndef SUPPORT_TRANSACTIONS
|
||||
#ifdef SET_SPI_TO_LSB_FIRST
|
||||
|
|
@ -203,19 +207,19 @@ void TFT_eSPI::init(void)
|
|||
|
||||
// This loads the driver specific initialisation code <<<<<<<<<<<<<<<<<<<<< ADD NEW DRIVERS TO THE LIST HERE <<<<<<<<<<<<<<<<<<<<<<<
|
||||
#if defined (ILI9341_DRIVER)
|
||||
#include "TFT_Drivers\ILI9341_Init.h"
|
||||
#include "TFT_Drivers/ILI9341_Init.h"
|
||||
|
||||
#elif defined (ST7735_DRIVER)
|
||||
#include "TFT_Drivers\ST7735_Init.h"
|
||||
#include "TFT_Drivers/ST7735_Init.h"
|
||||
|
||||
#elif defined (ILI9163_DRIVER)
|
||||
#include "TFT_Drivers\ILI9163_Init.h"
|
||||
#include "TFT_Drivers/ILI9163_Init.h"
|
||||
|
||||
#elif defined (S6D02A1_DRIVER)
|
||||
#include "TFT_Drivers\S6D02A1_Init.h"
|
||||
#include "TFT_Drivers/S6D02A1_Init.h"
|
||||
|
||||
#elif defined (RPI_ILI9486_DRIVER)
|
||||
#include "TFT_Drivers\RPI_ILI9486_Init.h"
|
||||
#include "TFT_Drivers/RPI_ILI9486_Init.h"
|
||||
#endif
|
||||
|
||||
spi_end();
|
||||
|
|
@ -234,19 +238,19 @@ void TFT_eSPI::setRotation(uint8_t m)
|
|||
|
||||
// This loads the driver specific rotation code <<<<<<<<<<<<<<<<<<<<< ADD NEW DRIVERS TO THE LIST HERE <<<<<<<<<<<<<<<<<<<<<<<
|
||||
#if defined (ILI9341_DRIVER)
|
||||
#include "TFT_Drivers\ILI9341_Rotation.h"
|
||||
#include "TFT_Drivers/ILI9341_Rotation.h"
|
||||
|
||||
#elif defined (ST7735_DRIVER)
|
||||
#include "TFT_Drivers\ST7735_Rotation.h"
|
||||
#include "TFT_Drivers/ST7735_Rotation.h"
|
||||
|
||||
#elif defined (ILI9163_DRIVER)
|
||||
#include "TFT_Drivers\ILI9163_Rotation.h"
|
||||
#include "TFT_Drivers/ILI9163_Rotation.h"
|
||||
|
||||
#elif defined (S6D02A1_DRIVER)
|
||||
#include "TFT_Drivers\S6D02A1_Rotation.h"
|
||||
#include "TFT_Drivers/S6D02A1_Rotation.h"
|
||||
|
||||
#elif defined (RPI_ILI9486_DRIVER)
|
||||
#include "TFT_Drivers\RPI_ILI9486_Rotation.h"
|
||||
#include "TFT_Drivers/RPI_ILI9486_Rotation.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
18
User_Setup.h
18
User_Setup.h
|
|
@ -76,9 +76,9 @@
|
|||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR SETUP ######
|
||||
|
||||
// ModeMCU
|
||||
#define TFT_CS D8 // Chip select control pin D8
|
||||
#define TFT_DC D3 // Data Command control pin
|
||||
#define TFT_RST D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_CS D8 // Chip select control pin D8
|
||||
//#define TFT_DC D0 // Data Command control pin
|
||||
//#define TFT_RST D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
|
||||
//#define TFT_WR D2 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
|
@ -125,10 +125,16 @@
|
|||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Not used section
|
||||
// Section 4. Define whether D6 is used for MISO
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #define below to free up pin D6 for uses other than MISO
|
||||
// Specifically, this way it can be used for DC / CS
|
||||
// May be useful for pin-constrained applications
|
||||
// WARNING: this only works if the display is used write-only
|
||||
//
|
||||
// #define D6_NOT_USED_FOR_MISO
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
|
|
@ -145,8 +151,8 @@
|
|||
// #define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
||||
// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS
|
||||
// #define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
||||
#define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue