mirror of
https://github.com/jaksatomovic/esp32-clickwheel.git
synced 2025-08-30 08:08:29 -04:00
first commit
This commit is contained in:
commit
868b14f8c8
286 changed files with 59925 additions and 0 deletions
56
lib/TFT_eSPI/User_Setups/Setup100_RP2040_ILI9488_parallel.h
Normal file
56
lib/TFT_eSPI/User_Setups/Setup100_RP2040_ILI9488_parallel.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// This setup is for the RP2040 processor only when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 100
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ILI9488_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define TFT_CS -1 // Do not define, chip select control pin permanently connected to 0V
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_DC 28 // Data Command control pin
|
||||
#define TFT_RST 2 // Reset pin
|
||||
|
||||
//#define TFT_RD -1 // Do not define, read pin permanently connected to 3V3
|
||||
|
||||
// Note: All the following pins are PIO hardware configured and driven
|
||||
// The pins are hard-coded at the moment and must not be changed here
|
||||
// Connections MUST use the pins below
|
||||
#define TFT_WR 22
|
||||
|
||||
// PIO requires these to be sequentially increasing - do not change
|
||||
#define TFT_D0 6
|
||||
#define TFT_D1 7
|
||||
#define TFT_D2 8
|
||||
#define TFT_D3 9
|
||||
#define TFT_D4 10
|
||||
#define TFT_D5 11
|
||||
#define TFT_D6 12
|
||||
#define TFT_D7 13
|
||||
//*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
56
lib/TFT_eSPI/User_Setups/Setup101_RP2040_ILI9481_parallel.h
Normal file
56
lib/TFT_eSPI/User_Setups/Setup101_RP2040_ILI9481_parallel.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// This setup is for the RP2040 processor only when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 101
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ILI9481_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define TFT_CS -1 // Do not define, chip select control pin permanently connected to 0V
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_DC 28 // Data Command control pin
|
||||
#define TFT_RST 2 // Reset pin
|
||||
|
||||
//#define TFT_RD -1 // Do not define, read pin permanently connected to 3V3
|
||||
|
||||
// Note: All the following pins are PIO hardware configured and driven
|
||||
// The pins are hard-coded at the moment and must not be changed here
|
||||
// Connections MUST use the pins below
|
||||
#define TFT_WR 22
|
||||
|
||||
// PIO requires these to be sequentially increasing - do not change
|
||||
#define TFT_D0 6
|
||||
#define TFT_D1 7
|
||||
#define TFT_D2 8
|
||||
#define TFT_D3 9
|
||||
#define TFT_D4 10
|
||||
#define TFT_D5 11
|
||||
#define TFT_D6 12
|
||||
#define TFT_D7 13
|
||||
//*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
56
lib/TFT_eSPI/User_Setups/Setup102_RP2040_ILI9341_parallel.h
Normal file
56
lib/TFT_eSPI/User_Setups/Setup102_RP2040_ILI9341_parallel.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// This setup is for the RP2040 processor only when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 102
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define TFT_CS -1 // Do not define, chip select control pin permanently connected to 0V
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_DC 28 // Data Command control pin
|
||||
#define TFT_RST 2 // Reset pin
|
||||
|
||||
//#define TFT_RD -1 // Do not define, read pin permanently connected to 3V3
|
||||
|
||||
// Note: All the following pins are PIO hardware configured and driven
|
||||
// The pins are hard-coded at the moment and must not be changed here
|
||||
// Connections MUST use the pins below
|
||||
#define TFT_WR 22
|
||||
|
||||
// PIO requires these to be sequentially increasing - do not change
|
||||
#define TFT_D0 6
|
||||
#define TFT_D1 7
|
||||
#define TFT_D2 8
|
||||
#define TFT_D3 9
|
||||
#define TFT_D4 10
|
||||
#define TFT_D5 11
|
||||
#define TFT_D6 12
|
||||
#define TFT_D7 13
|
||||
//*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
56
lib/TFT_eSPI/User_Setups/Setup103_RP2040_ILI9486_parallel.h
Normal file
56
lib/TFT_eSPI/User_Setups/Setup103_RP2040_ILI9486_parallel.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// This setup is for the RP2040 processor only when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 103
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ILI9486_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define TFT_CS -1 // Do not define, chip select control pin permanently connected to 0V
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_DC 28 // Data Command control pin
|
||||
#define TFT_RST 2 // Reset pin
|
||||
|
||||
//#define TFT_RD -1 // Do not define, read pin permanently connected to 3V3
|
||||
|
||||
// Note: All the following pins are PIO hardware configured and driven
|
||||
// The pins are hard-coded at the moment and must not be changed here
|
||||
// Connections MUST use the pins below
|
||||
#define TFT_WR 22
|
||||
|
||||
// PIO requires these to be sequentially increasing - do not change
|
||||
#define TFT_D0 6
|
||||
#define TFT_D1 7
|
||||
#define TFT_D2 8
|
||||
#define TFT_D3 9
|
||||
#define TFT_D4 10
|
||||
#define TFT_D5 11
|
||||
#define TFT_D6 12
|
||||
#define TFT_D7 13
|
||||
//*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
56
lib/TFT_eSPI/User_Setups/Setup104_RP2040_ST7796_parallel.h
Normal file
56
lib/TFT_eSPI/User_Setups/Setup104_RP2040_ST7796_parallel.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// This setup is for the RP2040 processor only when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 104
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ST7796_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define TFT_CS -1 // Do not define, chip select control pin permanently connected to 0V
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_DC 28 // Data Command control pin
|
||||
#define TFT_RST 2 // Reset pin
|
||||
|
||||
//#define TFT_RD -1 // Do not define, read pin permanently connected to 3V3
|
||||
|
||||
// Note: All the following pins are PIO hardware configured and driven
|
||||
// The pins are hard-coded at the moment and must not be changed here
|
||||
// Connections MUST use the pins below
|
||||
#define TFT_WR 22
|
||||
|
||||
// PIO requires these to be sequentially increasing - do not change
|
||||
#define TFT_D0 6
|
||||
#define TFT_D1 7
|
||||
#define TFT_D2 8
|
||||
#define TFT_D3 9
|
||||
#define TFT_D4 10
|
||||
#define TFT_D5 11
|
||||
#define TFT_D6 12
|
||||
#define TFT_D7 13
|
||||
//*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
|
@ -0,0 +1,60 @@
|
|||
// This setup is for the RP2040 processor only when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 105
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define TFT_PARALLEL_16_BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ST7796_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#define TFT_CS -1 // Do not define, chip select control pin permanently connected to 0V
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_DC 3 // Data Command control pin
|
||||
#define TFT_RST 2 // Reset pin
|
||||
|
||||
//#define TFT_RD -1 // Do not define, read pin must be permanently connected to 3V3
|
||||
#define TFT_WR 4
|
||||
|
||||
// PIO requires these to be sequentially increasing GPIO with no gaps
|
||||
#define TFT_D0 6
|
||||
#define TFT_D1 7
|
||||
#define TFT_D2 8
|
||||
#define TFT_D3 9
|
||||
#define TFT_D4 10
|
||||
#define TFT_D5 11
|
||||
#define TFT_D6 12
|
||||
#define TFT_D7 13
|
||||
#define TFT_D8 14
|
||||
#define TFT_D9 15
|
||||
#define TFT_D10 16
|
||||
#define TFT_D11 17
|
||||
#define TFT_D12 18
|
||||
#define TFT_D13 19
|
||||
#define TFT_D14 20
|
||||
#define TFT_D15 21
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
|
@ -0,0 +1,64 @@
|
|||
// This setup is for the RP2040 processor when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 106
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
#define TFT_PARALLEL_16_BIT
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ILI9481_DRIVER
|
||||
//#define HX8357B_DRIVER
|
||||
//#define HX8357C_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_RST 18 // Reset pin
|
||||
#define TFT_CS 19 // Do not define if chip select control pin permanently connected to 0V
|
||||
//#define TFT_RD -1 // Do not define, read pin must be permanently connected to 3V3
|
||||
|
||||
// Note: All the following pins are PIO hardware configured and driven
|
||||
#define TFT_WR 16 // Write strobe pin
|
||||
#define TFT_DC 17 // Data Command control pin
|
||||
|
||||
// PIO requires these to be sequentially increasing
|
||||
#define TFT_D0 0
|
||||
#define TFT_D1 1
|
||||
#define TFT_D2 2
|
||||
#define TFT_D3 3
|
||||
#define TFT_D4 4
|
||||
#define TFT_D5 5
|
||||
#define TFT_D6 6
|
||||
#define TFT_D7 7
|
||||
#define TFT_D8 8
|
||||
#define TFT_D9 9
|
||||
#define TFT_D10 10
|
||||
#define TFT_D11 11
|
||||
#define TFT_D12 12
|
||||
#define TFT_D13 13
|
||||
#define TFT_D14 14
|
||||
#define TFT_D15 15
|
||||
//*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
|
@ -0,0 +1,65 @@
|
|||
// This setup is for the RP2040 processor only when used with 8 bit parallel displays
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 107
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Interface
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
#define TFT_PARALLEL_16_BIT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Display driver type
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define ILI9341_DRIVER
|
||||
//#define ILI9481_DRIVER // Tested
|
||||
//#define HX8357B_DRIVER // Tested
|
||||
//#define HX8357C_DRIVER // Tested
|
||||
//#define SSD1963_800_DRIVER
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// RP2040 pins used
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// These pins can be moved and are controlled directly by the library software
|
||||
#define TFT_RST 18 // Reset pin
|
||||
#define TFT_CS 19 // Do not define if chip select control pin permanently connected to 0V
|
||||
//#define TFT_RD -1 // Do not define, read pin must be permanently connected to 3V3
|
||||
|
||||
// Note: All the following pins are PIO hardware configured and driven
|
||||
#define TFT_WR 16 // Write strobe pin
|
||||
#define TFT_DC 17 // Data Command control pin
|
||||
|
||||
// PIO requires these to be sequentially increasing
|
||||
#define TFT_D0 0
|
||||
#define TFT_D1 1
|
||||
#define TFT_D2 2
|
||||
#define TFT_D3 3
|
||||
#define TFT_D4 4
|
||||
#define TFT_D5 5
|
||||
#define TFT_D6 6
|
||||
#define TFT_D7 7
|
||||
#define TFT_D8 8
|
||||
#define TFT_D9 9
|
||||
#define TFT_D10 10
|
||||
#define TFT_D11 11
|
||||
#define TFT_D12 12
|
||||
#define TFT_D13 13
|
||||
#define TFT_D14 14
|
||||
#define TFT_D15 15
|
||||
//*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Fonts to be available
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
33
lib/TFT_eSPI/User_Setups/Setup10_RPi_touch_ILI9486.h
Normal file
33
lib/TFT_eSPI/User_Setups/Setup10_RPi_touch_ILI9486.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
// For ESP8266
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 10
|
||||
|
||||
#define RPI_DISPLAY_TYPE
|
||||
#define ILI9486_DRIVER
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D2 // Chip select control pin D2
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 16000000 // Some displays will operate at higher frequencies
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
32
lib/TFT_eSPI/User_Setups/Setup11_RPi_touch_ILI9486.h
Normal file
32
lib/TFT_eSPI/User_Setups/Setup11_RPi_touch_ILI9486.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
// For ESP32
|
||||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 11
|
||||
|
||||
#define RPI_DISPLAY_TYPE
|
||||
#define ILI9486_DRIVER
|
||||
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15 // Chip select control pin
|
||||
#define TFT_DC 2 // Data Command control pin
|
||||
#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define TOUCH_CS 22 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 20000000 // Some displays will operate at higher frequencies
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
33
lib/TFT_eSPI/User_Setups/Setup12_M5Stack_Basic_Core.h
Normal file
33
lib/TFT_eSPI/User_Setups/Setup12_M5Stack_Basic_Core.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 12
|
||||
|
||||
//Setup file for the M5Stack Basic Core
|
||||
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
#define M5STACK
|
||||
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 14 // Chip select control pin
|
||||
#define TFT_DC 27 // Data Command control pin
|
||||
#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
|
||||
#define TFT_BL 32 // LED back-light
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 27000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 5000000
|
57
lib/TFT_eSPI/User_Setups/Setup135_ST7789.h
Normal file
57
lib/TFT_eSPI/User_Setups/Setup135_ST7789.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
// ST7789 135 x 240 display with no chip select line
|
||||
#define USER_SETUP_ID 135
|
||||
|
||||
#define ST7789_DRIVER // Configure all registers
|
||||
|
||||
#define TFT_WIDTH 135
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
#define CGRAM_OFFSET // Library will add offsets required
|
||||
|
||||
//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
//#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
//#define TFT_INVERSION_ON
|
||||
//#define TFT_INVERSION_OFF
|
||||
|
||||
// DSTIKE stepup
|
||||
//#define TFT_DC 23
|
||||
//#define TFT_RST 32
|
||||
//#define TFT_MOSI 26
|
||||
//#define TFT_SCLK 27
|
||||
|
||||
// Generic ESP32 setup
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_CS -1 // Not connected
|
||||
//#define TFT_DC 2
|
||||
//#define TFT_RST 4 // Connect reset to ensure display initialises
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS -1 // Define as not used
|
||||
#define TFT_DC PIN_D1 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // TFT reset pin (could connect to NodeMCU RST, see next line)
|
||||
#define TFT_RST -1 // TFT reset pin connect to NodeMCU RST, must also then add 10K pull down to TFT SCK
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
35
lib/TFT_eSPI/User_Setups/Setup136_LilyGo_TTV.h
Normal file
35
lib/TFT_eSPI/User_Setups/Setup136_LilyGo_TTV.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
// ST7789 135 x 240 display with no chip select line
|
||||
#define USER_SETUP_ID 136
|
||||
|
||||
#define ST7789_DRIVER // Configure all registers
|
||||
|
||||
#define TFT_WIDTH 135
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
#define CGRAM_OFFSET // Library will add offsets required
|
||||
|
||||
// Generic ESP32 setup
|
||||
//#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 5
|
||||
#define TFT_DC 19
|
||||
#define TFT_RST 4
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
33
lib/TFT_eSPI/User_Setups/Setup137_LilyGo_TDisplay_RP2040.h
Normal file
33
lib/TFT_eSPI/User_Setups/Setup137_LilyGo_TDisplay_RP2040.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
// LilyGo T-Display RP2040 (ST7789 135 x 240 display)
|
||||
#define USER_SETUP_ID 137
|
||||
|
||||
#define ST7789_DRIVER // Configure all registers
|
||||
|
||||
#define TFT_WIDTH 135
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
#define CGRAM_OFFSET // Library will add offsets required
|
||||
|
||||
// For LilyGo T-Display RP2040
|
||||
#define TFT_CS 5 // Chip Select pin
|
||||
#define TFT_DC 1 // Data Command control pin
|
||||
#define TFT_RST 0 // Reset pin
|
||||
#define TFT_MOSI 3
|
||||
#define TFT_SCLK 2
|
||||
// Don't uncomment next line if you want PWM control of the backlight in the sketch
|
||||
//#define TFT_BL 4
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 40000000
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
36
lib/TFT_eSPI/User_Setups/Setup13_ILI9481_Parallel.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup13_ILI9481_Parallel.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 13
|
||||
|
||||
#define ESP32_PARALLEL
|
||||
|
||||
|
||||
#define ILI9481_DRIVER
|
||||
|
||||
|
||||
// ESP32 pins used for UNO format board
|
||||
#define TFT_CS 33 // Chip select control pin
|
||||
#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
#define TFT_RST 32 // Reset pin
|
||||
|
||||
#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
#define TFT_RD 2
|
||||
|
||||
#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
#define TFT_D1 13 // so a single register write sets/clears all bits
|
||||
#define TFT_D2 26
|
||||
#define TFT_D3 25
|
||||
#define TFT_D4 17
|
||||
#define TFT_D5 16
|
||||
#define TFT_D6 27
|
||||
#define TFT_D7 14
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
36
lib/TFT_eSPI/User_Setups/Setup14_ILI9341_Parallel.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup14_ILI9341_Parallel.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 14
|
||||
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
|
||||
// ESP32 pins used for the parallel interface TFT
|
||||
#define TFT_CS 33 // Chip select control pin
|
||||
#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
#define TFT_RST 32 // Reset pin
|
||||
|
||||
#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
#define TFT_RD 2
|
||||
|
||||
#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
#define TFT_D1 13 // so a single register write sets/clears all bits
|
||||
#define TFT_D2 26
|
||||
#define TFT_D3 25
|
||||
#define TFT_D4 17
|
||||
#define TFT_D5 16
|
||||
#define TFT_D6 27
|
||||
#define TFT_D7 14
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
36
lib/TFT_eSPI/User_Setups/Setup15_HX8357D.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup15_HX8357D.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 15
|
||||
|
||||
#define HX8357D_DRIVER
|
||||
|
||||
// If green and blue swapped on display then change the RGB colour order
|
||||
// Only uncomment ONE of the following options
|
||||
#define TFT_RGB_ORDER TFT_RGB // Red-Green-Blue
|
||||
//#define TFT_RGB_ORDER TFT_BGR // Blue-Green-RED
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
36
lib/TFT_eSPI/User_Setups/Setup16_ILI9488_Parallel.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup16_ILI9488_Parallel.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 16
|
||||
|
||||
#define ESP32_PARALLEL
|
||||
|
||||
|
||||
#define ILI9488_DRIVER
|
||||
|
||||
|
||||
// ESP32 pins used
|
||||
#define TFT_CS 33 // Chip select control pin
|
||||
#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
#define TFT_RST 32 // Reset pin
|
||||
|
||||
#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
#define TFT_RD 2
|
||||
|
||||
#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
#define TFT_D1 13 // so a single register write sets/clears all bits
|
||||
#define TFT_D2 26
|
||||
#define TFT_D3 25
|
||||
#define TFT_D4 17
|
||||
#define TFT_D5 16
|
||||
#define TFT_D6 27
|
||||
#define TFT_D7 14
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
41
lib/TFT_eSPI/User_Setups/Setup17_ePaper.h
Normal file
41
lib/TFT_eSPI/User_Setups/Setup17_ePaper.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 17
|
||||
|
||||
#define EPD_DRIVER // ePaper driver
|
||||
|
||||
|
||||
// READ THIS READ THIS READ THIS READ THIS READ THIS READ THIS
|
||||
// Install the ePaper library for your own display size and type
|
||||
// from here:
|
||||
// https://github.com/Bodmer/EPD_Libraries
|
||||
|
||||
// Note: Pin allocations for the ePaper signals are defined in
|
||||
// the ePaper library's epdif.h file. There follows the default
|
||||
// pins already included in epdif.h file for the ESP8266:
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// For ESP8266 connect as follows: //
|
||||
// Display 3.3V to NodeMCU 3V3 //
|
||||
// Display GND to NodeMCU GND //
|
||||
// //
|
||||
// Display GPIO NodeMCU pin //
|
||||
// BUSY 5 D1 //
|
||||
// RESET 4 D2 //
|
||||
// DC 0 D3 //
|
||||
// CS 2 D4 //
|
||||
// CLK 14 D5 //
|
||||
// D6 (MISO not connected to display) //
|
||||
// DIN 13 D7 //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
45
lib/TFT_eSPI/User_Setups/Setup18_ST7789.h
Normal file
45
lib/TFT_eSPI/User_Setups/Setup18_ST7789.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 18
|
||||
|
||||
#define ST7789_DRIVER
|
||||
|
||||
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only
|
||||
|
||||
// If colours are inverted (white shows as black) then uncomment one of the next
|
||||
// 2 lines try both options, one of the options should correct the inversion.
|
||||
// #define TFT_INVERSION_ON
|
||||
// #define TFT_INVERSION_OFF
|
||||
|
||||
// For ST7789 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
|
||||
// My ST7789 display has TCT_CS wired permananently low so the pin is not defined here
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
//#define SUPPORT_TRANSACTIONS
|
36
lib/TFT_eSPI/User_Setups/Setup19_RM68140_Parallel.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup19_RM68140_Parallel.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 19
|
||||
|
||||
#define ESP32_PARALLEL
|
||||
|
||||
|
||||
#define RM68140_DRIVER
|
||||
|
||||
|
||||
// ESP32 pins used for UNO format board
|
||||
#define TFT_CS 33 // Chip select control pin
|
||||
#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
#define TFT_RST 32 // Reset pin
|
||||
|
||||
#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
#define TFT_RD 2
|
||||
|
||||
#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
#define TFT_D1 13 // so a single register write sets/clears all bits
|
||||
#define TFT_D2 26
|
||||
#define TFT_D3 25
|
||||
#define TFT_D4 17
|
||||
#define TFT_D5 16
|
||||
#define TFT_D6 27
|
||||
#define TFT_D7 14
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
34
lib/TFT_eSPI/User_Setups/Setup1_ILI9341.h
Normal file
34
lib/TFT_eSPI/User_Setups/Setup1_ILI9341.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 1
|
||||
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
32
lib/TFT_eSPI/User_Setups/Setup200_GC9A01.h
Normal file
32
lib/TFT_eSPI/User_Setups/Setup200_GC9A01.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 200
|
||||
|
||||
#define GC9A01_DRIVER
|
||||
|
||||
// For ESP32 Dev board (only tested with GC9A01 display)
|
||||
// The hardware SPI can be mapped to any pins
|
||||
|
||||
#define TFT_MOSI 15 // In some display driver board, it might be written as "SDA" and so on.
|
||||
#define TFT_SCLK 14
|
||||
#define TFT_CS 5 // Chip select control pin
|
||||
#define TFT_DC 27 // Data Command control pin
|
||||
#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
|
||||
#define TFT_BL 22 // LED back-light
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
//#define SPI_FREQUENCY 80000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 5000000
|
49
lib/TFT_eSPI/User_Setups/Setup201_WT32_SC01.h
Normal file
49
lib/TFT_eSPI/User_Setups/Setup201_WT32_SC01.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
// Note that some sketches are designed for a particular TFT pixel width/height
|
||||
#define USER_SETUP_ID 201
|
||||
|
||||
// User defined setup
|
||||
#define ST7796_DRIVER
|
||||
|
||||
#define TFT_WIDTH 480
|
||||
#define TFT_HEIGHT 320
|
||||
|
||||
#define TFT_BACKLIGHT_ON HIGH
|
||||
|
||||
#define USE_HSPI_PORT
|
||||
|
||||
#define TFT_MISO 12
|
||||
#define TFT_MOSI 13
|
||||
#define TFT_SCLK 14
|
||||
#define TFT_CS 15
|
||||
#define TFT_DC 21
|
||||
#define TFT_RST 22
|
||||
#define TFT_BL 23
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// SPI frequency for TFT writes
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 20000000
|
52
lib/TFT_eSPI/User_Setups/Setup202_SSD1351_128.h
Normal file
52
lib/TFT_eSPI/User_Setups/Setup202_SSD1351_128.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 202
|
||||
|
||||
#define SSD1351_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_HEIGHT 128
|
||||
|
||||
|
||||
#define SSD1351_1DOT5_INCH_128 // For 128 x 128 display
|
||||
|
||||
// Wiring:
|
||||
// +-------------+------------+-------------------------------------------------------------------+
|
||||
// | Display PCB | TFT_eSPI | Info |
|
||||
// +-------------+------------+-------------------------------------------------------------------+
|
||||
// | GND | GND (0V) | Common |
|
||||
// | VCC | 5V or 3.3V | Better to power with 5V if display PCB supports it |
|
||||
// | DIN | TFT_MOSI | SPI data |
|
||||
// | SCK | TFT_SCLK | SPI clock |
|
||||
// | DC | TFT_DC | Distinguish between a command or its data |
|
||||
// | RST | TFT_RST | Hardware reset, can connect to MCU RST pin as well |
|
||||
// | CS | TFT_CS | Chip select, Set to -1 if for manually use with multiple displays |
|
||||
// +-------------+------------+-------------------------------------------------------------------+
|
||||
#if defined(ESP32)
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_DC 2
|
||||
#define TFT_RST 4
|
||||
#define TFT_CS 15
|
||||
#elif defined(ESP8266)
|
||||
//#define TFT_MOSI PIN_D5 // Can't change
|
||||
//#define TFT_SCLK PIN_D7 // Can't change
|
||||
#define TFT_DC PIN_D3
|
||||
#define TFT_RST PIN_D4
|
||||
#define TFT_CS PIN_D8
|
||||
#endif
|
||||
|
||||
|
||||
#define LOAD_GLCD // Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts- 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 20000000
|
||||
//#define SPI_FREQUENCY 40000000 // Works after shielding the wires!
|
57
lib/TFT_eSPI/User_Setups/Setup203_ST7789.h
Normal file
57
lib/TFT_eSPI/User_Setups/Setup203_ST7789.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
// ST7789 240 x 280 display with no chip select line
|
||||
#define USER_SETUP_ID 203
|
||||
|
||||
#define ST7789_DRIVER // Configure all registers
|
||||
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 280
|
||||
|
||||
#define CGRAM_OFFSET // Library will add offsets required
|
||||
|
||||
//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
//#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
//#define TFT_INVERSION_ON
|
||||
//#define TFT_INVERSION_OFF
|
||||
|
||||
// DSTIKE stepup
|
||||
//#define TFT_DC 23
|
||||
//#define TFT_RST 32
|
||||
//#define TFT_MOSI 26
|
||||
//#define TFT_SCLK 27
|
||||
|
||||
// Generic ESP32 setup
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_CS -1 // Not connected
|
||||
//#define TFT_DC 2
|
||||
//#define TFT_RST 4 // Connect reset to ensure display initialises
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS -1 // Define as not used
|
||||
#define TFT_DC PIN_D1 // Data Command control pin
|
||||
//#define TFT_RST PIN_D4 // TFT reset pin (could connect to NodeMCU RST, see next line)
|
||||
#define TFT_RST -1 // TFT reset pin connect to NodeMCU RST, must also then add 10K pull down to TFT SCK
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
32
lib/TFT_eSPI/User_Setups/Setup204_ESP32_TouchDown.h
Normal file
32
lib/TFT_eSPI/User_Setups/Setup204_ESP32_TouchDown.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
// User Setup for the ESP32 TouchDown V1.0 and V1.1
|
||||
// ILI9488 using 4-wire SPI and using an FT6206 touch controller
|
||||
|
||||
#define USER_SETUP_ID 204
|
||||
|
||||
#define ILI9488_DRIVER
|
||||
|
||||
#define TFT_BL 32
|
||||
#define TFT_BACKLIGHT_ON HIGH
|
||||
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15
|
||||
#define TFT_DC 2
|
||||
#define TFT_RST 4
|
||||
|
||||
#define TOUCH_CS 21
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 27000000
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
36
lib/TFT_eSPI/User_Setups/Setup205_ESP32_TouchDown_S3.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup205_ESP32_TouchDown_S3.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// User Setup for the ESP32 TouchDown S3 V1.1
|
||||
// ILI9488 using 8-bit Parallel and using an FT6206 touch controller
|
||||
|
||||
#define USER_SETUP_ID 205
|
||||
|
||||
#define ESP32_PARALLEL
|
||||
|
||||
#define ILI9488_DRIVER
|
||||
|
||||
#define TFT_DC 5
|
||||
#define TFT_RST 46
|
||||
|
||||
#define TFT_WR 7
|
||||
#define TFT_RD 6
|
||||
|
||||
#define TFT_D0 21
|
||||
#define TFT_D1 14
|
||||
#define TFT_D2 13
|
||||
#define TFT_D3 12
|
||||
#define TFT_D4 11
|
||||
#define TFT_D5 10
|
||||
#define TFT_D6 9
|
||||
#define TFT_D7 8
|
||||
|
||||
#define TFT_BL 48
|
||||
#define TFT_BACKLIGHT_ON HIGH
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
33
lib/TFT_eSPI/User_Setups/Setup20_ILI9488.h
Normal file
33
lib/TFT_eSPI/User_Setups/Setup20_ILI9488.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 20
|
||||
|
||||
#define ILI9488_DRIVER
|
||||
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
35
lib/TFT_eSPI/User_Setups/Setup21_ILI9488.h
Normal file
35
lib/TFT_eSPI/User_Setups/Setup21_ILI9488.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 21
|
||||
|
||||
#define ILI9488_DRIVER
|
||||
|
||||
//#define TFT_INVERSION_OFF
|
||||
|
||||
#define TFT_MISO 19 // (leave TFT SDO disconnected if other SPI devices share MISO)
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15 // Chip select control pin
|
||||
#define TFT_DC 2 // Data Command control pin
|
||||
#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 16000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
36
lib/TFT_eSPI/User_Setups/Setup22_TTGO_T4.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup22_TTGO_T4.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// Setup for the TTGO T4 v1.1 ("Bitcoin Tracker") ESP32 board with 2.2" ILI9341 display
|
||||
#define USER_SETUP_ID 22
|
||||
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
//#define TFT_BACKLIGHT_ON HIGH // LED control for TTGO T4 v1.3 only
|
||||
//#define TFT_BL 4
|
||||
|
||||
#define TFT_MISO 12
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
|
||||
#define TFT_CS 27
|
||||
#define TFT_DC 26 // pin 32 for TTGO T4 v1.3
|
||||
#define TFT_RST 5
|
||||
|
||||
#define TOUCH_CS -1
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
//#define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000 // Maximum for ILI9341
|
||||
|
||||
#define USE_HSPI_PORT
|
||||
|
||||
#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
|
34
lib/TFT_eSPI/User_Setups/Setup22_TTGO_T4_v1.3.h
Normal file
34
lib/TFT_eSPI/User_Setups/Setup22_TTGO_T4_v1.3.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
// Setup for the TTGO T4 v1.3 ESP32 board with 2.2" ILI9341 display
|
||||
#define USER_SETUP_ID 99922
|
||||
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
#define TFT_BACKLIGHT_ON HIGH
|
||||
#define TFT_BL 4
|
||||
|
||||
#define TFT_MISO 12
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
|
||||
#define TFT_CS 27
|
||||
#define TFT_DC 32 // pin 26 for TTGO T4 v1.3
|
||||
#define TFT_RST 5
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
//#define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000 // Maximum for ILI9341
|
||||
|
||||
#define USE_HSPI_PORT
|
||||
|
||||
#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
|
43
lib/TFT_eSPI/User_Setups/Setup23_TTGO_TM.h
Normal file
43
lib/TFT_eSPI/User_Setups/Setup23_TTGO_TM.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
// Setup for the TTGO TM (Music) ESP32 board with 2.4" ST7789V display
|
||||
#define USER_SETUP_ID 23
|
||||
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ST7789_DRIVER
|
||||
|
||||
#define TFT_SDA_READ // Read from display, it only provides an SDA pin
|
||||
|
||||
#define TFT_MISO 19 // Must be defined even though it is not used
|
||||
#define TFT_MOSI 23 // Connected to display SDA line
|
||||
#define TFT_SCLK 18
|
||||
|
||||
#define TFT_CS 05
|
||||
#define TFT_DC 16
|
||||
#define TFT_RST 17
|
||||
|
||||
#define TOUCH_CS -1
|
||||
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 320
|
||||
|
||||
//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// Black and white swap option
|
||||
//#define TFT_INVERSION_ON
|
||||
#define TFT_INVERSION_OFF
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 40000000 // This display also seems to work reliably at 80MHz
|
||||
//#define SPI_FREQUENCY 80000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
|
70
lib/TFT_eSPI/User_Setups/Setup24_ST7789.h
Normal file
70
lib/TFT_eSPI/User_Setups/Setup24_ST7789.h
Normal file
|
@ -0,0 +1,70 @@
|
|||
// ST7789 240 x 240 display with no chip select line
|
||||
#define USER_SETUP_ID 24
|
||||
|
||||
#define ST7789_DRIVER // Configure all registers
|
||||
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
//#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
//#define TFT_INVERSION_ON
|
||||
//#define TFT_INVERSION_OFF
|
||||
|
||||
// DSTIKE stepup
|
||||
//#define TFT_DC 23
|
||||
//#define TFT_RST 32
|
||||
//#define TFT_MOSI 26
|
||||
//#define TFT_SCLK 27
|
||||
|
||||
#define TFT_CS 6 // Chip select control pin
|
||||
#define TFT_DC 5 // Data Command control pin
|
||||
#define TFT_RST 9 // Set TFT_RST to -1 if TFT RESET is connected to
|
||||
|
||||
// OPTION 2 lets you interface the display using ANY TWO or THREE PINS,
|
||||
// tradeoff being that performance is not as fast as hardware SPI above.
|
||||
#define TFT_MOSI 8 // Data out
|
||||
#define TFT_SCLK 14 // Clock out
|
||||
// Generic ESP32 setup
|
||||
// #define TFT_MISO 19
|
||||
#define TFT_MOSI -1
|
||||
// #define TFT_SCLK 18
|
||||
// #define TFT_CS -1 // Not connected
|
||||
// #define TFT_DC 2
|
||||
// #define TFT_RST 4 // Connect reset to ensure display initialises
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin
|
||||
// designation #define TFT_CS 6 // Define as not used #define TFT_DC 5
|
||||
// // Data Command control pin #define TFT_RST 9 // TFT reset pin (could
|
||||
// connect to NodeMCU RST, see next line)
|
||||
//#define TFT_RST -1 // TFT reset pin connect to NodeMCU RST, must also then
|
||||
// add 10K pull down to TFT SCK
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in
|
||||
// FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in
|
||||
// FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in
|
||||
// FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH,
|
||||
// only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in
|
||||
// FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH,
|
||||
// only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower,
|
||||
// so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free
|
||||
// fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// #define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
42
lib/TFT_eSPI/User_Setups/Setup25_TTGO_T_Display.h
Normal file
42
lib/TFT_eSPI/User_Setups/Setup25_TTGO_T_Display.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Setup for the TTGO T Display
|
||||
#define USER_SETUP_ID 25
|
||||
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ST7789_DRIVER
|
||||
#define TFT_SDA_READ // Display has a bidirectional SDA pin
|
||||
|
||||
#define TFT_WIDTH 135
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
#define CGRAM_OFFSET // Library will add offsets required
|
||||
|
||||
//#define TFT_MISO -1
|
||||
|
||||
#define TFT_MOSI 19
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 5
|
||||
#define TFT_DC 16
|
||||
#define TFT_RST 23
|
||||
|
||||
#define TOUCH_CS -1
|
||||
|
||||
#define TFT_BL 4 // Display backlight control pin
|
||||
|
||||
#define TFT_BACKLIGHT_ON HIGH // HIGH or LOW are options
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
//#define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
|
||||
#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
|
37
lib/TFT_eSPI/User_Setups/Setup26_TTGO_T_Wristband.h
Normal file
37
lib/TFT_eSPI/User_Setups/Setup26_TTGO_T_Wristband.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#define USER_SETUP_ID 26
|
||||
|
||||
#define ST7735_DRIVER
|
||||
|
||||
#define TFT_WIDTH 80
|
||||
#define TFT_HEIGHT 160
|
||||
|
||||
|
||||
#define TFT_RST 26 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
|
||||
#define TFT_MISO -1
|
||||
#define TFT_MOSI 19
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 5
|
||||
#define TFT_DC 23
|
||||
#define TFT_BL 27 // Dispaly backlight control pin
|
||||
|
||||
#define TFT_BACKLIGHT_ON HIGH // HIGH or LOW are options
|
||||
|
||||
#define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
||||
|
||||
// #define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS
|
||||
// #define SPI_FREQUENCY 80000000
|
102
lib/TFT_eSPI/User_Setups/Setup27_RPi_ST7796_ESP32.h
Normal file
102
lib/TFT_eSPI/User_Setups/Setup27_RPi_ST7796_ESP32.h
Normal file
|
@ -0,0 +1,102 @@
|
|||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
|
||||
#define USER_SETUP_ID 27
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 0. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Display type - only define if RPi display
|
||||
#define RPI_DISPLAY_TYPE
|
||||
|
||||
// Only define one driver
|
||||
#define ST7796_DRIVER
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// >>>>> EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP <<<<<
|
||||
|
||||
// The ESP32 hardware SPI can be mapped to any pins, these are the recommended default
|
||||
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15 // Chip select control pin
|
||||
#define TFT_DC 2 // Data Command control pin
|
||||
#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define TOUCH_CS 22 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Not used for ESP32
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Not used
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 5. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an RPi ST7796 MH4.0 display 80MHz is OK for ESP32, 40MHz maximum for ESP8266
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
#define SPI_FREQUENCY 80000000
|
||||
|
||||
// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
|
||||
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
|
||||
// then uncomment the following line:
|
||||
//#define USE_HSPI_PORT
|
||||
|
||||
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
106
lib/TFT_eSPI/User_Setups/Setup28_RPi_ST7796_ESP8266.h
Normal file
106
lib/TFT_eSPI/User_Setups/Setup28_RPi_ST7796_ESP8266.h
Normal file
|
@ -0,0 +1,106 @@
|
|||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
#define USER_SETUP_ID 28
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 0. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Display type - only define if RPi display
|
||||
#define RPI_DISPLAY_TYPE
|
||||
|
||||
// Only define one driver
|
||||
#define ST7796_DRIVER
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// >>>> EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP <<<<
|
||||
|
||||
// These are the recommended default
|
||||
|
||||
// Avoid PIN_D8 as this will prevent upload if display pulls the pin high at boot
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D2 // Chip select control pin D2
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Not used for ESP32
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Not used
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 5. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an RPi ST7796 MH4.0 display 80MHz is OK for ESP32, 40MHz maximum for ESP8266
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// Comment out the following #define if "SPI Transactions" do not need to be
|
||||
// supported. When commented out the code size will be smaller and sketches will
|
||||
// run slightly faster, so leave it commented out unless you need it!
|
||||
|
||||
// Transaction support is needed to work with SD library but not needed with TFT_SdFat
|
||||
// Transaction support is required if other SPI devices are connected.
|
||||
|
||||
// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex)
|
||||
// so changing it here has no effect
|
||||
|
||||
#define SUPPORT_TRANSACTIONS
|
96
lib/TFT_eSPI/User_Setups/Setup29_ILI9341_STM32.h
Normal file
96
lib/TFT_eSPI/User_Setups/Setup29_ILI9341_STM32.h
Normal file
|
@ -0,0 +1,96 @@
|
|||
|
||||
///////////////////////////////////////////////////
|
||||
// Setup for STM32 Nucleo and ILI9341 display //
|
||||
///////////////////////////////////////////////////
|
||||
#define USER_SETUP_ID 29
|
||||
|
||||
// Last update by Bodmer: 28/11/19
|
||||
|
||||
// STM32 optimised functions are not yet compatible with STM32H743 processor.
|
||||
// The STM32H743 does work with the slower generic processor drivers
|
||||
//
|
||||
// REMINDER - Nucleo-F743ZI and Nucleo-F743ZI2 have different pin port allocations
|
||||
// and require appropriate selection in IDE. ^---- Note the extra 2 in part number!
|
||||
|
||||
|
||||
// Define STM32 to invoke STM32 optimised driver
|
||||
#define STM32
|
||||
|
||||
// Define the TFT display driver
|
||||
#define ILI9341_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
|
||||
// MOSI and SCK do not need to be defined, connect:
|
||||
// - Arduino SCK to TFT SCK
|
||||
// - Arduino MOSI to TFT SDI(may be marked SDA or MOSI)
|
||||
// Typical Arduino SPI port 1 pins are (SCK=D13, MISO=D12, MOSI=D11) this is port pins PA5, PA6 and PA7 on Nucleo-F767ZI
|
||||
// SPI port 2 pins are (SCK=D18, MISO=A7, MOSI=D17) this is port pins PB13, PC2 and PB15 on Nucleo-F767ZI
|
||||
|
||||
/*
|
||||
#define TFT_SPI_PORT 1 // SPI 1 maximum clock rate is 55MHz
|
||||
#define TFT_MOSI PA7
|
||||
#define TFT_MISO PA6
|
||||
#define TFT_SCLK PA5
|
||||
//*/
|
||||
|
||||
/*
|
||||
#define TFT_SPI_PORT 2 // SPI 2 maximum clock rate is 27MHz
|
||||
#define TFT_MOSI D17
|
||||
#define TFT_MISO A7
|
||||
#define TFT_SCLK D18
|
||||
//*/
|
||||
|
||||
/*
|
||||
#define TFT_SPI_PORT 2 // SPI 2 maximum clock rate is 27MHz
|
||||
#define TFT_MOSI PB15
|
||||
#define TFT_MISO PC2
|
||||
#define TFT_SCLK PB13
|
||||
//*/
|
||||
|
||||
/*
|
||||
#define TFT_SPI_PORT 2 // SPI 2 maximum clock rate is 27MHz
|
||||
#define TFT_MOSI PB15
|
||||
#define TFT_MISO PB14
|
||||
#define TFT_SCLK PB13
|
||||
//*/
|
||||
|
||||
// Can use Ardiuno pin references, arbitrary allocation, TFT_eSPI controls chip select
|
||||
#define TFT_CS D5 // Chip select control pin to TFT CS
|
||||
#define TFT_DC D6 // Data Command control pin to TFT DC (may be labelled RS = Register Select)
|
||||
#define TFT_RST D7 // Reset pin to TFT RST (or RESET)
|
||||
|
||||
// Alternatively, we can use STM32 port reference names PXnn
|
||||
//#define TFT_CS PE11 // Nucleo-F767ZI equivalent of D5
|
||||
//#define TFT_DC PE9 // Nucleo-F767ZI equivalent of D6
|
||||
//#define TFT_RST PF13 // Nucleo-F767ZI equivalent of D7
|
||||
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to processor reset
|
||||
// Use an Arduino pin for initial testing as connecting to processor reset
|
||||
// may not work (pulse too short at power up?)
|
||||
|
||||
// Chip select for XPT2046 touch controller
|
||||
#define TOUCH_CS D4
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// STM32 support for smooth fonts via program memory (FLASH) arrays
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// Nucleo-F767ZI has a ~216MHZ CPU clock, this is divided by 4, 8, 16 etc
|
||||
|
||||
#define SPI_FREQUENCY 27000000 // 27MHz SPI clock
|
||||
//#define SPI_FREQUENCY 55000000 // 55MHz is over-clocking ILI9341 but seems to work reliably!
|
||||
|
||||
#define SPI_READ_FREQUENCY 15000000 // Reads need a slower SPI clock, probably ends up at 13.75MHz (CPU clock/16)
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000 // Must be very slow
|
||||
|
||||
// This has no effect, transactions for STM32 are automatically enabled
|
||||
#define SUPPORT_TRANSACTIONS
|
45
lib/TFT_eSPI/User_Setups/Setup2_ST7735.h
Normal file
45
lib/TFT_eSPI/User_Setups/Setup2_ST7735.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 2
|
||||
|
||||
#define ST7735_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_HEIGHT 160
|
||||
|
||||
|
||||
#define ST7735_REDTAB
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
47
lib/TFT_eSPI/User_Setups/Setup301_BW16_ST7735.h
Normal file
47
lib/TFT_eSPI/User_Setups/Setup301_BW16_ST7735.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
#include "itoa.h"
|
||||
#include <avr/dtostrf.h>
|
||||
|
||||
|
||||
// Setup for BW16 and ST7735 80 x 160 TFT
|
||||
#define USER_SETUP_ID 301
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ST7735_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 80
|
||||
#define TFT_HEIGHT 160
|
||||
|
||||
|
||||
#define ST7735_GREENTAB160x80
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// Pin Mappings for BW16 board
|
||||
#define TFT_MISO 11
|
||||
#define TFT_MOSI 12
|
||||
#define TFT_SCLK 10
|
||||
#define TFT_CS 9 // Chip select control pin
|
||||
#define TFT_DC 8 // Data Command control pin
|
||||
#define TFT_RST 6 // Reset pin (could connect to RST pin)
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 20000000
|
||||
//#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
||||
|
53
lib/TFT_eSPI/User_Setups/Setup30_ILI9341_Parallel_STM32.h
Normal file
53
lib/TFT_eSPI/User_Setups/Setup30_ILI9341_Parallel_STM32.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
////////////////////////////////////////////////////
|
||||
// Setup for Nucleo 64 or 144 and ILI9341 display //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
#define USER_SETUP_ID 30
|
||||
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
// Define STM32 to invoke optimised processor support
|
||||
#define STM32
|
||||
|
||||
// Defining the board allows the library to optimise the performance
|
||||
// for UNO compatible "MCUfriend" style shields
|
||||
#define NUCLEO_64_TFT
|
||||
//#define NUCLEO_144_TFT
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// Define the display driver chip type
|
||||
#define ILI9341_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
|
||||
// Define the Nucleo 64/144 pins used for the parallel interface TFT
|
||||
// The pins can be changed here but these are the ones used by the
|
||||
// common "MCUfriend" shields
|
||||
#define TFT_CS A3 // Chip select control pin
|
||||
#define TFT_DC A2 // Data Command control pin
|
||||
#define TFT_RST A4 // Reset pin
|
||||
|
||||
#define TFT_WR A1 // Write strobe control pin
|
||||
#define TFT_RD A0 // Read pin
|
||||
|
||||
#define TFT_D0 D8 // 8 bit parallel bus to TFT
|
||||
#define TFT_D1 D9
|
||||
#define TFT_D2 D2
|
||||
#define TFT_D3 D3
|
||||
#define TFT_D4 D4
|
||||
#define TFT_D5 D5
|
||||
#define TFT_D6 D6
|
||||
#define TFT_D7 D7
|
||||
|
||||
// Fonts to be available
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// STM32 support for smooth fonts via program memory (FLASH) arrays
|
||||
#define SMOOTH_FONT
|
52
lib/TFT_eSPI/User_Setups/Setup31_ST7796_Parallel_STM32.h
Normal file
52
lib/TFT_eSPI/User_Setups/Setup31_ST7796_Parallel_STM32.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
////////////////////////////////////////////////////
|
||||
// Setup for Nucleo 64 or 144 and ILI9341 display //
|
||||
////////////////////////////////////////////////////
|
||||
#define USER_SETUP_ID 31
|
||||
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
// Define STM32 to invoke optimised processor support
|
||||
#define STM32
|
||||
|
||||
// Defining the board allows the library to optimise the performance
|
||||
// for UNO compatible "MCUfriend" style shields
|
||||
#define NUCLEO_64_TFT
|
||||
//#define NUCLEO_144_TFT
|
||||
|
||||
// Tell the library to use 8 bit parallel mode(otherwise SPI is assumed)
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// Define the display driver chip type
|
||||
#define ST7796_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
|
||||
// Define the Nucleo 64/144 pins used for the parallel interface TFT
|
||||
// The pins can be changed here but these are the ones used by the
|
||||
// common "MCUfriend" shields
|
||||
#define TFT_CS A3 // Chip select control pin
|
||||
#define TFT_DC A2 // Data Command control pin
|
||||
#define TFT_RST A4 // Reset pin
|
||||
|
||||
#define TFT_WR A1 // Write strobe control pin
|
||||
#define TFT_RD A0 // Read pin
|
||||
|
||||
#define TFT_D0 D8 // 8 bit parallel bus to TFT
|
||||
#define TFT_D1 D9
|
||||
#define TFT_D2 D2
|
||||
#define TFT_D3 D3
|
||||
#define TFT_D4 D4
|
||||
#define TFT_D5 D5
|
||||
#define TFT_D6 D6
|
||||
#define TFT_D7 D7
|
||||
|
||||
// Fonts to be available
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// STM32 support for smooth fonts via program memory (FLASH) arrays
|
||||
#define SMOOTH_FONT
|
61
lib/TFT_eSPI/User_Setups/Setup32_ILI9341_STM32F103.h
Normal file
61
lib/TFT_eSPI/User_Setups/Setup32_ILI9341_STM32F103.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Setup for STM32F103 (e.g. Blue Pill) and ILI9341 display //
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define USER_SETUP_ID 32
|
||||
|
||||
// Last update by Bodmer: 14/1/20
|
||||
|
||||
// Define STM32 to invoke STM32 optimised driver
|
||||
#define STM32
|
||||
|
||||
// Define the TFT display driver
|
||||
#define ILI9341_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
|
||||
// MOSI and SCK do not need to be defined, connect:
|
||||
// - Arduino SCK (Blue Pill pin A5) to TFT SCK
|
||||
// - Arduino MOSI (Blue Pill pin A7) to TFT SDI (may be marked SDA or MOSI)
|
||||
// - Optional to read TFT: Arduino MISO (Blue Pill pin A6) to TFT SDO (may be marked MISO or may not exist on TFT)
|
||||
// Note: not all TFT's support reads
|
||||
|
||||
// reminder: Blue Pill SPI pins are SCK=A5, MISO = A6, MOSI=A7
|
||||
|
||||
// Can use Ardiuno pin references, arbitrary allocation, TFT_eSPI controls chip select
|
||||
#define TFT_CS A0 // Chip select control pin to TFT CS
|
||||
#define TFT_DC A1 // Data Command control pin to TFT DC (may be labelled RS = Register Select)
|
||||
#define TFT_RST A2 // Reset pin to TFT RST (or RESET)
|
||||
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to processor reset
|
||||
// Use an Arduino pin for initial testing as connecting to processor reset
|
||||
// may not work (due to variations in display design)
|
||||
|
||||
#define TOUCH_CS A4 // Connect to T_CS (Touch controller chip select) if XPT2046 is connected to SPI bus
|
||||
// You may need to wire the touch controller to the processor in addition to the TFT
|
||||
// For example on some boards the pins are labelled:
|
||||
// T_IRQ - no connection to processor
|
||||
// T_DO - connect to processor MISO
|
||||
// T_DIN - connect to processor MOSI
|
||||
// T_CS - connect to processor pin specified by TOUCH_CS above
|
||||
// T_SCK - connect to processor SCK
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// STM32 support for smooth fonts via program memory (FLASH) arrays
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// Assuming the processor clock is 72MHz:
|
||||
#define SPI_FREQUENCY 36000000 // 36MHz SPI clock
|
||||
//#define SPI_FREQUENCY 18000000 // 18MHz SPI clock
|
||||
|
||||
#define SPI_READ_FREQUENCY 12000000 // Reads need a slower SPI clock
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000 // Must be very slow
|
||||
|
||||
// This has no effect, transactions are automatically enabled for STM32
|
||||
//#define SUPPORT_TRANSACTIONS
|
67
lib/TFT_eSPI/User_Setups/Setup33_RPi_ILI9486_STM32.h
Normal file
67
lib/TFT_eSPI/User_Setups/Setup33_RPi_ILI9486_STM32.h
Normal file
|
@ -0,0 +1,67 @@
|
|||
///////////////////////////////////////////////////
|
||||
// Setup for STM32 Nucleo and ILI9341 display //
|
||||
///////////////////////////////////////////////////
|
||||
#define USER_SETUP_ID 33
|
||||
|
||||
// Last update by Bodmer: 28/11/19
|
||||
|
||||
// STM32 optimised functions are not yet compatible with STM32H743 processor.
|
||||
// The STM32H743 does work with the slower generic processor drivers
|
||||
//
|
||||
// REMINDER - Nucleo-F743ZI and Nucleo-F743ZI2 have different pin port allocations
|
||||
// and require appropriate selection in IDE. ^---- Note the extra 2 in part number!
|
||||
|
||||
|
||||
// Define STM32 to invoke STM32 optimised driver (optimised fns only tested on STM32F767 so far)
|
||||
// so you may need to comment this out
|
||||
#define STM32
|
||||
|
||||
// Define the TFT display driver
|
||||
#define RPI_DISPLAY_TYPE
|
||||
#define ILI9486_DRIVER
|
||||
|
||||
// MOSI and SCK do not need to be defined, connect:
|
||||
// - Arduino SCK to TFT SCK
|
||||
// - Arduino MOSI to TFT SDI(may be marked SDA or MOSI)
|
||||
// Standard Arduino SPI pins are(SCK=D13, MOSI=D11) this is port pins PA5 and PA7 on Nucleo-F767ZI
|
||||
|
||||
// Can use Ardiuno pin references, arbitrary allocation, TFT_eSPI controls chip select
|
||||
#define TFT_CS D5 // Chip select control pin to TFT CS
|
||||
#define TFT_DC D6 // Data Command control pin to TFT DC (may be labelled RS = Register Select)
|
||||
#define TFT_RST D7 // Reset pin to TFT RST (or RESET)
|
||||
|
||||
// Alternatively, we can use STM32 port reference names PXnn
|
||||
//#define TFT_CS PE11 // Nucleo-F767ZI equivalent of D5
|
||||
//#define TFT_DC PE9 // Nucleo-F767ZI equivalent of D6
|
||||
//#define TFT_RST PF13 // Nucleo-F767ZI equivalent of D7
|
||||
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to processor reset
|
||||
// Use an Arduino pin for initial testing as connecting to processor reset
|
||||
// may not work (pulse too short at power up?)
|
||||
|
||||
// Chip select for XPT2046 touch controller
|
||||
//#define TOUCH_CS D4
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// STM32 support for smooth fonts via program memory (FLASH) arrays
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// Nucleo-F767ZI has a ~216MHZ CPU clock, this is divided by 4, 8, 16 etc
|
||||
|
||||
#define SPI_FREQUENCY 20000000 // 27MHz SPI clock
|
||||
//#define SPI_FREQUENCY 55000000 // 55MHz is over-clocking ILI9341 but seems to work reliably!
|
||||
|
||||
//#define SPI_READ_FREQUENCY 15000000 // Reads need a slower SPI clock, probably ends up at 13.75MHz (CPU clock/16)
|
||||
|
||||
//#define SPI_TOUCH_FREQUENCY 2500000 // Must be very slow
|
||||
|
||||
// This has no effect, transactions for STM32 are automatically enabled
|
||||
#define SUPPORT_TRANSACTIONS
|
51
lib/TFT_eSPI/User_Setups/Setup34_ILI9481_Parallel_STM32.h
Normal file
51
lib/TFT_eSPI/User_Setups/Setup34_ILI9481_Parallel_STM32.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
////////////////////////////////////////////////////
|
||||
// Setup for Nucleo 64 or 144 and ILI9341 display //
|
||||
////////////////////////////////////////////////////
|
||||
#define USER_SETUP_ID 34
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
// Define STM32 to invoke optimised processor support
|
||||
#define STM32
|
||||
|
||||
// Defining the board allows the library to optimise the performance
|
||||
// for UNO compatible "MCUfriend" style shields
|
||||
#define NUCLEO_64_TFT
|
||||
//#define NUCLEO_144_TFT
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// Define the display driver chip type
|
||||
//#define ILI9341_DRIVER
|
||||
#define ILI9481_DRIVER
|
||||
|
||||
// Define the Nucleo 64/144 pins used for the parallel interface TFT
|
||||
// The pins can be changed here but these are the ones used by the
|
||||
// common "MCUfriend" shields
|
||||
#define TFT_CS A3 // Chip select control pin
|
||||
#define TFT_DC A2 // Data Command control pin
|
||||
#define TFT_RST A4 // Reset pin
|
||||
|
||||
#define TFT_WR A1 // Write strobe control pin
|
||||
#define TFT_RD A0 // Read pin
|
||||
|
||||
#define TFT_D0 D8 // 8 bit parallel bus to TFT
|
||||
#define TFT_D1 D9
|
||||
#define TFT_D2 D2
|
||||
#define TFT_D3 D3
|
||||
#define TFT_D4 D4
|
||||
#define TFT_D5 D5
|
||||
#define TFT_D6 D6
|
||||
#define TFT_D7 D7
|
||||
|
||||
// Fonts to be available
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// STM32 support for smooth fonts via program memory (FLASH) arrays
|
||||
#define SMOOTH_FONT
|
59
lib/TFT_eSPI/User_Setups/Setup35_ILI9341_STM32_Port_Bus.h
Normal file
59
lib/TFT_eSPI/User_Setups/Setup35_ILI9341_STM32_Port_Bus.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
//////////////////////////////////////////////////////////////
|
||||
// Setup for STM32 and ILI9341 display //
|
||||
//////////////////////////////////////////////////////////////
|
||||
#define USER_SETUP_ID 35
|
||||
// Last update by Bodmer: 28/3/20
|
||||
|
||||
// Define STM32 to invoke STM32 optimised driver
|
||||
#define STM32
|
||||
|
||||
// Define if Port A (B, C or D) pins 0-7 are used for data bus bits 0-7
|
||||
// this will improve rendering performance by a factor of ~8x
|
||||
#define STM_PORTA_DATA_BUS
|
||||
//#define STM_PORTB_DATA_BUS // Pins below must re re-allocated to use this option
|
||||
//#define STM_PORTC_DATA_BUS // Pins below must re re-allocated to use this option
|
||||
//#define STM_PORTD_DATA_BUS // Pins below must re re-allocated to use this option
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// Define ONE of the the TFT display drivers
|
||||
#define ILI9341_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
//#define ILI9486_DRIVER
|
||||
//#define ILI9488_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
|
||||
#define TFT_CS PB7 // Chip select control pin
|
||||
#define TFT_DC PB8 // Data Command control pin
|
||||
#define TFT_RST PB0 // Reset pin
|
||||
#define TFT_WR PB9 // Write strobe control pin
|
||||
#define TFT_RD PB1 // Read pin
|
||||
|
||||
#define TFT_D0 PA0 // 8 bit Port A parallel bus to TFT
|
||||
#define TFT_D1 PA1
|
||||
#define TFT_D2 PA2
|
||||
#define TFT_D3 PA3
|
||||
#define TFT_D4 PA4
|
||||
#define TFT_D5 PA5
|
||||
#define TFT_D6 PA6
|
||||
#define TFT_D7 PA7
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// STM32 support for smooth fonts via program memory (FLASH) arrays
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// Assuming the processor clock is 72MHz:
|
||||
#define SPI_FREQUENCY 36000000 // 36MHz SPI clock
|
||||
//#define SPI_FREQUENCY 18000000 // 18MHz SPI clock
|
||||
|
||||
#define SPI_READ_FREQUENCY 12000000 // Reads need a slower SPI clock
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000 // Must be very slow
|
32
lib/TFT_eSPI/User_Setups/Setup36_RPi_touch_ST7796.h
Normal file
32
lib/TFT_eSPI/User_Setups/Setup36_RPi_touch_ST7796.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 36
|
||||
|
||||
#define RPI_DISPLAY_TYPE
|
||||
#define ST7796_DRIVER
|
||||
|
||||
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15 // Chip select control pin
|
||||
#define TFT_DC 2 // Data Command control pin
|
||||
#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define TOUCH_CS 22 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
37
lib/TFT_eSPI/User_Setups/Setup3_ILI9163.h
Normal file
37
lib/TFT_eSPI/User_Setups/Setup3_ILI9163.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 3
|
||||
|
||||
#define ILI9163_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_HEIGHT 160
|
||||
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
36
lib/TFT_eSPI/User_Setups/Setup42_ILI9341_ESP32.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup42_ILI9341_ESP32.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 42
|
||||
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
#define TFT_MISO 19 // (leave TFT SDO disconnected if other SPI devices share MISO)
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15 // Chip select control pin
|
||||
#define TFT_DC 2 // Data Command control pin
|
||||
#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
|
||||
// Optional touch screen chip select
|
||||
//#define TOUCH_CS 5 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// TFT SPI clock frequency
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
// #define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 16000000
|
||||
|
||||
// SPI clock frequency for touch controller
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
52
lib/TFT_eSPI/User_Setups/Setup43_ST7735.h
Normal file
52
lib/TFT_eSPI/User_Setups/Setup43_ST7735.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
// Setup for ESP32 and ST7735 80 x 160 TFT
|
||||
#define USER_SETUP_ID 43
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ST7735_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 80
|
||||
#define TFT_HEIGHT 160
|
||||
|
||||
|
||||
#define ST7735_GREENTAB160x80
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
#ifdef ESP32
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15 // Chip select control pin
|
||||
#define TFT_DC 2 // Data Command control pin
|
||||
#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
#else
|
||||
// Display GND to NodeMCU pin GND (0V)
|
||||
// Display VCC to NodeMCU 5V or 3.3V
|
||||
// Display SCK to NodeMCU pin D5
|
||||
// Display SDI/MOSI to NodeMCU pin D7
|
||||
// Display BLK to NodeMCU pin VIN
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
|
||||
#endif
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
//#define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
32
lib/TFT_eSPI/User_Setups/Setup44_TTGO_CameraPlus.h
Normal file
32
lib/TFT_eSPI/User_Setups/Setup44_TTGO_CameraPlus.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#define USER_SETUP_ID 44
|
||||
|
||||
#define ST7789_DRIVER
|
||||
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
#define TFT_MOSI 19
|
||||
#define TFT_MISO 22
|
||||
#define TFT_SCLK 21
|
||||
#define TFT_CS 12
|
||||
#define TFT_DC 15
|
||||
#define TFT_RST -1
|
||||
#define TFT_BL 2
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
// #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 SUPPORT_TRANSACTIONS
|
32
lib/TFT_eSPI/User_Setups/Setup45_TTGO_T_Watch.h
Normal file
32
lib/TFT_eSPI/User_Setups/Setup45_TTGO_T_Watch.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#define USER_SETUP_ID 45
|
||||
|
||||
#define ST7789_DRIVER
|
||||
|
||||
#define TFT_WIDTH 240
|
||||
#define TFT_HEIGHT 240
|
||||
|
||||
#define TFT_MISO -1
|
||||
#define TFT_MOSI 19
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 5
|
||||
#define TFT_DC 27
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
// #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
|
||||
//#define SPI_FREQUENCY 80000000
|
||||
|
||||
|
||||
|
29
lib/TFT_eSPI/User_Setups/Setup46_GC9A01_ESP32.h
Normal file
29
lib/TFT_eSPI/User_Setups/Setup46_GC9A01_ESP32.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 46
|
||||
|
||||
#define GC9A01_DRIVER
|
||||
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 15 // Chip select control pin
|
||||
#define TFT_DC 2 // Data Command control pin
|
||||
#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
52
lib/TFT_eSPI/User_Setups/Setup47_ST7735.h
Normal file
52
lib/TFT_eSPI/User_Setups/Setup47_ST7735.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
// Config for two ST7735 128 x 128 displays for Animated_Eyes example
|
||||
#define USER_SETUP_ID 47
|
||||
|
||||
#define ST7735_DRIVER // Configure all registers
|
||||
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_HEIGHT 128
|
||||
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
#define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_REDTAB
|
||||
//#define ST7735_BLACKTAB
|
||||
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
|
||||
|
||||
//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
//#define TFT_INVERSION_ON
|
||||
//#define TFT_INVERSION_OFF
|
||||
|
||||
// Generic ESP32 setup
|
||||
#define TFT_MISO 19
|
||||
#define TFT_MOSI 23
|
||||
#define TFT_SCLK 18
|
||||
//#define TFT_CS 21 // Not defined here, chip select is managed by sketch
|
||||
#define TFT_DC 2
|
||||
#define TFT_RST 4 // Connect reset to ensure display initialises
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 27000000
|
||||
//#define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
33
lib/TFT_eSPI/User_Setups/Setup4_S6D02A1.h
Normal file
33
lib/TFT_eSPI/User_Setups/Setup4_S6D02A1.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 4
|
||||
|
||||
#define S6D02A1_DRIVER
|
||||
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
95
lib/TFT_eSPI/User_Setups/Setup50_SSD1963_Parallel.h
Normal file
95
lib/TFT_eSPI/User_Setups/Setup50_SSD1963_Parallel.h
Normal file
|
@ -0,0 +1,95 @@
|
|||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
#define USER_SETUP_ID 50
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 0. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Use ESP32 Parallel interface
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// Only define one driver, the other ones must be commented out
|
||||
//#define SSD1963_480_DRIVER // 272 x 480 display
|
||||
//#define SSD1963_800_DRIVER // 480 x 800 display
|
||||
//#define SSD1963_800ALT_DRIVER // Alternative 480 x 800 display
|
||||
#define SSD1963_800BD_DRIVER // 480 x 800 display sourced from https://www.buydisplay.com/7-tft-screen-touch-lcd-display-module-w-ssd1963-controller-board-mcu
|
||||
|
||||
//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// ESP32 pins used
|
||||
#define TFT_CS 33 // Chip select control pin
|
||||
#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
#define TFT_RST 32 // Reset pin
|
||||
|
||||
#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
#define TFT_RD 2
|
||||
|
||||
#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
#define TFT_D1 13 // so a single register write sets/clears all bits
|
||||
#define TFT_D2 26
|
||||
#define TFT_D3 25
|
||||
#define TFT_D4 17
|
||||
#define TFT_D5 16
|
||||
#define TFT_D6 27
|
||||
#define TFT_D7 14
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Define the way the DC and/or CS lines are driven (ESP8266 only)
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Not used
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 5. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
|
27
lib/TFT_eSPI/User_Setups/Setup51_LilyPi_ILI9481.h
Normal file
27
lib/TFT_eSPI/User_Setups/Setup51_LilyPi_ILI9481.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#define USER_SETUP_ID 51
|
||||
|
||||
#define ILI9481_DRIVER
|
||||
|
||||
#define TFT_BL 12 // LED back-light control pin
|
||||
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
#define TFT_MISO 23
|
||||
#define TFT_MOSI 19
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 5 // Chip select control pin
|
||||
#define TFT_DC 27 // Data Command control pin
|
||||
#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 26666666
|
||||
#define SPI_READ_FREQUENCY 20000000
|
28
lib/TFT_eSPI/User_Setups/Setup52_LilyPi_ST7796.h
Normal file
28
lib/TFT_eSPI/User_Setups/Setup52_LilyPi_ST7796.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#define USER_SETUP_ID 52
|
||||
|
||||
#define ST7796_DRIVER
|
||||
|
||||
#define TFT_BL 12 // LED back-light control pin
|
||||
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
#define ESP32_DMA
|
||||
#define TFT_MISO 23
|
||||
#define TFT_MOSI 19
|
||||
#define TFT_SCLK 18
|
||||
#define TFT_CS 5 // Chip select control pin
|
||||
#define TFT_DC 27 // Data Command control pin
|
||||
#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 40000000
|
||||
#define SPI_READ_FREQUENCY 12000000
|
30
lib/TFT_eSPI/User_Setups/Setup5_RPi_ILI9486.h
Normal file
30
lib/TFT_eSPI/User_Setups/Setup5_RPi_ILI9486.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 5
|
||||
|
||||
#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
187
lib/TFT_eSPI/User_Setups/Setup60_RP2040_ILI9341.h
Normal file
187
lib/TFT_eSPI/User_Setups/Setup60_RP2040_ILI9341.h
Normal file
|
@ -0,0 +1,187 @@
|
|||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
// Note that some sketches are designed for a particular TFT pixel width/height
|
||||
|
||||
#define USER_SETUP_ID 60
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// Display type - only define if RPi display
|
||||
//#define RPI_DISPLAY_TYPE // 20MHz maximum SPI
|
||||
|
||||
// Only define one driver, the other ones must be commented out
|
||||
#define ILI9341_DRIVER
|
||||
//#define ST7735_DRIVER // Define additional parameters below for this display
|
||||
//#define ILI9163_DRIVER // Define additional parameters below for this display
|
||||
//#define S6D02A1_DRIVER
|
||||
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
//#define HX8357D_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
//#define ILI9486_DRIVER
|
||||
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
|
||||
//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
|
||||
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
|
||||
//#define R61581_DRIVER
|
||||
//#define RM68140_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
//#define SSD1963_480_DRIVER
|
||||
//#define SSD1963_800_DRIVER
|
||||
//#define SSD1963_800ALT_DRIVER
|
||||
//#define ILI9225_DRIVER
|
||||
|
||||
// Some displays support SPI reads via the MISO pin, other displays have a single
|
||||
// bi-directional SDA pin and the library will try to read this via the MOSI line.
|
||||
// To use the SDA line for reading data from the TFT uncomment the following line:
|
||||
|
||||
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
||||
// #define TFT_WIDTH 80
|
||||
// #define TFT_WIDTH 128
|
||||
// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
|
||||
// #define TFT_HEIGHT 160
|
||||
// #define TFT_HEIGHT 128
|
||||
// #define TFT_HEIGHT 240 // ST7789 240 x 240
|
||||
// #define TFT_HEIGHT 320 // ST7789 240 x 320
|
||||
|
||||
// For ST7735 ONLY, define the type of display, originally this was based on the
|
||||
// colour of the tab on the screen protector film but this is not always true, so try
|
||||
// out the different options below if the screen does not display graphics correctly,
|
||||
// e.g. colours wrong, mirror images, or tray pixels at the edges.
|
||||
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
|
||||
// this User_Setup file, then rebuild and upload the sketch to the board again:
|
||||
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
// #define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_REDTAB
|
||||
// #define ST7735_BLACKTAB
|
||||
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
|
||||
|
||||
// If colours are inverted (white shows as black) then uncomment one of the next
|
||||
// 2 lines try both options, one of the options should correct the inversion.
|
||||
|
||||
// #define TFT_INVERSION_ON
|
||||
// #define TFT_INVERSION_OFF
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// If a backlight control signal is available then define the TFT_BL pin in Section 2
|
||||
// below. The backlight will be turned ON when tft.begin() is called, but the library
|
||||
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
|
||||
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
|
||||
// sketch. e.g. with digitalWrite(TFT_BL, LOW);
|
||||
|
||||
// #define TFT_BL 32 // LED back-light control pin
|
||||
// #define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
|
||||
// Typical setup for the RP2040 is :
|
||||
//
|
||||
// Display SDO/MISO to RP2040 pin D0 (or leave disconnected if not reading TFT)
|
||||
// Display LED to RP2040 pin 3V3 or 5V
|
||||
// Display SCK to RP2040 pin D2
|
||||
// Display SDI/MOSI to RP2040 pin D3
|
||||
// Display DC (RS/AO)to RP2040 pin D18 (can use another pin if desired)
|
||||
// Display RESET to RP2040 pin D19 (can use another pin if desired)
|
||||
// Display CS to RP2040 pin D20 (can use another pin if desired, or GND, see below)
|
||||
// Display GND to RP2040 pin GND (0V)
|
||||
// Display VCC to RP2040 5V or 3.3V (5v if display has a 5V to 3.3V regulator fitted)
|
||||
//
|
||||
// The DC (Data Command) pin may be labelled AO or RS (Register Select)
|
||||
//
|
||||
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
|
||||
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
|
||||
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
|
||||
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
|
||||
|
||||
// For the Pico use these #define lines
|
||||
#define TFT_MISO 0
|
||||
#define TFT_MOSI 3
|
||||
#define TFT_SCLK 2
|
||||
#define TFT_CS 20 // Chip select control pin
|
||||
#define TFT_DC 18 // Data Command control pin
|
||||
#define TFT_RST 19 // Reset pin (could connect to Arduino RESET pin)
|
||||
//#define TFT_BL // LED back-light
|
||||
|
||||
//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// For the RP2040 processor define the SPI port channel used, default is 0
|
||||
// #define TFT_SPI_PORT 1 // Set to 0 if SPI0 pins are used, or 1 if spi1 pins used
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
|
||||
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
|
||||
// With an ILI9163 display 27 MHz works OK.
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
// #define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
// #define SPI_FREQUENCY 32000000
|
||||
#define SPI_FREQUENCY 70000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
44
lib/TFT_eSPI/User_Setups/Setup61_RP2040_ILI9341_PIO_SPI.h
Normal file
44
lib/TFT_eSPI/User_Setups/Setup61_RP2040_ILI9341_PIO_SPI.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Setup file for RP2040 and SPI ILI9341 display using PIO for the display interface
|
||||
#define USER_SETUP_ID 61
|
||||
// The PIO can only be user with Earle Philhower's RP2040 board package:
|
||||
// https://github.com/earlephilhower/arduino-pico
|
||||
|
||||
// PIO SPI allows high SPI clock rates to be used when the processor is over-clocked.
|
||||
// PIO SPI is "write only" and the TFT_eSPI touch functions are not supported.
|
||||
// A touch screen could be used with a third party library on different SPI pins.
|
||||
|
||||
// This invokes the PIO based SPI interface for the RP2040 processor.
|
||||
#define RP2040_PIO_SPI
|
||||
|
||||
// TFT driver
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
// Pins - the PIO will control MOSI, SCLK and DC pins
|
||||
// Any digital GPIO pins may be used
|
||||
//#define TFT_MISO -1 // MISO is not used or supported
|
||||
#define TFT_MOSI 11
|
||||
#define TFT_SCLK 10
|
||||
#define TFT_CS 9 // Chip select control pin
|
||||
#define TFT_DC 8 // Data Command control pin
|
||||
#define TFT_RST 15 // Reset pin (could connect to Arduino RESET pin)
|
||||
|
||||
//#define TFT_BL 13 // Optional LED back-light control pin
|
||||
//#define TFT_BACKLIGHT_ON LOW // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
// #define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
// #define SPI_FREQUENCY 32000000
|
||||
#define SPI_FREQUENCY 62500000
|
198
lib/TFT_eSPI/User_Setups/Setup62_RP2040_Nano_Connect_ILI9341.h
Normal file
198
lib/TFT_eSPI/User_Setups/Setup62_RP2040_Nano_Connect_ILI9341.h
Normal file
|
@ -0,0 +1,198 @@
|
|||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
// Note that some sketches are designed for a particular TFT pixel width/height
|
||||
|
||||
#define USER_SETUP_ID 62
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// Display type - only define if RPi display
|
||||
//#define RPI_DISPLAY_TYPE // 20MHz maximum SPI
|
||||
|
||||
// Only define one driver, the other ones must be commented out
|
||||
#define ILI9341_DRIVER
|
||||
//#define ST7735_DRIVER // Define additional parameters below for this display
|
||||
//#define ILI9163_DRIVER // Define additional parameters below for this display
|
||||
//#define S6D02A1_DRIVER
|
||||
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
//#define HX8357D_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
//#define ILI9486_DRIVER
|
||||
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
|
||||
//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
|
||||
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
|
||||
//#define R61581_DRIVER
|
||||
//#define RM68140_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
//#define SSD1963_480_DRIVER
|
||||
//#define SSD1963_800_DRIVER
|
||||
//#define SSD1963_800ALT_DRIVER
|
||||
//#define ILI9225_DRIVER
|
||||
|
||||
// Some displays support SPI reads via the MISO pin, other displays have a single
|
||||
// bi-directional SDA pin and the library will try to read this via the MOSI line.
|
||||
// To use the SDA line for reading data from the TFT uncomment the following line:
|
||||
|
||||
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
|
||||
// #define TFT_WIDTH 80
|
||||
// #define TFT_WIDTH 128
|
||||
// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
|
||||
// #define TFT_HEIGHT 160
|
||||
// #define TFT_HEIGHT 128
|
||||
// #define TFT_HEIGHT 240 // ST7789 240 x 240
|
||||
// #define TFT_HEIGHT 320 // ST7789 240 x 320
|
||||
|
||||
// For ST7735 ONLY, define the type of display, originally this was based on the
|
||||
// colour of the tab on the screen protector film but this is not always true, so try
|
||||
// out the different options below if the screen does not display graphics correctly,
|
||||
// e.g. colours wrong, mirror images, or tray pixels at the edges.
|
||||
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
|
||||
// this User_Setup file, then rebuild and upload the sketch to the board again:
|
||||
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
// #define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_REDTAB
|
||||
// #define ST7735_BLACKTAB
|
||||
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
|
||||
|
||||
// If colours are inverted (white shows as black) then uncomment one of the next
|
||||
// 2 lines try both options, one of the options should correct the inversion.
|
||||
|
||||
// #define TFT_INVERSION_ON
|
||||
// #define TFT_INVERSION_OFF
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// If a backlight control signal is available then define the TFT_BL pin in Section 2
|
||||
// below. The backlight will be turned ON when tft.begin() is called, but the library
|
||||
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
|
||||
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
|
||||
// sketch. e.g. with digitalWrite(TFT_BL, LOW);
|
||||
|
||||
// #define TFT_BL 32 // LED back-light control pin
|
||||
// #define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
|
||||
// Typical setup for the RP2040 is :
|
||||
//
|
||||
// Display SDO/MISO to RP2040 pin D0 (or leave disconnected if not reading TFT)
|
||||
// Display LED to RP2040 pin 3V3 or 5V
|
||||
// Display SCK to RP2040 pin D2
|
||||
// Display SDI/MOSI to RP2040 pin D3
|
||||
// Display DC (RS/AO)to RP2040 pin D18 (can use another pin if desired)
|
||||
// Display RESET to RP2040 pin D19 (can use another pin if desired)
|
||||
// Display CS to RP2040 pin D20 (can use another pin if desired, or GND, see below)
|
||||
// Display GND to RP2040 pin GND (0V)
|
||||
// Display VCC to RP2040 5V or 3.3V (5v if display has a 5V to 3.3V regulator fitted)
|
||||
//
|
||||
// The DC (Data Command) pin may be labelled AO or RS (Register Select)
|
||||
//
|
||||
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
|
||||
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
|
||||
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
|
||||
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
|
||||
|
||||
// The TFT_eSPI library always uses GPIO numbers, this means the following pin designators
|
||||
// must be used dependant on the RP2040 board package loaded
|
||||
// For the Arduino Mbed package the GPIO numbers must be used prefixed with p:
|
||||
#ifdef ARDUINO_ARCH_MBED
|
||||
#define TFT_MISO p4 // Arduino pin D12
|
||||
#define TFT_MOSI p7 // Arduino pin D11
|
||||
#define TFT_SCLK p6 // Arduino pin D13
|
||||
#define TFT_CS p5 // Arduino pin D10
|
||||
#define TFT_DC p20 // Arduino pin D8
|
||||
#define TFT_RST p21 // Arduino pin D9
|
||||
#define TOUCH_CS p19 // Arduino pin D7
|
||||
#else // For Earle Philhower's package the Arduino Dx pin designations must be used:
|
||||
#define TFT_MISO D12
|
||||
#define TFT_MOSI D11
|
||||
#define TFT_SCLK D13
|
||||
#define TFT_CS D10 // Chip select control pin
|
||||
#define TFT_DC D8 // Data Command control pin
|
||||
#define TFT_RST D9 // Reset pin (could connect to Arduino RESET pin)
|
||||
#define TOUCH_CS D7
|
||||
#endif
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// For the RP2040 processor define the SPI port channel used, default is 0
|
||||
// #define TFT_SPI_PORT 1 // Set to 0 if SPI0 pins are used, or 1 if spi1 pins used
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
|
||||
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
|
||||
// With an ILI9163 display 27 MHz works OK.
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
// #define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
// #define SPI_FREQUENCY 32000000
|
||||
#define SPI_FREQUENCY 70000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
32
lib/TFT_eSPI/User_Setups/Setup6_RPi_Wr_ILI9486.h
Normal file
32
lib/TFT_eSPI/User_Setups/Setup6_RPi_Wr_ILI9486.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 6
|
||||
|
||||
#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 PIN_D2 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
#define SPI_FREQUENCY 20000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
37
lib/TFT_eSPI/User_Setups/Setup70_ESP32_S2_ILI9341.h
Normal file
37
lib/TFT_eSPI/User_Setups/Setup70_ESP32_S2_ILI9341.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
// Setup for the ESP32 S2 with ILI9341 display
|
||||
// Note SPI DMA with ESP32 S2 is not currently supported
|
||||
#define USER_SETUP_ID 70
|
||||
// See SetupX_Template.h for all options available
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
// Typical board default pins
|
||||
#define TFT_CS 10 // 10 or 34
|
||||
|
||||
#define TFT_MOSI 11 // 11 or 35
|
||||
#define TFT_SCLK 12 // 12 or 36
|
||||
#define TFT_MISO 13 // 13 or 37
|
||||
|
||||
#define TFT_DC 14
|
||||
#define TFT_RST 15
|
||||
|
||||
//#define TOUCH_CS 16 // Optional for touch screen
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// FSPI port will be used unless the following is defined
|
||||
#define USE_HSPI_PORT
|
||||
|
||||
//#define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000 // Maximum for ILI9341
|
||||
|
||||
#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
48
lib/TFT_eSPI/User_Setups/Setup70b_ESP32_S3_ILI9341.h
Normal file
48
lib/TFT_eSPI/User_Setups/Setup70b_ESP32_S3_ILI9341.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
// Setup for the ESP32 S3 with ILI9341 display
|
||||
// Note SPI DMA with ESP32 S3 is not currently supported
|
||||
#define USER_SETUP_ID 70
|
||||
// See SetupX_Template.h for all options available
|
||||
#define ILI9341_DRIVER
|
||||
|
||||
// Typical board default pins - change to match your board
|
||||
// #define TFT_CS 34 // 10 or 34 (FSPI CS0)
|
||||
// #define TFT_MOSI 35 // 11 or 35 (FSPI D)
|
||||
// #define TFT_SCLK 36 // 12 or 36 (FSPI CLK)
|
||||
// #define TFT_MISO 37 // 13 or 37 (FSPI Q)
|
||||
|
||||
// // Use pins in range 0-31
|
||||
// #define TFT_DC 7
|
||||
// #define TFT_RST 6
|
||||
|
||||
#define TFT_MISO 37
|
||||
#define TFT_MOSI 35
|
||||
#define TFT_SCLK 36
|
||||
#define TFT_CS 6 // Chip select control pin
|
||||
#define TFT_DC 5 // Data Command control pin
|
||||
// #define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
#define TFT_RST 9 // Set TFT_RST to -1 if display RESET is connected to
|
||||
// ESP32 board RST
|
||||
|
||||
//#define TOUCH_CS 16 // Optional for touch screen
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
// FSPI port (SPI2) used unless following defined. HSPI port (SPI3) NOT TESTED
|
||||
// YET
|
||||
//#define USE_HSPI_PORT
|
||||
|
||||
//#define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000 // Maximum for ILI9341
|
||||
|
||||
#define SPI_READ_FREQUENCY \
|
||||
6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
56
lib/TFT_eSPI/User_Setups/Setup70c_ESP32_C3_ILI9341.h
Normal file
56
lib/TFT_eSPI/User_Setups/Setup70c_ESP32_C3_ILI9341.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// Setup for the ESP32 C3 with ILI9341 display
|
||||
// Note SPI DMA with ESP32 C3 is not currently supported
|
||||
|
||||
#define USER_SETUP_ID 70
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ILI9341_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
//#define ILI9488_DRIVER
|
||||
|
||||
// Adafruit qtpy default
|
||||
//TFT_CS 6
|
||||
//TFT_MOSI 7
|
||||
//TFT_MISO 8
|
||||
//TFT_SCLK 10
|
||||
|
||||
// Lolin C3 mini default
|
||||
//TFT_CS 5
|
||||
//TFT_MOSI 4
|
||||
//TFT_MISO 3
|
||||
//TFT_SCLK 2
|
||||
|
||||
//ESP32 C3 generic default
|
||||
//TFT_CS 7
|
||||
//TFT_MOSI 6
|
||||
//TFT_MISO 5
|
||||
//TFT_SCLK 4
|
||||
|
||||
|
||||
#define TFT_CS 7
|
||||
|
||||
#define TFT_MOSI 6
|
||||
#define TFT_MISO 5
|
||||
#define TFT_SCLK 4
|
||||
|
||||
#define TFT_DC 8
|
||||
#define TFT_RST 10
|
||||
|
||||
//#define TOUCH_CS 1 // Optional for touch screen
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
//#define SPI_FREQUENCY 27000000
|
||||
#define SPI_FREQUENCY 40000000 // Maximum for ILI9341
|
||||
|
||||
#define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
36
lib/TFT_eSPI/User_Setups/Setup70d_ILI9488_S3_Parallel.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup70d_ILI9488_S3_Parallel.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#define USER_SETUP_ID 146
|
||||
|
||||
#define TFT_PARALLEL_8_BIT
|
||||
|
||||
//#define ILI9341_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
#define ILI9488_DRIVER
|
||||
|
||||
// ESP32 S3 pins used for the parallel interface TFT
|
||||
#define TFT_CS 9
|
||||
#define TFT_DC 8 // Data Command control pin - must use a GPIO in the range 0-31
|
||||
#define TFT_RST 34
|
||||
|
||||
#define TFT_WR 7 // Write strobe control pin - must use a GPIO in the range 0-31
|
||||
#define TFT_RD 6
|
||||
|
||||
#define TFT_D0 12 // Must use GPIO in the range 0-31 for the data bus
|
||||
#define TFT_D1 13 // so a single register write sets/clears all bits
|
||||
#define TFT_D2 14
|
||||
#define TFT_D3 15
|
||||
#define TFT_D4 16
|
||||
#define TFT_D5 21
|
||||
#define TFT_D6 5
|
||||
#define TFT_D7 4
|
||||
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
29
lib/TFT_eSPI/User_Setups/Setup71_ESP32_S2_ST7789.h
Normal file
29
lib/TFT_eSPI/User_Setups/Setup71_ESP32_S2_ST7789.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Setup for the ESP32 S2 with ST7789 display
|
||||
// Note SPI DMA with ESP32 S2 is not currently supported
|
||||
#define USER_SETUP_ID 71
|
||||
// See SetupX_Template.h for all options available
|
||||
|
||||
#define ST7789_DRIVER // Configure all registers
|
||||
|
||||
|
||||
#define TFT_CS 34 // 10 or 34
|
||||
#define TFT_MOSI 35 // 11 or 35
|
||||
#define TFT_SCLK 37 // 12 or 36
|
||||
#define TFT_MISO 36 // 13 or 37
|
||||
|
||||
#define TFT_DC 33
|
||||
#define TFT_RST -1
|
||||
|
||||
#define LOAD_GLCD
|
||||
#define LOAD_FONT2
|
||||
#define LOAD_FONT4
|
||||
#define LOAD_FONT6
|
||||
#define LOAD_FONT7
|
||||
#define LOAD_FONT8
|
||||
#define LOAD_GFXFF
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 27000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
50
lib/TFT_eSPI/User_Setups/Setup72_ESP32_ST7789_172x320.h
Normal file
50
lib/TFT_eSPI/User_Setups/Setup72_ESP32_ST7789_172x320.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
// Support for 1.47" 320x172 Round Rectangle Color IPS TFT Display
|
||||
#define USER_SETUP_ID 71
|
||||
|
||||
#define ST7789_2_DRIVER // Full configuration option, define additional
|
||||
// parameters
|
||||
// below for this display
|
||||
|
||||
#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
#define TFT_WIDTH 240 // ST7789 172 x 320
|
||||
#define TFT_HEIGHT 320 // ST7789 240 x 320
|
||||
|
||||
// #define TFT_BL 21 // LED back-light control pin
|
||||
#define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
// #define TFT_MOSI 23
|
||||
// #define TFT_SCLK 18
|
||||
// #define TFT_CS 5 // Chip select control pin
|
||||
// #define TFT_DC 22 // Data Command control pin
|
||||
// #define TFT_RST 17 // Reset pin (could connect to RST pin)
|
||||
|
||||
#define TFT_MISO 37
|
||||
#define TFT_MOSI 35
|
||||
#define TFT_SCLK 36
|
||||
#define TFT_CS 6 // Chip select control pin
|
||||
#define TFT_DC 5 // Data Command control pin
|
||||
// #define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
#define TFT_RST 9 // Set TFT_RST to -1 if display RESET is connected to
|
||||
// ESP32 board RST
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in
|
||||
// FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in
|
||||
// FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in
|
||||
// FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH,
|
||||
// only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in
|
||||
// FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH,
|
||||
// only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower,
|
||||
// so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free
|
||||
// fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
#define SPI_FREQUENCY 27000000
|
45
lib/TFT_eSPI/User_Setups/Setup7_ST7735_128x128.h
Normal file
45
lib/TFT_eSPI/User_Setups/Setup7_ST7735_128x128.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 7
|
||||
|
||||
#define ST7735_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_HEIGHT 128
|
||||
|
||||
|
||||
#define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
36
lib/TFT_eSPI/User_Setups/Setup8_ILI9163_128x128.h
Normal file
36
lib/TFT_eSPI/User_Setups/Setup8_ILI9163_128x128.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 8
|
||||
|
||||
#define ILI9163_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_HEIGHT 128
|
||||
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
56
lib/TFT_eSPI/User_Setups/Setup9_ST7735_Overlap.h
Normal file
56
lib/TFT_eSPI/User_Setups/Setup9_ST7735_Overlap.h
Normal file
|
@ -0,0 +1,56 @@
|
|||
// See SetupX_Template.h for all options available
|
||||
#define USER_SETUP_ID 9
|
||||
|
||||
#define ST7735_DRIVER
|
||||
|
||||
|
||||
#define TFT_WIDTH 128
|
||||
#define TFT_HEIGHT 160
|
||||
|
||||
|
||||
#define ST7735_REDTAB
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact
|
||||
// but saves pins for other functions. It is best not to connect MISO as some displays
|
||||
// do not tristate that line when chip select is high!
|
||||
// Note: Only one SPI device can share the FLASH SPI lines, so a SPI touch controller
|
||||
// cannot be connected as well to the same SPI signals.
|
||||
// On NodeMCU 1.0 SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode
|
||||
// On NodeMCU V3 S0 =MISO, S1 =MOSI, S2 =SCLK
|
||||
// In ESP8266 overlap mode the following must be defined
|
||||
#define TFT_SPI_OVERLAP
|
||||
|
||||
// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3
|
||||
#define TFT_CS PIN_D3
|
||||
#define TFT_DC PIN_D5 // Data Command control pin
|
||||
#define TFT_RST PIN_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 LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
366
lib/TFT_eSPI/User_Setups/SetupX_Template.h
Normal file
366
lib/TFT_eSPI/User_Setups/SetupX_Template.h
Normal file
|
@ -0,0 +1,366 @@
|
|||
// USER DEFINED SETTINGS
|
||||
// Set driver type, fonts to be loaded, pins used and SPI control method etc
|
||||
//
|
||||
// See the User_Setup_Select.h file if you wish to be able to define multiple
|
||||
// setups and then easily select which setup file is used by the compiler.
|
||||
//
|
||||
// If this file is edited correctly then all the library example sketches should
|
||||
// run without the need to make any more changes for a particular hardware setup!
|
||||
// Note that some sketches are designed for a particular TFT pixel width/height
|
||||
|
||||
#define USER_SETUP_ID 0xFFFFFFFF
|
||||
|
||||
// Define to disable all #warnings in library (can be put in User_Setup_Select.h)
|
||||
//#define DISABLE_ALL_LIBRARY_WARNINGS
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 1. Call up the right driver file and any options for it
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Define STM32 to invoke optimised processor support (only for STM32)
|
||||
//#define STM32
|
||||
|
||||
// Defining the STM32 board allows the library to optimise the performance
|
||||
// for UNO compatible "MCUfriend" style shields
|
||||
//#define NUCLEO_64_TFT
|
||||
//#define NUCLEO_144_TFT
|
||||
|
||||
// STM32 8 bit parallel only:
|
||||
// If STN32 Port A or B pins 0-7 are used for 8 bit parallel data bus bits 0-7
|
||||
// then this will improve rendering performance by a factor of ~8x
|
||||
//#define STM_PORTA_DATA_BUS
|
||||
//#define STM_PORTB_DATA_BUS
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
//#define TFT_PARALLEL_16_BIT // **** 16 bit parallel ONLY with RP2040 processor ****
|
||||
|
||||
// Display type - only define if RPi display
|
||||
//#define RPI_DISPLAY_TYPE // 20MHz maximum SPI
|
||||
|
||||
// Only define one driver, the other ones must be commented out
|
||||
#define ILI9341_DRIVER // Generic driver for common displays
|
||||
//#define ILI9341_2_DRIVER // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172
|
||||
//#define ILI9342_DRIVER // Landscape default orientation variant of ILI9341
|
||||
//#define ST7735_DRIVER // Define additional parameters below for this display
|
||||
//#define ILI9163_DRIVER // Define additional parameters below for this display
|
||||
//#define S6D02A1_DRIVER
|
||||
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
|
||||
//#define HX8357B_DRIVER
|
||||
//#define HX8357C_DRIVER
|
||||
//#define HX8357D_DRIVER
|
||||
//#define ILI9481_DRIVER
|
||||
//#define ILI9486_DRIVER
|
||||
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
|
||||
//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
|
||||
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
|
||||
//#define R61581_DRIVER
|
||||
//#define RM68120_DRIVER // Untested
|
||||
//#define RM68140_DRIVER
|
||||
//#define ST7796_DRIVER
|
||||
//#define SSD1351_DRIVER
|
||||
//#define SSD1963_480_DRIVER
|
||||
//#define SSD1963_800_DRIVER
|
||||
//#define SSD1963_800ALT_DRIVER
|
||||
//#define ILI9225_DRIVER
|
||||
//#define GC9A01_DRIVER
|
||||
|
||||
// Some displays support SPI reads via the MISO pin, other displays have a single
|
||||
// bi-directional SDA pin and the library will try to read this via the MOSI line.
|
||||
// To use the SDA line for reading data from the TFT uncomment the following line:
|
||||
|
||||
// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 and GC9A01 display only
|
||||
|
||||
// For ST7735, ST7789 and ILI9341 ONLY, define the colour order IF the blue and red are swapped on your display
|
||||
// Try ONE option at a time to find the correct colour order for your display
|
||||
|
||||
// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
|
||||
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
|
||||
|
||||
// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below
|
||||
|
||||
// #define M5STACK
|
||||
|
||||
// For ST7789, ST7735, ILI9163 and GC9A01 ONLY, define the pixel width and height in portrait orientation
|
||||
// #define TFT_WIDTH 80
|
||||
// #define TFT_WIDTH 128
|
||||
// #define TFT_WIDTH 172 // ST7789 172 x 320
|
||||
// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
|
||||
// #define TFT_HEIGHT 160
|
||||
// #define TFT_HEIGHT 128
|
||||
// #define TFT_HEIGHT 240 // ST7789 240 x 240
|
||||
// #define TFT_HEIGHT 320 // ST7789 240 x 320
|
||||
// #define TFT_HEIGHT 240 // GC9A01 240 x 240
|
||||
|
||||
// For ST7735 ONLY, define the type of display, originally this was based on the
|
||||
// colour of the tab on the screen protector film but this is not always true, so try
|
||||
// out the different options below if the screen does not display graphics correctly,
|
||||
// e.g. colours wrong, mirror images, or stray pixels at the edges.
|
||||
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
|
||||
// this User_Setup file, then rebuild and upload the sketch to the board again:
|
||||
|
||||
// #define ST7735_INITB
|
||||
// #define ST7735_GREENTAB
|
||||
// #define ST7735_GREENTAB2
|
||||
// #define ST7735_GREENTAB3
|
||||
// #define ST7735_GREENTAB128 // For 128 x 128 display
|
||||
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
|
||||
// #define ST7735_REDTAB
|
||||
// #define ST7735_BLACKTAB
|
||||
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset
|
||||
|
||||
// If colours are inverted (white shows as black) then uncomment one of the next
|
||||
// 2 lines try both options, one of the options should correct the inversion.
|
||||
|
||||
// #define TFT_INVERSION_ON
|
||||
// #define TFT_INVERSION_OFF
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 2. Define the pins that are used to interface with the display here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// If a backlight control signal is available then define the TFT_BL pin in Section 2
|
||||
// below. The backlight will be turned ON when tft.begin() is called, but the library
|
||||
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
|
||||
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
|
||||
// sketch. e.g. with digitalWrite(TFT_BL, LOW);
|
||||
|
||||
// #define TFT_BL 32 // LED back-light control pin
|
||||
// #define TFT_BACKLIGHT_ON HIGH // Level to turn ON back-light (HIGH or LOW)
|
||||
|
||||
|
||||
|
||||
// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
|
||||
// Typical setup for ESP8266 NodeMCU ESP-12 is :
|
||||
//
|
||||
// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT)
|
||||
// Display LED to NodeMCU pin VIN (or 5V, see below)
|
||||
// Display SCK to NodeMCU pin D5
|
||||
// Display SDI/MOSI to NodeMCU pin D7
|
||||
// Display DC (RS/AO)to NodeMCU pin D3
|
||||
// Display RESET to NodeMCU pin D4 (or RST, see below)
|
||||
// Display CS to NodeMCU pin D8 (or GND, see below)
|
||||
// Display GND to NodeMCU pin GND (0V)
|
||||
// Display VCC to NodeMCU 5V or 3.3V
|
||||
//
|
||||
// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin
|
||||
//
|
||||
// The DC (Data Command) pin may be labelled AO or RS (Register Select)
|
||||
//
|
||||
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
|
||||
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
|
||||
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
|
||||
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
|
||||
//
|
||||
// The NodeMCU D0 pin can be used for RST
|
||||
//
|
||||
//
|
||||
// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin
|
||||
// If 5V is not available at a pin you can use 3.3V but backlight brightness
|
||||
// will be lower.
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ######
|
||||
|
||||
// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
|
||||
#define TFT_CS PIN_D8 // Chip select control pin D8
|
||||
#define TFT_DC PIN_D3 // Data Command control pin
|
||||
#define TFT_RST PIN_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_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin)
|
||||
|
||||
//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
|
||||
// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ######
|
||||
|
||||
// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact
|
||||
// but saves pins for other functions. It is best not to connect MISO as some displays
|
||||
// do not tristate that line when chip select is high!
|
||||
// On NodeMCU 1.0 SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode
|
||||
// On NodeMCU V3 S0 =MISO, S1 =MOSI, S2 =SCLK
|
||||
// In ESP8266 overlap mode the following must be defined
|
||||
|
||||
//#define TFT_SPI_OVERLAP
|
||||
|
||||
// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3
|
||||
//#define TFT_CS PIN_D3
|
||||
//#define TFT_DC PIN_D5 // Data Command control pin
|
||||
//#define TFT_RST PIN_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
|
||||
|
||||
|
||||
// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ######
|
||||
|
||||
// For ESP32 Dev board (only tested with ILI9341 display)
|
||||
// The hardware SPI can be mapped to any pins
|
||||
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_CS 15 // Chip select control pin
|
||||
//#define TFT_DC 2 // Data Command control pin
|
||||
//#define TFT_RST 4 // Reset pin (could connect to RST pin)
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST
|
||||
|
||||
// For ESP32 Dev board (only tested with GC9A01 display)
|
||||
// The hardware SPI can be mapped to any pins
|
||||
|
||||
//#define TFT_MOSI 15 // In some display driver board, it might be written as "SDA" and so on.
|
||||
//#define TFT_SCLK 14
|
||||
//#define TFT_CS 5 // Chip select control pin
|
||||
//#define TFT_DC 27 // Data Command control pin
|
||||
//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
|
||||
//#define TFT_BL 22 // LED back-light
|
||||
|
||||
//#define TOUCH_CS 21 // Chip select pin (T_CS) of touch screen
|
||||
|
||||
//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only
|
||||
|
||||
// For the M5Stack module use these #define lines
|
||||
//#define TFT_MISO 19
|
||||
//#define TFT_MOSI 23
|
||||
//#define TFT_SCLK 18
|
||||
//#define TFT_CS 14 // Chip select control pin
|
||||
//#define TFT_DC 27 // Data Command control pin
|
||||
//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
|
||||
//#define TFT_BL 32 // LED back-light (required for M5Stack)
|
||||
|
||||
// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ######
|
||||
|
||||
// The library supports 8 bit parallel TFTs with the ESP32, the pin
|
||||
// selection below is compatible with ESP32 boards in UNO format.
|
||||
// Wemos D32 boards need to be modified, see diagram in Tools folder.
|
||||
// Only ILI9481 and ILI9341 based displays have been tested!
|
||||
|
||||
// Parallel bus is only supported for the STM32 and ESP32
|
||||
// Example below is for ESP32 Parallel interface with UNO displays
|
||||
|
||||
// Tell the library to use 8 bit parallel mode (otherwise SPI is assumed)
|
||||
//#define TFT_PARALLEL_8_BIT
|
||||
|
||||
// The ESP32 and TFT the pins used for testing are:
|
||||
//#define TFT_CS 33 // Chip select control pin (library pulls permanently low
|
||||
//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RST 32 // Reset pin, toggles on startup
|
||||
|
||||
//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
|
||||
//#define TFT_RD 2 // Read strobe control pin
|
||||
|
||||
//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
|
||||
//#define TFT_D1 13 // so a single register write sets/clears all bits.
|
||||
//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect
|
||||
//#define TFT_D3 25 // TFT screen update performance.
|
||||
//#define TFT_D4 17
|
||||
//#define TFT_D5 16
|
||||
//#define TFT_D6 27
|
||||
//#define TFT_D7 14
|
||||
|
||||
// ###### EDIT THE PINs BELOW TO SUIT YOUR STM32 SPI TFT SETUP ######
|
||||
|
||||
// The TFT can be connected to SPI port 1 or 2
|
||||
//#define TFT_SPI_PORT 1 // SPI port 1 maximum clock rate is 55MHz
|
||||
//#define TFT_MOSI PA7
|
||||
//#define TFT_MISO PA6
|
||||
//#define TFT_SCLK PA5
|
||||
|
||||
//#define TFT_SPI_PORT 2 // SPI port 2 maximum clock rate is 27MHz
|
||||
//#define TFT_MOSI PB15
|
||||
//#define TFT_MISO PB14
|
||||
//#define TFT_SCLK PB13
|
||||
|
||||
// Can use Ardiuno pin references, arbitrary allocation, TFT_eSPI controls chip select
|
||||
//#define TFT_CS D5 // Chip select control pin to TFT CS
|
||||
//#define TFT_DC D6 // Data Command control pin to TFT DC (may be labelled RS = Register Select)
|
||||
//#define TFT_RST D7 // Reset pin to TFT RST (or RESET)
|
||||
// OR alternatively, we can use STM32 port reference names PXnn
|
||||
//#define TFT_CS PE11 // Nucleo-F767ZI equivalent of D5
|
||||
//#define TFT_DC PE9 // Nucleo-F767ZI equivalent of D6
|
||||
//#define TFT_RST PF13 // Nucleo-F767ZI equivalent of D7
|
||||
|
||||
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to processor reset
|
||||
// Use an Arduino pin for initial testing as connecting to processor reset
|
||||
// may not work (pulse too short at power up?)
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 3. Define the fonts that are to be used here
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// Comment out the #defines below with // to stop that font being loaded
|
||||
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
|
||||
// normally necessary. If all fonts are loaded the extra FLASH space required is
|
||||
// about 17Kbytes. To save FLASH space only enable the fonts you need!
|
||||
|
||||
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
|
||||
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
|
||||
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
|
||||
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
|
||||
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
|
||||
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
|
||||
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
|
||||
|
||||
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
|
||||
// this will save ~20kbytes of FLASH
|
||||
#define SMOOTH_FONT
|
||||
|
||||
|
||||
// ##################################################################################
|
||||
//
|
||||
// Section 4. Other options
|
||||
//
|
||||
// ##################################################################################
|
||||
|
||||
// For the RP2040 processor define the SPI port channel used (default 0 if undefined)
|
||||
//#define TFT_SPI_PORT 1 // Set to 0 if SPI0 pins are used, or 1 if spi1 pins used
|
||||
|
||||
// For the STM32 processor define the SPI port channel used (default 1 if undefined)
|
||||
//#define TFT_SPI_PORT 2 // Set to 1 for SPI port 1, or 2 for SPI port 2
|
||||
|
||||
// Define the SPI clock frequency, this affects the graphics rendering speed. Too
|
||||
// fast and the TFT driver will not keep up and display corruption appears.
|
||||
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
|
||||
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
|
||||
// With an ILI9163 display 27 MHz works OK.
|
||||
|
||||
// #define SPI_FREQUENCY 1000000
|
||||
// #define SPI_FREQUENCY 5000000
|
||||
// #define SPI_FREQUENCY 10000000
|
||||
// #define SPI_FREQUENCY 20000000
|
||||
#define SPI_FREQUENCY 27000000
|
||||
// #define SPI_FREQUENCY 40000000
|
||||
// #define SPI_FREQUENCY 55000000 // STM32 SPI1 only (SPI2 maximum is 27MHz)
|
||||
// #define SPI_FREQUENCY 80000000
|
||||
|
||||
// Optional reduced SPI frequency for reading TFT
|
||||
#define SPI_READ_FREQUENCY 20000000
|
||||
|
||||
// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
|
||||
#define SPI_TOUCH_FREQUENCY 2500000
|
||||
|
||||
// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
|
||||
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
|
||||
// then uncomment the following line:
|
||||
//#define USE_HSPI_PORT
|
||||
|
||||
// Comment out the following #define if "SPI Transactions" do not need to be
|
||||
// supported. When commented out the code size will be smaller and sketches will
|
||||
// run slightly faster, so leave it commented out unless you need it!
|
||||
|
||||
// Transaction support is needed to work with SD library but not needed with TFT_SdFat
|
||||
// Transaction support is required if other SPI devices are connected.
|
||||
|
||||
// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex)
|
||||
// so changing it here has no effect
|
||||
|
||||
// #define SUPPORT_TRANSACTIONS
|
41
lib/TFT_eSPI/User_Setups/User_Custom_Fonts.h
Normal file
41
lib/TFT_eSPI/User_Setups/User_Custom_Fonts.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
|
||||
// Custom "Adafruit" compatible font files can be added to the "TFT_eSPI/Fonts/Custom" folder
|
||||
// Fonts in a suitable format can be created using a Squix blog web based tool here:
|
||||
/*
|
||||
https://blog.squix.org/2016/10/font-creator-now-creates-adafruit-gfx-fonts.html
|
||||
*/
|
||||
|
||||
// Note: At the time of writing there is a last character code definition bug in the
|
||||
// Squix font file format so do NOT try and print the tilda (~) symbol (ASCII 0x7E)
|
||||
// Alternatively look at the end of the font header file and edit: 0x7E to read 0x7D
|
||||
/* e.g. vvvv
|
||||
(uint8_t *)Orbitron_Light_32Bitmaps,(GFXglyph *)Orbitron_Light_32Glyphs,0x20, 0x7D, 32};
|
||||
^^^^
|
||||
*/
|
||||
|
||||
// When font files are placed in the Custom folder (TFT_eSPI\Fonts\Custom) then they must
|
||||
// also be #included here:
|
||||
|
||||
// The CF_OL24 etc are a shorthand reference, but this is not essential to use the fonts
|
||||
|
||||
#ifdef LOAD_GFXFF
|
||||
|
||||
// New custom font file #includes
|
||||
#include <Fonts/Custom/Orbitron_Light_24.h> // CF_OL24
|
||||
#include <Fonts/Custom/Orbitron_Light_32.h> // CF_OL32
|
||||
#include <Fonts/Custom/Roboto_Thin_24.h> // CF_RT24
|
||||
#include <Fonts/Custom/Satisfy_24.h> // CF_S24
|
||||
#include <Fonts/Custom/Yellowtail_32.h> // CF_Y32
|
||||
|
||||
#endif
|
||||
|
||||
// Shorthand references - any coding scheme can be used, here CF_ = Custom Font
|
||||
// The #defines below MUST be added to sketches to use shorthand references, so
|
||||
// they are only put here for reference and copy+paste purposes!
|
||||
/*
|
||||
#define CF_OL24 &Orbitron_Light_24
|
||||
#define CF_OL32 &Orbitron_Light_32
|
||||
#define CF_RT24 &Roboto_Thin_24
|
||||
#define CF_S24 &Satisfy_24
|
||||
#define CF_Y32 &Yellowtail_32
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue