LV_DISP_USE_RST

Allows to not allocate a GPIO for display reset: some may have that pin tied or attached to a Power management IC.

Supersedes PR from @usedbytes doing same but only for IL9341, this is for all supported displays.
This commit is contained in:
Rop Gonggrijp 2021-04-28 11:04:53 +02:00
parent 147cacc0af
commit 7b571a7fc7
29 changed files with 136 additions and 35 deletions

View file

@ -91,7 +91,7 @@ void st7789_init(void)
gpio_pad_select_gpio(ST7789_DC);
gpio_set_direction(ST7789_DC, GPIO_MODE_OUTPUT);
#if !defined(CONFIG_LV_DISP_ST7789_SOFT_RESET)
#if !defined(ST7789_SOFT_RST)
gpio_pad_select_gpio(ST7789_RST);
gpio_set_direction(ST7789_RST, GPIO_MODE_OUTPUT);
#endif
@ -102,7 +102,7 @@ void st7789_init(void)
#endif
//Reset the display
#if !defined(CONFIG_LV_DISP_ST7789_SOFT_RESET)
#if !defined(ST7789_SOFT_RST)
gpio_set_level(ST7789_RST, 0);
vTaskDelay(100 / portTICK_RATE_MS);
gpio_set_level(ST7789_RST, 1);