Check for CONFIG_LV_DISP_PIN_BCKL before using it

This commit is contained in:
C47D 2021-10-13 22:47:12 -05:00
parent f7b34f8a3e
commit 0b8d488867

View file

@ -153,7 +153,7 @@ void display_bsp_init_io(void)
ESP_ERROR_CHECK(err); ESP_ERROR_CHECK(err);
#endif #endif
#ifndef CONFIG_LV_DISP_BACKLIGHT_OFF #ifndef (CONFIG_LV_DISP_BACKLIGHT_OFF) && defined(CONFIG_LV_DISP_PIN_BCKL)
io_conf.mode = GPIO_MODE_OUTPUT; io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = (1ULL << CONFIG_LV_DISP_PIN_BCKL); io_conf.pin_bit_mask = (1ULL << CONFIG_LV_DISP_PIN_BCKL);
err = gpio_config(&io_conf); err = gpio_config(&io_conf);