Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding BSP for Waveshare Touch LCD 1.69in (BSP-552) #393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bsp/waveshare_esp32-s3_touch_lcd_1_69/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
file(GLOB_RECURSE SRCS src/*.c)

idf_component_register(
SRCS ${SRCS}
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "priv_include"
REQUIRES driver spiffs fatfs esp_driver_ledc
PRIV_REQUIRES esp_lcd
)
338 changes: 338 additions & 0 deletions bsp/waveshare_esp32-s3_touch_lcd_1_69/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,338 @@
menu "Board Support Package (generic)"

config BSP_ERROR_CHECK
bool "Enable error check in BSP"
default y
help
Error check assert the application before returning the error code.

menu "I2C"
config BSP_I2C_NUM
int "I2C peripheral index"
default 1
range 0 1
help
ESP32 has two I2C peripherals, pick the one you want to use.

config BSP_I2C_FAST_MODE
bool "Enable I2C fast mode"
default y
help
I2C has two speed modes: normal (100kHz) and fast (400kHz).

config BSP_I2C_CLK_SPEED_HZ
int
default 400000 if BSP_I2C_FAST_MODE
default 100000
endmenu

menu "Display"

config BSP_DISPLAY_ENABLED
bool "Enable display"
default n
help
Enable using display in BSP

menu "Rotation"
depends on BSP_DISPLAY_ENABLED

config BSP_DISPLAY_ROTATION_SWAP_XY
bool "Swap XY"
default n
help
Swap X and Y axis on the screen.

config BSP_DISPLAY_ROTATION_MIRROR_X
bool "Mirror X"
default n
help
Mirror X axis on the screen.

config BSP_DISPLAY_ROTATION_MIRROR_Y
bool "Mirror Y"
default n
help
Mirror Y axis on the screen.
endmenu

config BSP_DISPLAY_INVERT_COLOR
bool "Invert colors"
default n
help
Invert colors of the screen.

config BSP_DISPLAY_BRIGHTNESS_INVERT
bool "Invert brightness level"
default n
help
Invert brightness level of the screen.

config BSP_DISPLAY_CMD_BITS
depends on BSP_DISPLAY_ENABLED
int
default 8
help
The command bits of the display.

config BSP_DISPLAY_PARAM_BITS
depends on BSP_DISPLAY_ENABLED
int
default 8
help
The param bits of the display.

config BSP_DISPLAY_PIXEL_CLOCK
depends on BSP_DISPLAY_ENABLED
int
prompt "Display pixel clock (MHz)"
default 20
range 1 40
help
The pixel clock of the display in MHz.

config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
depends on BSP_DISPLAY_ENABLED && BSP_DISPLAY_BACKLIGHT_GPIO != -1
int "LEDC channel index for brightness control"
default 1
range 0 7
help
LEDC channel is used to generate PWM signal that controls display brightness.
Set LEDC index that should be used.

config BSP_LCD_DRAW_BUF_HEIGHT
depends on BSP_DISPLAY_ENABLED
int "LCD framebuf height"
default 100
range 10 240
help
Framebuf is used for lvgl rendering output (rows).

config BSP_LCD_DRAW_BUF_DOUBLE
depends on BSP_DISPLAY_ENABLED
bool "LCD double framebuf"
default n
help
Whether to enable double framebuf.

endmenu

menu "Display Touch"

config BSP_TOUCH_ENABLED
bool "Enable display touch"
default n
help
Enable using display touch in BSP

menu "Rotation"
depends on BSP_TOUCH_ENABLED

config BSP_TOUCH_ROTATION_SWAP_XY
bool "Swap XY"
default n
help
Swap X and Y axis on the touch.

config BSP_TOUCH_ROTATION_MIRROR_X
bool "Mirror X"
default n
help
Mirror X axis on the touch.

config BSP_TOUCH_ROTATION_MIRROR_Y
bool "Mirror Y"
default n
help
Mirror Y axis on the touch.
endmenu
endmenu

menu "SPIFFS - Virtual File System"
config BSP_SPIFFS_FORMAT_ON_MOUNT_FAIL
bool "Format SPIFFS if mounting fails"
default n
help
Format SPIFFS if it fails to mount the filesystem.

config BSP_SPIFFS_MOUNT_POINT
string "SPIFFS mount point"
default "/spiffs"
help
Mount point of SPIFFS in the Virtual File System.

config BSP_SPIFFS_PARTITION_LABEL
string "Partition label of SPIFFS"
default "storage"
help
Partition label which stores SPIFFS.

config BSP_SPIFFS_MAX_FILES
int "Max files supported for SPIFFS VFS"
default 2
help
Supported max files for SPIFFS in the Virtual File System.
endmenu


# TARGET CONFIGURATION

if IDF_TARGET_ESP32
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 39

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default 33
endif
if IDF_TARGET_ESP32C2
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 18
# GPIOs 19/20 are always used by UART in examples

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
endif
if IDF_TARGET_ESP32C3
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 19
# GPIOs 20/21 are always used by UART in examples

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
endif
if IDF_TARGET_ESP32C6
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 30
# GPIOs 16/17 are always used by UART in examples

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
endif
if IDF_TARGET_ESP32H2
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 27
# GPIOs 23/24 are always used by UART in examples

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
endif
if IDF_TARGET_ESP32P4
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 56

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
endif
if IDF_TARGET_ESP32S2
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 46

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default 45
endif
if IDF_TARGET_ESP32S3
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 48

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
endif
if IDF_TARGET_LINUX
config ENV_GPIO_RANGE_MIN
int
default 0

config ENV_GPIO_RANGE_MAX
int
default 0

config ENV_GPIO_IN_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX

config ENV_GPIO_OUT_RANGE_MAX
int
default ENV_GPIO_RANGE_MAX
endif

endmenu
Loading
Loading