commit
1e9a7a3f82
|
@ -21,6 +21,21 @@ extern "C" {
|
|||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/* DISP_BUF_SIZE value doesn't have an special meaning, but it's the size
|
||||
* of the buffer(s) passed to LVGL as display buffers. The default values used
|
||||
* were the values working for the contributor of the display controller.
|
||||
*
|
||||
* As LVGL supports partial display updates the DISP_BUF_SIZE doesn't
|
||||
* necessarily need to be equal to the display size.
|
||||
*
|
||||
* When using RGB displays the display buffer size will also depends on the
|
||||
* color format being used, for RGB565 each pixel needs 2 bytes.
|
||||
* When using the mono theme, the display pixels can be represented in one bit,
|
||||
* so the buffer size can be divided by 8, e.g. see SSD1306 display size. */
|
||||
#if defined (CONFIG_CUSTOM_DISPLAY_BUFFER_SIZE)
|
||||
#define DISP_BUF_SIZE CONFIG_CUSTOM_DISPLAY_BUFFER_BYTES
|
||||
#else
|
||||
#if defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789)
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
|
||||
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S
|
||||
|
@ -38,7 +53,7 @@ extern "C" {
|
|||
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
|
||||
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 64)
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
|
||||
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306
|
||||
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * (LV_VER_RES_MAX / 8))
|
||||
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X)
|
||||
|
@ -57,6 +72,7 @@ extern "C" {
|
|||
#else
|
||||
#error "No display controller selected"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
|
|
|
@ -328,6 +328,18 @@ menu "LVGL TFT Display controller"
|
|||
select LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
endchoice
|
||||
|
||||
config CUSTOM_DISPLAY_BUFFER_SIZE
|
||||
bool "Use custom display buffer size (bytes)"
|
||||
help
|
||||
Enable to use a custom display buffer size.
|
||||
|
||||
config CUSTOM_DISPLAY_BUFFER_BYTES
|
||||
int "Custom buffer size (bytes)"
|
||||
depends on CUSTOM_DISPLAY_BUFFER_SIZE
|
||||
default 1024
|
||||
help
|
||||
See Display buffer on LVGL docs for more information.
|
||||
|
||||
# Select one of the available FT81x configurations.
|
||||
choice
|
||||
prompt "Select a FT81x configuration." if LV_TFT_DISPLAY_USER_CONTROLLER_FT81X
|
||||
|
@ -728,7 +740,9 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
config LV_DISP_SPI_MOSI
|
||||
int "GPIO for MOSI (Master Out Slave In)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 23 if LV_PREDEFINED_DISPLAY_WROVER4
|
||||
default 23 if LV_PREDEFINED_DISPLAY_ATAG
|
||||
default 23 if LV_PREDEFINED_DISPLAY_M5STACK || LV_PREDEFINED_DISPLAY_M5STICK
|
||||
|
@ -753,7 +767,9 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_SPI_MISO
|
||||
int "GPIO for MISO (Master In Slave Out)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
depends on LV_DISPLAY_USE_SPI_MISO
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 19 if LV_PREDEFINED_PINS_TKOALA
|
||||
default 0
|
||||
|
||||
|
@ -772,7 +788,9 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_SPI_IO2
|
||||
int "GPIO for Quad SPI IO2/WP" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
depends on LV_TFT_DISPLAY_SPI_TRANS_MODE_QIO
|
||||
range -1 39
|
||||
range -1 39 if IDF_TARGET_ESP32
|
||||
range -1 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 22 if LV_PREDEFINED_PINS_TKOALA && LV_TFT_DISPLAY_SPI_TRANS_MODE_QIO
|
||||
default -1
|
||||
help
|
||||
|
@ -781,7 +799,9 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_SPI_IO3
|
||||
int "GPIO for Quad SPI IO3/HD" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
depends on LV_TFT_DISPLAY_SPI_TRANS_MODE_QIO
|
||||
range -1 39
|
||||
range -1 39 if IDF_TARGET_ESP32
|
||||
range -1 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 21 if LV_PREDEFINED_PINS_TKOALA && LV_TFT_DISPLAY_SPI_TRANS_MODE_QIO
|
||||
default -1
|
||||
help
|
||||
|
@ -789,7 +809,9 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
config LV_DISP_SPI_CLK
|
||||
int "GPIO for CLK (SCK / Serial Clock)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 18 if LV_PREDEFINED_DISPLAY_M5STACK || LV_PREDEFINED_DISPLAY_M5STICK
|
||||
default 13 if LV_PREDEFINED_DISPLAY_M5STICKC
|
||||
default 18 if LV_PREDEFINED_DISPLAY_ATAG
|
||||
|
@ -814,7 +836,9 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_SPI_CS
|
||||
int "GPIO for CS (Slave Select)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
depends on LV_DISPLAY_USE_SPI_CS
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 5 if LV_PREDEFINED_PINS_38V1
|
||||
default 14 if LV_PREDEFINED_DISPLAY_M5STACK || LV_PREDEFINED_DISPLAY_M5STICK
|
||||
default 5 if LV_PREDEFINED_DISPLAY_M5STICKC
|
||||
|
@ -839,7 +863,9 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
config LV_DISP_PIN_DC
|
||||
int "GPIO for DC (Data / Command)" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
depends on LV_DISPLAY_USE_DC
|
||||
default 19 if LV_PREDEFINED_PINS_38V1
|
||||
default 17 if LV_PREDEFINED_PINS_38V4
|
||||
|
@ -859,7 +885,9 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
config LV_DISP_PIN_RST
|
||||
int "GPIO for Reset" if LV_TFT_DISPLAY_PROTOCOL_SPI
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 18 if LV_PREDEFINED_PINS_38V1
|
||||
default 25 if LV_PREDEFINED_PINS_38V4
|
||||
default 33 if LV_PREDEFINED_DISPLAY_M5STACK || LV_PREDEFINED_DISPLAY_M5STICK
|
||||
|
@ -878,7 +906,9 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
config LV_DISP_PIN_BUSY
|
||||
int "GPIO for Busy" if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 35 if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D
|
||||
default 35
|
||||
|
||||
|
@ -914,7 +944,9 @@ menu "LVGL TFT Display controller"
|
|||
config LV_DISP_PIN_BCKL
|
||||
int "GPIO for Backlight Control"
|
||||
depends on LV_ENABLE_BACKLIGHT_CONTROL
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 23 if LV_PREDEFINED_PINS_38V1
|
||||
default 26 if LV_PREDEFINED_PINS_38V4
|
||||
default 32 if LV_PREDEFINED_DISPLAY_M5STACK
|
||||
|
@ -932,7 +964,9 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
config LV_DISP_PIN_SDA
|
||||
int "GPIO for I2C SDA" if LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 5 if LV_PREDEFINED_DISPLAY_WEMOS_LOLIN
|
||||
default 5
|
||||
|
||||
|
@ -941,7 +975,9 @@ menu "LVGL TFT Display controller"
|
|||
|
||||
config LV_DISP_PIN_SCL
|
||||
int "GPIO for I2C SCL" if LV_TFT_DISPLAY_PROTOCOL_I2C
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 4 if LV_PREDEFINED_DISPLAY_WEMOS_LOLIN
|
||||
default 4
|
||||
|
||||
|
|
|
@ -96,7 +96,9 @@ menu "LVGL Touch controller"
|
|||
config LV_TOUCH_SPI_MISO
|
||||
int
|
||||
prompt "GPIO for MISO (Master In Slave Out)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 35 if LV_PREDEFINED_PINS_38V1
|
||||
default 19
|
||||
help
|
||||
|
@ -105,7 +107,9 @@ menu "LVGL Touch controller"
|
|||
config LV_TOUCH_SPI_MOSI
|
||||
int
|
||||
prompt "GPIO for MOSI (Master Out Slave In)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 32 if LV_PREDEFINED_PINS_38V1
|
||||
default 23
|
||||
help
|
||||
|
@ -113,7 +117,9 @@ menu "LVGL Touch controller"
|
|||
|
||||
config LV_TOUCH_SPI_CLK
|
||||
int "GPIO for CLK (SCK / Serial Clock)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 26 if LV_PREDEFINED_PINS_38V1
|
||||
default 18
|
||||
help
|
||||
|
@ -121,7 +127,9 @@ menu "LVGL Touch controller"
|
|||
|
||||
config LV_TOUCH_SPI_CS
|
||||
int "GPIO for CS (Slave Select)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 33 if LV_PREDEFINED_PINS_38V1
|
||||
default 5
|
||||
help
|
||||
|
@ -129,7 +137,9 @@ menu "LVGL Touch controller"
|
|||
|
||||
config LV_TOUCH_PIN_IRQ
|
||||
int "GPIO for IRQ (Interrupt Request)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 27 if LV_PREDEFINED_PINS_38V4
|
||||
default 25
|
||||
help
|
||||
|
@ -199,14 +209,18 @@ menu "LVGL Touch controller"
|
|||
config LV_TOUCH_I2C_SDA
|
||||
int
|
||||
prompt "GPIO for SDA (I2C)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 21
|
||||
help
|
||||
Configure the I2C touchpanel SDA pin here.
|
||||
|
||||
config LV_TOUCH_I2C_SCL
|
||||
int "GPIO for clock signal SCL (I2C)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 22
|
||||
help
|
||||
Configure the I2C touchpanel SCL pin here.
|
||||
|
@ -238,7 +252,9 @@ menu "LVGL Touch controller"
|
|||
config LV_TOUCH_SPI_MISO
|
||||
int
|
||||
prompt "GPIO for MISO (Master In Slave Out)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 35 if LV_PREDEFINED_PINS_38V1
|
||||
default 19 if LV_PREDEFINED_DISPLAY_ADA_FEATHERWING
|
||||
default 19
|
||||
|
@ -249,7 +265,9 @@ menu "LVGL Touch controller"
|
|||
config LV_TOUCH_SPI_MOSI
|
||||
int
|
||||
prompt "GPIO for MOSI (Master Out Slave In)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 32 if LV_PREDEFINED_PINS_38V1
|
||||
default 18 if LV_PREDEFINED_DISPLAY_ADA_FEATHERWING
|
||||
default 23
|
||||
|
@ -259,7 +277,9 @@ menu "LVGL Touch controller"
|
|||
|
||||
config LV_TOUCH_SPI_CLK
|
||||
int "GPIO for CLK (SCK / Serial Clock)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 26 if LV_PREDEFINED_PINS_38V1
|
||||
default 5 if LV_PREDEFINED_DISPLAY_ADA_FEATHERWING
|
||||
default 18
|
||||
|
@ -268,7 +288,9 @@ menu "LVGL Touch controller"
|
|||
|
||||
config LV_TOUCH_SPI_CS
|
||||
int "GPIO for CS (Slave Select)"
|
||||
range 0 39
|
||||
range 0 39 if IDF_TARGET_ESP32
|
||||
range 0 43 if IDF_TARGET_ESP32S2
|
||||
|
||||
default 33 if LV_PREDEFINED_PINS_38V1
|
||||
default 32 if LV_PREDEFINED_DISPLAY_ADA_FEATHERWING
|
||||
default 5
|
||||
|
|
Loading…
Reference in a new issue