acidportal- 😈 Worlds smallest Evil Portal on a LilyGo T-QT |
git clone git://git.acid.vegas/acidportal.git |
Log | Files | Refs | Archive | README | LICENSE |
Setup28_RPi_ST7796_ESP8266.h (4843B)
1 // USER DEFINED SETTINGS 2 // Set driver type, fonts to be loaded, pins used and SPI control method etc 3 // 4 // See the User_Setup_Select.h file if you wish to be able to define multiple 5 // setups and then easily select which setup file is used by the compiler. 6 // 7 // If this file is edited correctly then all the library example sketches should 8 // run without the need to make any more changes for a particular hardware setup! 9 #define USER_SETUP_ID 28 10 11 // ################################################################################## 12 // 13 // Section 0. Call up the right driver file and any options for it 14 // 15 // ################################################################################## 16 17 // Display type - only define if RPi display 18 #define RPI_DISPLAY_TYPE 19 20 // Only define one driver 21 #define ST7796_DRIVER 22 23 // ################################################################################## 24 // 25 // Section 1. Define the pins that are used to interface with the display here 26 // 27 // ################################################################################## 28 29 // >>>> EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP <<<< 30 31 // These are the recommended default 32 33 // Avoid PIN_D8 as this will prevent upload if display pulls the pin high at boot 34 35 // For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation 36 #define TFT_CS PIN_D2 // Chip select control pin D2 37 #define TFT_DC PIN_D3 // Data Command control pin 38 #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line) 39 //#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V 40 41 #define TOUCH_CS PIN_D1 // Chip select pin (T_CS) of touch screen 42 43 // ################################################################################## 44 // 45 // Section 2. Not used for ESP32 46 // 47 // ################################################################################## 48 49 50 // ################################################################################## 51 // 52 // Section 3. Define the fonts that are to be used here 53 // 54 // ################################################################################## 55 56 // Comment out the #defines below with // to stop that font being loaded 57 // The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not 58 // normally necessary. If all fonts are loaded the extra FLASH space required is 59 // about 17Kbytes. To save FLASH space only enable the fonts you need! 60 61 #define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH 62 #define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters 63 #define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters 64 #define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm 65 #define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:. 66 #define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-. 67 //#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT 68 #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts 69 70 // Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded 71 // this will save ~20kbytes of FLASH 72 #define SMOOTH_FONT 73 74 // ################################################################################## 75 // 76 // Section 4. Not used 77 // 78 // ################################################################################## 79 80 81 // ################################################################################## 82 // 83 // Section 5. Other options 84 // 85 // ################################################################################## 86 87 // Define the SPI clock frequency, this affects the graphics rendering speed. Too 88 // fast and the TFT driver will not keep up and display corruption appears. 89 // With an RPi ST7796 MH4.0 display 80MHz is OK for ESP32, 40MHz maximum for ESP8266 90 91 // #define SPI_FREQUENCY 20000000 92 #define SPI_FREQUENCY 40000000 93 94 #define SPI_TOUCH_FREQUENCY 2500000 95 96 // Comment out the following #define if "SPI Transactions" do not need to be 97 // supported. When commented out the code size will be smaller and sketches will 98 // run slightly faster, so leave it commented out unless you need it! 99 100 // Transaction support is needed to work with SD library but not needed with TFT_SdFat 101 // Transaction support is required if other SPI devices are connected. 102 103 // Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex) 104 // so changing it here has no effect 105 106 #define SUPPORT_TRANSACTIONS