README: Update peripherals and display gpios helpers

This commit is contained in:
C47D 2022-02-02 21:28:34 -06:00
parent 28d663f6b6
commit fc81c6da5a
4 changed files with 9 additions and 3 deletions

View file

@ -12,6 +12,11 @@ For a ready to use ESP32 project take look at the [lv_port_esp32](https://github
**NOTE:** You need to set the display horizontal and vertical size, color depth and
swap of RGB565 color on the LVGL configuration menuconfig (it's not handled automatically).
## MCU Configuration
Example of SPI/I2C configuration peripherals is done with `lvgl_interface_init`.
Example of display gpios configuration, such as the DC, RST, Backlight is done with `lvgl_display_gpios_init`
## Supported display controllers

View file

@ -54,7 +54,8 @@ static void guiTask(void *pvParameter)
/* Initialize the needed peripherals */
lvgl_interface_init();
/* Initialize needed GPIOs, e.g. backlight, reset GPIOs */
display_bsp_init_io();
lvgl_display_gpios_init();
/* ToDo Initialize used display driver passing registered lv_disp_drv_t as parameter */
size_t display_buffer_size = lvgl_get_display_buffer_size();

View file

@ -153,7 +153,7 @@ void lvgl_interface_init(void)
#endif
}
void display_bsp_init_io(void)
void lvgl_display_gpios_init(void)
{
esp_err_t err = ESP_OK;
gpio_config_t io_conf = {

View file

@ -41,7 +41,7 @@ bool lvgl_spi_driver_init(int host, int miso_pin, int mosi_pin, int sclk_pin,
int max_transfer_sz, int dma_channel, int quadwp_pin, int quadhd_pin);
/* Initialize display GPIOs, e.g. DC and RST pins */
void display_bsp_init_io(void);
void lvgl_display_gpios_init(void);
/* Get display buffer size */
size_t lvgl_get_display_buffer_size(void);