parent
69d9914c4c
commit
bb63df4f61
|
|
@ -298,10 +298,18 @@ static void lvgl_increase_tick(void *arg) {
|
|||
/* Setup for TFT LCD Display and LVGL GUI */
|
||||
static void display_init(void) {
|
||||
ESP_LOGI(TAG, "Initialing LCD");
|
||||
|
||||
// Configure backlight
|
||||
gpio_reset_pin(LCD_BK_LIGHT_PIN);
|
||||
gpio_set_direction(LCD_BK_LIGHT_PIN, GPIO_MODE_OUTPUT);
|
||||
gpio_set_level(LCD_BK_LIGHT_PIN, 1);
|
||||
ledc_channel_config_t ledc_lcd_bk_light_channel = {
|
||||
.channel = LEDC_CHANNEL_2,
|
||||
.gpio_num = LCD_BK_LIGHT_PIN,
|
||||
.speed_mode = LEDC_LOW_SPEED_MODE,
|
||||
.timer_sel = LEDC_TIMER_0,
|
||||
.intr_type = LEDC_INTR_DISABLE,
|
||||
.duty = 3000,
|
||||
.hpoint = 0
|
||||
};
|
||||
ESP_ERROR_CHECK(ledc_channel_config(&ledc_lcd_bk_light_channel));
|
||||
|
||||
// Setup SPI Bus
|
||||
spi_bus_config_t spi_cfg = {
|
||||
|
|
|
|||
Reference in New Issue