Marge branch 'master' into lvgl_7.11.0_idf_5.0
This commit is contained in:
commit
a73c429954
62 changed files with 2427 additions and 1270 deletions
|
@ -76,19 +76,22 @@ void ili9481_init(void)
|
|||
//Initialize non-SPI GPIOs
|
||||
gpio_reset_pin(ILI9481_DC);
|
||||
gpio_set_direction(ILI9481_DC, GPIO_MODE_OUTPUT);
|
||||
|
||||
#if ILI9481_USE_RST
|
||||
gpio_reset_pin(ILI9481_RST);
|
||||
gpio_set_direction(ILI9481_RST, GPIO_MODE_OUTPUT);
|
||||
|
||||
#if ILI9481_ENABLE_BACKLIGHT_CONTROL
|
||||
gpio_reset_pin(ILI9481_BCKL);
|
||||
gpio_set_direction(ILI9481_BCKL, GPIO_MODE_OUTPUT);
|
||||
#endif
|
||||
|
||||
//Reset the display
|
||||
gpio_set_level(ILI9481_RST, 0);
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
gpio_set_level(ILI9481_RST, 1);
|
||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||
#endif
|
||||
|
||||
#if ILI9481_ENABLE_BACKLIGHT_CONTROL
|
||||
gpio_reset_pin(ILI9481_BCKL);
|
||||
gpio_set_direction(ILI9481_BCKL, GPIO_MODE_OUTPUT);
|
||||
#endif
|
||||
|
||||
ESP_LOGI(TAG, "ILI9481 initialization.");
|
||||
|
||||
|
@ -107,8 +110,6 @@ void ili9481_init(void)
|
|||
cmd++;
|
||||
}
|
||||
|
||||
ili9481_enable_backlight(true);
|
||||
|
||||
ili9481_set_orientation(ILI9481_DISPLAY_ORIENTATION);
|
||||
}
|
||||
|
||||
|
@ -168,22 +169,6 @@ void ili9481_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * col
|
|||
heap_caps_free(mybuf);
|
||||
}
|
||||
|
||||
void ili9481_enable_backlight(bool backlight)
|
||||
{
|
||||
#if ILI9481_ENABLE_BACKLIGHT_CONTROL
|
||||
ESP_LOGI(TAG, "%s backlight.", backlight ? "Enabling" : "Disabling");
|
||||
uint32_t tmp = 0;
|
||||
|
||||
#if (ILI9481_BCKL_ACTIVE_LVL==1)
|
||||
tmp = backlight ? 1 : 0;
|
||||
#else
|
||||
tmp = backlight ? 0 : 1;
|
||||
#endif
|
||||
|
||||
gpio_set_level(ILI9481_BCKL, tmp);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue