acidportal

- 😈 Worlds smallest Evil Portal on a LilyGo T-QT
git clone git://git.acid.vegas/acidportal.git
Log | Files | Refs | Archive | README | LICENSE

Setup202_SSD1351_128.h (2570B)

      1 // See SetupX_Template.h for all options available
      2 #define USER_SETUP_ID 202
      3 
      4 #define SSD1351_DRIVER
      5 
      6 
      7 #define TFT_WIDTH  128
      8 #define TFT_HEIGHT 128
      9 
     10 
     11 #define SSD1351_1DOT5_INCH_128 // For 128 x 128 display
     12 
     13 // Wiring:
     14 //   +-------------+------------+-------------------------------------------------------------------+
     15 //   | Display PCB |  TFT_eSPI  |                               Info                                |
     16 //   +-------------+------------+-------------------------------------------------------------------+
     17 //   | GND         | GND (0V)   | Common                                                            |
     18 //   | VCC         | 5V or 3.3V | Better to power with 5V if display PCB supports it                |
     19 //   | DIN         | TFT_MOSI   | SPI data                                                          |
     20 //   | SCK         | TFT_SCLK   | SPI clock                                                         |
     21 //   | DC          | TFT_DC     | Distinguish between a command or its data                         |
     22 //   | RST         | TFT_RST    | Hardware reset, can connect to MCU RST pin as well                |
     23 //   | CS          | TFT_CS     | Chip select, Set to -1 if for manually use with multiple displays |
     24 //   +-------------+------------+-------------------------------------------------------------------+
     25 #if defined(ESP32)
     26   #define TFT_MOSI 23
     27   #define TFT_SCLK 18
     28   #define TFT_DC   2
     29   #define TFT_RST  4
     30   #define TFT_CS   15
     31 #elif defined (ARDUINO_ARCH_ESP8266)
     32 //#define TFT_MOSI PIN_D5 // Can't change
     33 //#define TFT_SCLK PIN_D7 // Can't change
     34   #define TFT_DC   PIN_D3
     35   #define TFT_RST  PIN_D4
     36   #define TFT_CS   PIN_D8
     37 #endif
     38 
     39 
     40 #define LOAD_GLCD   // Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
     41 #define LOAD_FONT2  // Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
     42 #define LOAD_FONT4  // Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
     43 #define LOAD_FONT6  // Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
     44 #define LOAD_FONT7  // 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
     45 #define LOAD_FONT8  // Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
     46 //#define LOAD_FONT8N // Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
     47 #define LOAD_GFXFF  // FreeFonts- 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
     48 #define SMOOTH_FONT
     49 
     50 
     51 #define SPI_FREQUENCY  20000000
     52 //#define SPI_FREQUENCY  40000000 // Works after shielding the wires!