User_Setup.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // ---------------------------------------------------------------------------
  2. // TFT_eSPI User_Setup.h for ESP32-S2 + GC9A01 240x240 round TFT
  3. //
  4. // INSTRUCTIONS:
  5. // Copy this file to your TFT_eSPI library folder, replacing the existing
  6. // User_Setup.h, then recompile. Alternatively, place it in the sketch
  7. // folder if your TFT_eSPI version supports sketch-local setup files.
  8. //
  9. // Pin numbers MUST match the wiring in src/config.h.
  10. // ---------------------------------------------------------------------------
  11. // Driver selection
  12. #define GC9A01_DRIVER
  13. // Resolution
  14. #define TFT_WIDTH 240
  15. #define TFT_HEIGHT 240
  16. // SPI pins — update to match your hardware wiring
  17. #define TFT_MOSI 35
  18. #define TFT_SCLK 36
  19. #define TFT_CS 34
  20. #define TFT_DC 33
  21. #define TFT_RST 38
  22. // Backlight is controlled in firmware (PIN_TFT_BL in config.h)
  23. // SPI bus (ESP32-S2 FSPI = SPI2)
  24. #define USE_FSPI_PORT
  25. // SPI clock frequency
  26. #define SPI_FREQUENCY 27000000
  27. #define SPI_READ_FREQUENCY 20000000
  28. // Load built-in fonts
  29. #define LOAD_GLCD
  30. #define LOAD_FONT2
  31. #define LOAD_FONT4
  32. #define LOAD_FONT6
  33. #define LOAD_FONT7
  34. #define LOAD_FONT8
  35. #define LOAD_GFXFF
  36. // Enable smooth (TrueType) font support
  37. #define SMOOTH_FONT