User_Setup_Select.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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 Espressif boards and TFT displays.
  5. // This makes selecting between hardware setups easy by "uncommenting" one line.
  6. // The advantage of this hardware configuration method is that the examples provided
  7. // with the library should work with different setups immediately without any other
  8. // changes being needed. It also improves the portability of users sketches to other
  9. // hardware configurations and compatible libraries.
  10. //
  11. // Create a shortcut to this file on your desktop to permit quick access for editing.
  12. // Re-compile and upload after making and saving any changes to this file.
  13. // Customised User_Setup files are stored in the "User_Setups" folder.
  14. #ifndef USER_SETUP_LOADED // Lets PlatformIO users define settings in
  15. // platformio.ini, see notes in "Tools" folder.
  16. // Only ONE line below should be uncommented. Add extra lines and files as needed.
  17. //#include <User_Setup.h> // Default setup is root library folder
  18. //#include <User_Setup_og_marauder.h>
  19. #include <User_Setup_marauder_mini.h>
  20. //#include <User_Setups/Setup1_ILI9341.h> // Setup file configured for my ILI9341
  21. //#include <User_Setups/Setup2_ST7735.h> // Setup file configured for my ST7735
  22. //#include <User_Setups/Setup3_ILI9163.h> // Setup file configured for my ILI9163
  23. //#include <User_Setups/Setup4_S6D02A1.h> // Setup file configured for my S6D02A1
  24. //#include <User_Setups/Setup5_RPi_ILI9486.h> // Setup file configured for my stock RPi TFT
  25. //#include <User_Setups/Setup6_RPi_Wr_ILI9486.h> // Setup file configured for my modified RPi TFT
  26. //#include <User_Setups/Setup7_ST7735_128x128.h> // Setup file configured for my ST7735 128x128 display
  27. //#include <User_Setups/Setup8_ILI9163_128x128.h> // Setup file configured for my ILI9163 128x128 display
  28. //#include <User_Setups/Setup9_ST7735_Overlap.h> // Setup file configured for my ST7735
  29. //#include <User_Setups/Setup10_RPi_touch_ILI9486.h> // Setup file configured for ESP8266 and RPi TFT with touch
  30. //#include <User_Setups/Setup11_RPi_touch_ILI9486.h> // Setup file configured for ESP32 and RPi TFT with touch
  31. //#include <User_Setups/Setup12_M5Stack.h> // Setup file for the ESP32 based M5Stack
  32. //#include <User_Setups/Setup13_ILI9481_Parallel.h> // Setup file for the ESP32 with parallel bus TFT
  33. //#include <User_Setups/Setup14_ILI9341_Parallel.h> // Setup file for the ESP32 with parallel bus TFT
  34. //#include <User_Setups/Setup15_HX8357D.h> // Setup file configured for HX8357D (untested)
  35. //#include <User_Setups/Setup16_ILI9488_Parallel.h> // Setup file for the ESP32 with parallel bus TFT
  36. //#include <User_Setups/Setup17_ePaper.h> // Setup file for any Waveshare ePaper display
  37. //#include <User_Setups/Setup18_ST7789.h> // Setup file configured for ST7789
  38. //#include <User_Setups/Setup19_RM68140_Parallel.h> // Setup file configured for RM68140 with parallel bus
  39. //#include <User_Setups/Setup20_ILI9488.h> // Setup file for ESP8266 and ILI9488 SPI bus TFT
  40. //#include <User_Setups/Setup21_ILI9488.h> // Setup file for ESP32 and ILI9488 SPI bus TFT
  41. //#include <User_Setups/Setup22_TTGO_T4.h> // Setup file for ESP32 and TTGO T4 (BTC) ILI9341 SPI bus TFT
  42. //#include <User_Setups/Setup23_TTGO_TM.h> // Setup file for ESP32 and TTGO TM ST7789 SPI bus TFT
  43. //#include <User_Setups/Setup24_ST7789.h> // Setup file configured for ST7789 240 x 240
  44. //#include <User_Setups/Setup25_TTGO_T_Display.h> // Setup file for ESP32 and TTGO T-Display ST7789V SPI bus TFT
  45. //#include <User_Setups/Setup26_TTGO_T_Wristband.h> // Setup file for ESP32 and TTGO T-Wristband ST7735 SPI bus TFT
  46. //#include <User_Setups/Setup27_RPi_ST7796_ESP32.h> // ESP32 RPi MHS-4.0 inch Display-B
  47. //#include <User_Setups/Setup28_RPi_ST7796_ESP8266.h> // ESP8266 RPi MHS-4.0 inch Display-B
  48. //#include <User_Setups/Setup29_ILI9341_STM32.h> // Setup for Nucleo board
  49. //#include <User_Setups/Setup30_ILI9341_Parallel_STM32.h> // Setup for Nucleo board and parallel display
  50. //#include <User_Setups/Setup31_ST7796_Parallel_STM32.h> // Setup for Nucleo board and parallel display
  51. //#include <User_Setups/Setup32_ILI9341_STM32F103.h> // Setup for "Blue Pill"
  52. //#include <User_Setups/Setup43_ST7735.h> // Setup file configured for my ST7735S 80x160
  53. //#include <User_Setups/Setup135_ST7789.h> // Setup file for ESP8266 and ST7789 135 x 240 TFT
  54. //#include <User_Setups/SetupX_Template.h>
  55. #endif // USER_SETUP_LOADED
  56. /////////////////////////////////////////////////////////////////////////////////////
  57. // //
  58. // DON'T TINKER WITH ANY OF THE FOLLOWING LINES, THESE ADD THE TFT DRIVERS //
  59. // AND ESP8266 PIN DEFINITONS, THEY ARE HERE FOR BODMER'S CONVENIENCE! //
  60. // //
  61. /////////////////////////////////////////////////////////////////////////////////////
  62. // Identical looking TFT displays may have a different colour ordering in the 16 bit colour
  63. #define TFT_BGR 0 // Colour order Blue-Green-Red
  64. #define TFT_RGB 1 // Colour order Red-Green-Blue
  65. // Legacy setup support, RPI_DISPLAY_TYPE replaces RPI_DRIVER
  66. #if defined (RPI_DRIVER)
  67. #if !defined (RPI_DISPLAY_TYPE)
  68. #define RPI_DISPLAY_TYPE
  69. #endif
  70. #endif
  71. // Legacy setup support, RPI_ILI9486_DRIVER form is deprecated
  72. // Instead define RPI_DISPLAY_TYPE and also define driver (e.g. ILI9486_DRIVER)
  73. #if defined (RPI_ILI9486_DRIVER)
  74. #if !defined (ILI9486_DRIVER)
  75. #define ILI9486_DRIVER
  76. #endif
  77. #if !defined (RPI_DISPLAY_TYPE)
  78. #define RPI_DISPLAY_TYPE
  79. #endif
  80. #endif
  81. // Load the right driver definition - do not tinker here !
  82. #if defined (ILI9341_DRIVER)
  83. #include <TFT_Drivers/ILI9341_Defines.h>
  84. #define TFT_DRIVER 0x9341
  85. #elif defined (ST7735_DRIVER)
  86. #include <TFT_Drivers/ST7735_Defines.h>
  87. #define TFT_DRIVER 0x7735
  88. #elif defined (ILI9163_DRIVER)
  89. #include <TFT_Drivers/ILI9163_Defines.h>
  90. #define TFT_DRIVER 0x9163
  91. #elif defined (S6D02A1_DRIVER)
  92. #include <TFT_Drivers/S6D02A1_Defines.h>
  93. #define TFT_DRIVER 0x6D02
  94. #elif defined (ST7796_DRIVER)
  95. #include "TFT_Drivers/ST7796_Defines.h"
  96. #define TFT_DRIVER 0x7796
  97. #elif defined (ILI9486_DRIVER)
  98. #include <TFT_Drivers/ILI9486_Defines.h>
  99. #define TFT_DRIVER 0x9486
  100. #elif defined (ILI9481_DRIVER)
  101. #include <TFT_Drivers/ILI9481_Defines.h>
  102. #define TFT_DRIVER 0x9481
  103. #elif defined (ILI9488_DRIVER)
  104. #include <TFT_Drivers/ILI9488_Defines.h>
  105. #define TFT_DRIVER 0x9488
  106. #elif defined (HX8357D_DRIVER)
  107. #include "TFT_Drivers/HX8357D_Defines.h"
  108. #define TFT_DRIVER 0x8357
  109. #elif defined (EPD_DRIVER)
  110. #include "TFT_Drivers/EPD_Defines.h"
  111. #define TFT_DRIVER 0xE9D
  112. #elif defined (ST7789_DRIVER)
  113. #include "TFT_Drivers/ST7789_Defines.h"
  114. #define TFT_DRIVER 0x7789
  115. #elif defined (R61581_DRIVER)
  116. #include "TFT_Drivers/R61581_Defines.h"
  117. #define TFT_DRIVER 0x6158
  118. #elif defined (ST7789_2_DRIVER)
  119. #include "TFT_Drivers/ST7789_2_Defines.h"
  120. #define TFT_DRIVER 0x778B
  121. #elif defined (RM68140_DRIVER)
  122. #include "TFT_Drivers/RM68140_Defines.h"
  123. #define TFT_DRIVER 0x6814
  124. // <<<<<<<<<<<<<<<<<<<<<<<< ADD NEW DRIVER HERE
  125. // XYZZY_init.h and XYZZY_rotation.h must also be added in TFT_eSPI.c
  126. #elif defined (XYZZY_DRIVER)
  127. #include "TFT_Drivers/XYZZY_Defines.h"
  128. #define TFT_DRIVER 0x0000
  129. #else
  130. #define TFT_DRIVER 0x0000
  131. #endif
  132. // These are the pins for ESP8266 boards
  133. // Name GPIO NodeMCU Function
  134. #define PIN_D0 16 // GPIO16 WAKE
  135. #define PIN_D1 5 // GPIO5 User purpose
  136. #define PIN_D2 4 // GPIO4 User purpose
  137. #define PIN_D3 0 // GPIO0 Low on boot means enter FLASH mode
  138. #define PIN_D4 2 // GPIO2 TXD1 (must be high on boot to go to UART0 FLASH mode)
  139. #define PIN_D5 14 // GPIO14 HSCLK
  140. #define PIN_D6 12 // GPIO12 HMISO
  141. #define PIN_D7 13 // GPIO13 HMOSI RXD2
  142. #define PIN_D8 15 // GPIO15 HCS TXD0 (must be low on boot to enter UART0 FLASH mode)
  143. #define PIN_D9 3 // RXD0
  144. #define PIN_D10 1 // TXD0
  145. #define PIN_MOSI 8 // SD1 FLASH and overlap mode
  146. #define PIN_MISO 7 // SD0
  147. #define PIN_SCLK 6 // CLK
  148. #define PIN_HWCS 0 // D3
  149. #define PIN_D11 9 // SD2
  150. #define PIN_D12 10 // SD4