acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

User_Setup_Select.h (16326B)

      1 // This header file contains a list of user setup files and defines which one the
      2 // compiler uses when the IDE performs a Verify/Compile or Upload.
      3 //
      4 // Users can create configurations for different boards and TFT displays.
      5 // This makes selecting between hardware setups easy by "uncommenting" one line.
      6 
      7 // The advantage of this hardware configuration method is that the examples provided
      8 // with the library should work with immediately without any other changes being
      9 // needed. It also improves the portability of users sketches to other hardware
     10 // configurations and compatible libraries.
     11 //
     12 // Create a shortcut to this file on your desktop to permit quick access for editing.
     13 // Re-compile and upload after making and saving any changes to this file.
     14 
     15 // Customised User_Setup files are stored in the "User_Setups" folder.
     16 
     17 // It is also possible for the user tft settings to be included with the sketch, see
     18 // the "Sketch_with_tft_setup" generic example. This may be more convenient for
     19 // multiple projects.
     20 
     21 #ifndef USER_SETUP_LOADED //  Lets PlatformIO users define settings in
     22 //  platformio.ini, see notes in "Tools" folder.
     23 
     24 ///////////////////////////////////////////////////////
     25 //   User configuration selection lines are below    //
     26 ///////////////////////////////////////////////////////
     27 
     28 // Only ONE line below should be uncommented to define your setup.  Add extra lines and files as needed.
     29 
     30 // #include <User_Setup.h>           // Default setup is root library folder
     31 
     32 //#include <User_Setups/Setup1_ILI9341.h>  // Setup file for ESP8266 configured for my ILI9341
     33 //#include <User_Setups/Setup2_ST7735.h>   // Setup file for ESP8266 configured for my ST7735
     34 //#include <User_Setups/Setup3_ILI9163.h>  // Setup file for ESP8266 configured for my ILI9163
     35 //#include <User_Setups/Setup4_S6D02A1.h>  // Setup file for ESP8266 configured for my S6D02A1
     36 //#include <User_Setups/Setup5_RPi_ILI9486.h>        // Setup file for ESP8266 configured for my stock RPi TFT
     37 //#include <User_Setups/Setup6_RPi_Wr_ILI9486.h>     // Setup file for ESP8266 configured for my modified RPi TFT
     38 //#include <User_Setups/Setup7_ST7735_128x128.h>     // Setup file for ESP8266 configured for my ST7735 128x128 display
     39 //#include <User_Setups/Setup8_ILI9163_128x128.h>    // Setup file for ESP8266 configured for my ILI9163 128x128 display
     40 //#include <User_Setups/Setup9_ST7735_Overlap.h>     // Setup file for ESP8266 configured for my ST7735
     41 //#include <User_Setups/Setup10_RPi_touch_ILI9486.h> // Setup file for ESP8266 configured for ESP8266 and RPi TFT with touch
     42 
     43 //#include <User_Setups/Setup11_RPi_touch_ILI9486.h> // Setup file configured for ESP32 and RPi TFT with touch
     44 //#include <User_Setups/Setup12_M5Stack_Basic_Core.h>// Setup file for the ESP32 based M5Stack (Basic Core only)
     45 //#include <User_Setups/Setup13_ILI9481_Parallel.h>  // Setup file for the ESP32 with parallel bus TFT
     46 //#include <User_Setups/Setup14_ILI9341_Parallel.h>  // Setup file for the ESP32 with parallel bus TFT
     47 //#include <User_Setups/Setup15_HX8357D.h>           // Setup file for ESP8266 configured for HX8357D
     48 //#include <User_Setups/Setup16_ILI9488_Parallel.h>  // Setup file for the ESP32 with parallel bus TFT
     49 //#include <User_Setups/Setup17_ePaper.h>            // Setup file for ESP8266 and any Waveshare ePaper display
     50 //#include <User_Setups/Setup18_ST7789.h>            // Setup file for ESP8266 configured for ST7789
     51 
     52 //#include <User_Setups/Setup19_RM68140_Parallel.h>  // Setup file configured for RM68140 with parallel bus
     53 
     54 //#include <User_Setups/Setup20_ILI9488.h>           // Setup file for ESP8266 and ILI9488 SPI bus TFT
     55 //#include <User_Setups/Setup21_ILI9488.h>           // Setup file for ESP32 and ILI9488 SPI bus TFT
     56 
     57 //#include <User_Setups/Setup22_TTGO_T4.h>           // Setup file for ESP32 and TTGO T4 version 1.2
     58 //#include <User_Setups/Setup22_TTGO_T4_v1.3.h>      // Setup file for ESP32 and TTGO T4 version 1.3
     59 //#include <User_Setups/Setup23_TTGO_TM.h>           // Setup file for ESP32 and TTGO TM ST7789 SPI bus TFT
     60 //#include <User_Setups/Setup24_ST7789.h>            // Setup file for DSTIKE/ESP32/ESP8266 configured for ST7789 240 x 240
     61 //#include <User_Setups/Setup25_TTGO_T_Display.h>    // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT
     62 //#include <User_Setups/Setup26_TTGO_T_Wristband.h>  // Setup file for ESP32 and TTGO T-Wristband ST7735 SPI bus TFT
     63 
     64 //#include <User_Setups/Setup27_RPi_ST7796_ESP32.h>    // ESP32   RPi MHS-4.0 inch Display-B
     65 //#include <User_Setups/Setup28_RPi_ST7796_ESP8266.h>  // ESP8266 RPi MHS-4.0 inch Display-B
     66 
     67 //#include <User_Setups/Setup29_ILI9341_STM32.h>          // Setup for Nucleo board
     68 //#include <User_Setups/Setup30_ILI9341_Parallel_STM32.h> // Setup for Nucleo board and parallel display
     69 //#include <User_Setups/Setup31_ST7796_Parallel_STM32.h>  // Setup for Nucleo board and parallel display
     70 //#include <User_Setups/Setup32_ILI9341_STM32F103.h>      // Setup for "Blue/Black Pill"
     71 
     72 //#include <User_Setups/Setup33_RPi_ILI9486_STM32.h>      // Setup for Nucleo board
     73 
     74 //#include <User_Setups/Setup34_ILI9481_Parallel_STM32.h> // Setup for Nucleo board and parallel display
     75 //#include <User_Setups/Setup35_ILI9341_STM32_Port_Bus.h> // Setup for STM32 port A parallel display
     76 
     77 //#include <User_Setups/Setup36_RPi_touch_ST7796.h>      // Setup file configured for ESP32 and RPi ST7796 TFT with touch
     78 
     79 //#include <User_Setups/Setup42_ILI9341_ESP32.h>           // Setup file for ESP32 and SPI ILI9341 240x320
     80 //#include <User_Setups/Setup43_ST7735.h>            // Setup file for ESP8266 & ESP32 configured for my ST7735S 80x160
     81 //#include <User_Setups/Setup44_TTGO_CameraPlus.h>   // Setup file for ESP32 and TTGO T-CameraPlus ST7789 SPI bus TFT    240x240
     82 //#include <User_Setups/Setup45_TTGO_T_Watch.h>      // Setup file for ESP32 and TTGO T-Watch ST7789 SPI bus TFT  240x240
     83 //#include <User_Setups/Setup46_GC9A01_ESP32.h>      // Setup file for ESP32 and GC9A01 SPI bus TFT  240x240
     84 
     85 //#include <User_Setups/Setup47_ST7735.h>            // Setup file for ESP32 configured for ST7735 128 x 128 animated eyes
     86 
     87 //#include <User_Setups/Setup50_SSD1963_Parallel.h>  // Setup file for ESP32 and SSD1963 TFT display
     88 
     89 //#include <User_Setups/Setup51_LilyPi_ILI9481.h>    // Setup file for LilyGo LilyPi with ILI9481 display
     90 //#include <User_Setups/Setup52_LilyPi_ST7796.h>     // Setup file for LilyGo LilyPi with ST7796 display
     91 
     92 //#include <User_Setups/Setup60_RP2040_ILI9341.h>    // Setup file for RP2040 with SPI ILI9341
     93 //#include <User_Setups/Setup61_RP2040_ILI9341_PIO_SPI.h>    // Setup file for RP2040 with PIO SPI ILI9341
     94 //#include <User_Setups/Setup62_RP2040_Nano_Connect_ILI9341.h>    // Setup file for RP2040 with SPI ILI9341
     95 
     96 //#include <User_Setups/Setup70_ESP32_S2_ILI9341.h>     // Setup file for ESP32 S2 with SPI ILI9341
     97 //#include <User_Setups/Setup70b_ESP32_S3_ILI9341.h>    // Setup file for ESP32 S3 with SPI ILI9341
     98 //#include <User_Setups/Setup70c_ESP32_C3_ILI9341.h>    // Setup file for ESP32 C3 with SPI ILI9341
     99 //#include <User_Setups/Setup70d_ILI9488_S3_Parallel.h> // Setup file for ESP32 S3 with SPI ILI9488
    100 
    101 //#include <User_Setups/Setup71_ESP32_S2_ST7789.h>       // Setup file for ESP32 S2 with ST7789
    102 //#include <User_Setups/Setup72_ESP32_ST7789_172x320.h>  // Setup file for ESP32 with ST7789 1.47" 172x320
    103 
    104 //#include <User_Setups/Setup100_RP2040_ILI9488_parallel.h> // Setup file for Pico/RP2040 with 8 bit parallel ILI9488
    105 //#include <User_Setups/Setup101_RP2040_ILI9481_parallel.h> // Setup file for Pico/RP2040 with 8 bit parallel ILI9481
    106 //#include <User_Setups/Setup102_RP2040_ILI9341_parallel.h> // Setup file for Pico/RP2040 with 8 bit parallel ILI9341
    107 //#include <User_Setups/Setup103_RP2040_ILI9486_parallel.h> // Setup file for Pico/RP2040 with 8 bit parallel ILI9486
    108 //#include <User_Setups/Setup104_RP2040_ST7796_parallel.h>  // Setup file for Pico/RP2040 with 8 bit parallel ST7796
    109 
    110 //#include <User_Setups/Setup105_RP2040_ST7796_16bit_parallel.h>  // Setup file for RP2040 16 bit parallel display
    111 //#include <User_Setups/Setup106_RP2040_ILI9481_16bit_parallel.h> // Setup file for RP2040 16 bit parallel display
    112 //#include <User_Setups/Setup107_RP2040_ILI9341_16bit_parallel.h> // Setup file for RP2040 16 bit parallel display
    113 
    114 //#include <User_Setups/Setup135_ST7789.h>           // Setup file for ESP8266 and ST7789 135 x 240 TFT
    115 
    116 //#include <User_Setups/Setup136_LilyGo_TTV.h>       // Setup file for ESP32 and Lilygo TTV ST7789 SPI bus TFT  135x240
    117 //#include <User_Setups/Setup137_LilyGo_TDisplay_RP2040.h>  // Setup file for Lilygo T-Display RP2040 (ST7789 on SPI bus with 135x240 TFT)
    118 
    119 //#include <User_Setups/Setup138_Pico_Explorer_Base_RP2040_ST7789.h> // Setup file for Pico Explorer Base by Pimoroni for RP2040 (ST7789 on SPI bus with 240x240 TFT)
    120 
    121 //#include <User_Setups/Setup200_GC9A01.h>           // Setup file for ESP32 and GC9A01 240 x 240 TFT
    122 
    123 //#include <User_Setups/Setup201_WT32_SC01.h>        // Setup file for ESP32 based WT32_SC01 from Seeed
    124 
    125 //#include <User_Setups/Setup202_SSD1351_128.h>      // Setup file for ESP32/ESP8266 based SSD1351 128x128 1.5inch OLED display
    126 
    127 //#include <User_Setups/Setup203_ST7789.h>     // Setup file for ESP32/ESP8266 based ST7789 240X280 1.69inch TFT
    128 
    129 //#include <User_Setups/Setup204_ESP32_TouchDown.h>     // Setup file for the ESP32 TouchDown based on ILI9488 480 x 320 TFT
    130 
    131 //#include <User_Setups/Setup205_ESP32_TouchDown_S3.h>     // Setup file for the ESP32 TouchDown S3 based on ILI9488 480 x 320 TFT
    132 
    133 //#include <User_Setups/Setup206_LilyGo_T_Display_S3.h>
    134 //#include <User_Setups/Setup207_LilyGo_T_HMI.h>
    135 
    136 //#include <User_Setups/Setup208_ESP32_S3_Box_Lite.h>      // For the ESP32 S3 Box Lite (may also work with ESP32 S3 Box)
    137 
    138 //#include <User_Setups/Setup209_LilyGo_T_Dongle_S3.h>      // For the LilyGo T-Dongle S3 based ESP32 with ST7735 80 x 160 TFT
    139 #include <User_Setups/Setup210_LilyGo_T_Deck.h>      // For the LilyGo T-Dongle S3 based ESP32 with ST7735 80 x 160 TFT
    140 
    141 //#include <User_Setups/Setup301_BW16_ST7735.h>            // Setup file for Bw16-based boards with ST7735 160 x 80 TFT
    142 
    143 //#include <User_Setups/SetupX_Template.h>     // Template file for a setup
    144 
    145 //#include <User_Setups/Dustin_ILI9488.h>           // Setup file for Dustin Watts PCB with ILI9488
    146 //#include <User_Setups/Dustin_ST7796.h>           // Setup file for Dustin Watts PCB with ST7796
    147 //#include <User_Setups/Dustin_ILI9488_Pico.h>        // Setup file for Dustin Watts Pico PCB with ST7796
    148 //#include <User_Setups/Dustin_ST7789_Pico.h>           // Setup file for Dustin Watts PCB with ST7789 240 x 240 on 3.3V adapter board
    149 //#include <User_Setups/Dustin_GC9A01_Pico.h>           // Setup file for Dustin Watts PCB with GC9A01 240 x 240 on 3.3V adapter board
    150 //#include <User_Setups/Dustin_GC9A01_ESP32.h>           // Setup file for Dustin Watts PCB with GC9A01 240 x 240 on 3.3V adapter board
    151 //#include <User_Setups/Dustin_STT7789_ESP32.h>           // Setup file for Dustin Watts PCB with ST7789 240 x 240 on 3.3V adapter board
    152 //#include <User_Setups/Dustin_ILI9341_ESP32.h>           // Setup file for Dustin Watts PCB with ILI9341
    153 //#include <User_Setups/ILI9225.h>
    154 
    155 #endif // USER_SETUP_LOADED
    156 
    157 
    158 
    159 /////////////////////////////////////////////////////////////////////////////////////
    160 //                                                                                 //
    161 //     DON'T TINKER WITH ANY OF THE FOLLOWING LINES, THESE ADD THE TFT DRIVERS     //
    162 //       AND ESP8266 PIN DEFINITONS, THEY ARE HERE FOR BODMER'S CONVENIENCE!       //
    163 //                                                                                 //
    164 /////////////////////////////////////////////////////////////////////////////////////
    165 
    166 
    167 // Identical looking TFT displays may have a different colour ordering in the 16 bit colour
    168 #define TFT_BGR 0   // Colour order Blue-Green-Red
    169 #define TFT_RGB 1   // Colour order Red-Green-Blue
    170 
    171 // Legacy setup support, RPI_DISPLAY_TYPE replaces RPI_DRIVER
    172 #if defined (RPI_DRIVER)
    173 #if !defined (RPI_DISPLAY_TYPE)
    174 #define RPI_DISPLAY_TYPE
    175 #endif
    176 #endif
    177 
    178 // Legacy setup support, RPI_ILI9486_DRIVER form is deprecated
    179 // Instead define RPI_DISPLAY_TYPE and also define driver (e.g. ILI9486_DRIVER)
    180 #if defined (RPI_ILI9486_DRIVER)
    181 #if !defined (ILI9486_DRIVER)
    182 #define ILI9486_DRIVER
    183 #endif
    184 #if !defined (RPI_DISPLAY_TYPE)
    185 #define RPI_DISPLAY_TYPE
    186 #endif
    187 #endif
    188 
    189 // Invoke 18 bit colour for selected displays
    190 #if !defined (RPI_DISPLAY_TYPE) && !defined (TFT_PARALLEL_8_BIT) && !defined (TFT_PARALLEL_16_BIT) && !defined (ESP32_PARALLEL)
    191 #if defined (ILI9481_DRIVER) || defined (ILI9486_DRIVER) || defined (ILI9488_DRIVER)
    192 #define SPI_18BIT_DRIVER
    193 #endif
    194 #endif
    195 
    196 // Load the right driver definition - do not tinker here !
    197 #if   defined (ILI9341_DRIVER) || defined(ILI9341_2_DRIVER) || defined (ILI9342_DRIVER)
    198 #include <TFT_Drivers/ILI9341_Defines.h>
    199 #define  TFT_DRIVER 0x9341
    200 #elif defined (ST7735_DRIVER)
    201 #include <TFT_Drivers/ST7735_Defines.h>
    202 #define  TFT_DRIVER 0x7735
    203 #elif defined (ILI9163_DRIVER)
    204 #include <TFT_Drivers/ILI9163_Defines.h>
    205 #define  TFT_DRIVER 0x9163
    206 #elif defined (S6D02A1_DRIVER)
    207 #include <TFT_Drivers/S6D02A1_Defines.h>
    208 #define  TFT_DRIVER 0x6D02
    209 #elif defined (ST7796_DRIVER)
    210 #include "TFT_Drivers/ST7796_Defines.h"
    211 #define  TFT_DRIVER 0x7796
    212 #elif defined (ILI9486_DRIVER)
    213 #include <TFT_Drivers/ILI9486_Defines.h>
    214 #define  TFT_DRIVER 0x9486
    215 #elif defined (ILI9481_DRIVER)
    216 #include <TFT_Drivers/ILI9481_Defines.h>
    217 #define  TFT_DRIVER 0x9481
    218 #elif defined (ILI9488_DRIVER)
    219 #include <TFT_Drivers/ILI9488_Defines.h>
    220 #define  TFT_DRIVER 0x9488
    221 #elif defined (HX8357D_DRIVER)
    222 #include "TFT_Drivers/HX8357D_Defines.h"
    223 #define  TFT_DRIVER 0x8357
    224 #elif defined (EPD_DRIVER)
    225 #include "TFT_Drivers/EPD_Defines.h"
    226 #define  TFT_DRIVER 0xE9D
    227 #elif defined (ST7789_DRIVER)
    228 #include "TFT_Drivers/ST7789_Defines.h"
    229 #define  TFT_DRIVER 0x7789
    230 #elif defined (R61581_DRIVER)
    231 #include "TFT_Drivers/R61581_Defines.h"
    232 #define  TFT_DRIVER 0x6158
    233 #elif defined (ST7789_2_DRIVER)
    234 #include "TFT_Drivers/ST7789_2_Defines.h"
    235 #define  TFT_DRIVER 0x778B
    236 #elif defined (RM68140_DRIVER)
    237 #include "TFT_Drivers/RM68140_Defines.h"
    238 #define  TFT_DRIVER 0x6814
    239 #elif defined (SSD1351_DRIVER)
    240 #include "TFT_Drivers/SSD1351_Defines.h"
    241 #define  TFT_DRIVER 0x1351
    242 #elif defined (SSD1963_480_DRIVER)
    243 #include "TFT_Drivers/SSD1963_Defines.h"
    244 #define  TFT_DRIVER 0x1963
    245 #elif defined (SSD1963_800_DRIVER)
    246 #include "TFT_Drivers/SSD1963_Defines.h"
    247 #define  TFT_DRIVER 0x1963
    248 #elif defined (SSD1963_800ALT_DRIVER)
    249 #include "TFT_Drivers/SSD1963_Defines.h"
    250 #define  TFT_DRIVER 0x1963
    251 #elif defined (SSD1963_800BD_DRIVER)
    252 #include "TFT_Drivers/SSD1963_Defines.h"
    253 #define  TFT_DRIVER 0x1963
    254 #elif defined (GC9A01_DRIVER)
    255 #include "TFT_Drivers/GC9A01_Defines.h"
    256 #define  TFT_DRIVER 0x9A01
    257 #elif defined (ILI9225_DRIVER)
    258 #include "TFT_Drivers/ILI9225_Defines.h"
    259 #define  TFT_DRIVER 0x9225
    260 #elif defined (RM68120_DRIVER)
    261 #include "TFT_Drivers/RM68120_Defines.h"
    262 #define  TFT_DRIVER 0x6812
    263 #elif defined (HX8357B_DRIVER)
    264 #include "TFT_Drivers/HX8357B_Defines.h"
    265 #define  TFT_DRIVER 0x835B
    266 #elif defined (HX8357C_DRIVER)
    267 #include "TFT_Drivers/HX8357C_Defines.h"
    268 #define  TFT_DRIVER 0x835C
    269 
    270 // <<<<<<<<<<<<<<<<<<<<<<<< ADD NEW DRIVER HERE
    271 // XYZZY_init.h and XYZZY_rotation.h must also be added in TFT_eSPI.cpp
    272 #elif defined (XYZZY_DRIVER)
    273 #include "TFT_Drivers/XYZZY_Defines.h"
    274 #define  TFT_DRIVER 0x0000
    275 #else
    276 #define  TFT_DRIVER 0x0000
    277 #endif
    278 
    279 // These are the pins for ESP8266 boards
    280 //      Name   GPIO    NodeMCU      Function
    281 #define PIN_D0  16  // GPIO16       WAKE
    282 #define PIN_D1   5  // GPIO5        User purpose
    283 #define PIN_D2   4  // GPIO4        User purpose
    284 #define PIN_D3   0  // GPIO0        Low on boot means enter FLASH mode
    285 #define PIN_D4   2  // GPIO2        TXD1 (must be high on boot to go to UART0 FLASH mode)
    286 #define PIN_D5  14  // GPIO14       HSCLK
    287 #define PIN_D6  12  // GPIO12       HMISO
    288 #define PIN_D7  13  // GPIO13       HMOSI  RXD2
    289 #define PIN_D8  15  // GPIO15       HCS    TXD0 (must be low on boot to enter UART0 FLASH mode)
    290 #define PIN_D9   3  //              RXD0
    291 #define PIN_D10  1  //              TXD0
    292 
    293 #define PIN_MOSI 8  // SD1          FLASH and overlap mode
    294 #define PIN_MISO 7  // SD0
    295 #define PIN_SCLK 6  // CLK
    296 #define PIN_HWCS 0  // D3
    297 
    298 #define PIN_D11  9  // SD2
    299 #define PIN_D12 10  // SD4