Skip to content

Commit

Permalink
Add TTGO T-Display
Browse files Browse the repository at this point in the history
Adds the TTGO T-Display to the Kconfig system.
Changes taken from:
Xinyuan-LilyGO/TTGO-T-Display#8
  • Loading branch information
frhun committed Mar 21, 2020
1 parent dd5ecde commit fd47bd9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/tft/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config TFT_PREDEFINED_DISPLAY_TYPE
default 2 if TFT_PREDEFINED_DISPLAY_TYPE2
default 3 if TFT_PREDEFINED_DISPLAY_TYPE3
default 4 if TFT_PREDEFINED_DISPLAY_TYPE4
default 5 if TFT_PREDEFINED_DISPLAY_TYPE5

choice
prompt "Select predefined display configuration"
Expand All @@ -24,6 +25,8 @@ config TFT_PREDEFINED_DISPLAY_TYPE
bool "Adafruit TFT Feather Display"
config TFT_PREDEFINED_DISPLAY_TYPE3
bool "M5Stack TFT Display"
config TFT_PREDEFINED_DISPLAY_TYPE5
bool "TTGO T-DISPLAY (ST7789V)"
endchoice

if TFT_PREDEFINED_DISPLAY_TYPE0
Expand Down
28 changes: 28 additions & 0 deletions components/tft/tftspi.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#define DISP_TYPE_ST7735R 4
#define DISP_TYPE_ST7735B 5



#if CONFIG_TFT_PREDEFINED_DISPLAY_TYPE == 1

// ** Set the correct configuration for ESP-WROVER-KIT v3
Expand Down Expand Up @@ -152,6 +154,32 @@
#define PIN_BCKL_ON 0 // GPIO value for backlight ON
#define PIN_BCKL_OFF 1 // GPIO value for backlight OFF
// --------------------------------------------------------
#elif CONFIG_TFT_PREDEFINED_DISPLAY_TYPE == 5
//CONFIG FOR TTGO T-DISPLAY
#define DEFAULT_DISP_TYPE DISP_TYPE_ST7789V
#define DEFAULT_TFT_DISPLAY_WIDTH 240
#define DEFAULT_TFT_DISPLAY_HEIGHT 320
#define DISP_COLOR_BITS_24 0x66
#define DEFAULT_GAMMA_CURVE 0
#define DEFAULT_SPI_CLOCK 20000000
#define TFT_INVERT_ROTATION 0
#define TFT_INVERT_ROTATION1 1
#define TFT_RGB_BGR 0x00

#define USE_TOUCH TOUCH_TYPE_NONE

#define PIN_NUM_MISO 0 // SPI MISO
#define PIN_NUM_MOSI 19 // SPI MOSI
#define PIN_NUM_CLK 18 // SPI CLOCK pin
#define PIN_NUM_CS 5 // Display CS pin
#define PIN_NUM_DC 16 // Display command/data pin
#define PIN_NUM_TCS 0 // Touch screen CS pin

#define PIN_NUM_RST 23 // GPIO used for RESET control
#define PIN_NUM_BCKL 4 // GPIO used for backlight control
#define PIN_BCKL_ON 1 // GPIO value for backlight ON
#define PIN_BCKL_OFF 0 // GPIO value for backlight OFF
//END TTGO T_DISPLAY

#else

Expand Down

0 comments on commit fd47bd9

Please sign in to comment.