diff --git a/main/bsp/display.c b/main/bsp/display.c index acd3ab5..7dac5c8 100644 --- a/main/bsp/display.c +++ b/main/bsp/display.c @@ -2,7 +2,6 @@ #include "board_config.h" -#include "driver/gpio.h" #include "driver/ledc.h" #include "driver/spi_master.h" #include "esp_lcd_panel_ops.h" @@ -49,6 +48,7 @@ esp_err_t display_init(esp_lcd_panel_io_handle_t *io_handle_out, .gpio_num = BOARD_PIN_BK_LIGHT, .duty = 0, .hpoint = 0, + .flags.output_invert = 1, }; ESP_ERROR_CHECK(ledc_channel_config(&ledc_channel)); @@ -90,9 +90,6 @@ esp_err_t display_init(esp_lcd_panel_io_handle_t *io_handle_out, ESP_ERROR_CHECK(esp_lcd_panel_set_gap(panel_handle, BOARD_LCD_GAP_X, BOARD_LCD_GAP_Y)); ESP_ERROR_CHECK(esp_lcd_panel_disp_on_off(panel_handle, true)); - ESP_LOGI(TAG, "Turn on LCD backlight"); - gpio_set_level(BOARD_PIN_BK_LIGHT, BOARD_LCD_BK_LIGHT_ON_LEVEL); - *io_handle_out = io_handle; *panel_handle_out = panel_handle; return ESP_OK;