Add LV_DISP_USE_BUSY symbol to enable busy signal

This commit is contained in:
C47D 2022-01-06 23:30:42 -06:00 committed by Carlos Diaz
parent 9ee177b684
commit 35d2d3a5af
2 changed files with 13 additions and 2 deletions

View file

@ -137,7 +137,11 @@ void lvgl_driver_init(void)
void display_bsp_init_io(void) void display_bsp_init_io(void)
{ {
esp_err_t err = ESP_OK; esp_err_t err = ESP_OK;
gpio_config_t io_conf; gpio_config_t io_conf = {
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE,
};
#ifdef CONFIG_LV_DISPLAY_USE_DC #ifdef CONFIG_LV_DISPLAY_USE_DC
io_conf.mode = GPIO_MODE_OUTPUT; io_conf.mode = GPIO_MODE_OUTPUT;
@ -160,7 +164,7 @@ void display_bsp_init_io(void)
ESP_ERROR_CHECK(err); ESP_ERROR_CHECK(err);
#endif #endif
#ifdef CONFIG_LV_DISP_PIN_BUSY #ifdef CONFIG_LV_DISP_USE_BUSY
io_conf.mode = GPIO_MODE_INPUT; io_conf.mode = GPIO_MODE_INPUT;
io_conf.pin_bit_mask = (1ULL << CONFIG_LV_DISP_PIN_BUSY); io_conf.pin_bit_mask = (1ULL << CONFIG_LV_DISP_PIN_BUSY);
err = gpio_config(&io_conf); err = gpio_config(&io_conf);

View file

@ -907,6 +907,13 @@ menu "LVGL TFT Display controller"
help help
Configure the display Reset pin here. Configure the display Reset pin here.
config LV_DISP_USE_BUSY
bool "Use a GPIO for busy signal" if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D
default y if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D
default n
help
Use a GPIO for busy signal available in e-ink display controllers.
config LV_DISP_PIN_BUSY 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 int "GPIO for Busy" if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D
default 35 if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D default 35 if LV_TFT_DISPLAY_CONTROLLER_IL3820 || LV_TFT_DISPLAY_CONTROLLER_JD79653A || LV_TFT_DISPLAY_CONTROLLER_UC8151D