README: Update peripherals and display gpios helpers
This commit is contained in:
parent
28d663f6b6
commit
fc81c6da5a
|
@ -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
|
**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).
|
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
|
## Supported display controllers
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,8 @@ static void guiTask(void *pvParameter)
|
||||||
/* Initialize the needed peripherals */
|
/* Initialize the needed peripherals */
|
||||||
lvgl_interface_init();
|
lvgl_interface_init();
|
||||||
/* Initialize needed GPIOs, e.g. backlight, reset GPIOs */
|
/* 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 */
|
/* ToDo Initialize used display driver passing registered lv_disp_drv_t as parameter */
|
||||||
|
|
||||||
size_t display_buffer_size = lvgl_get_display_buffer_size();
|
size_t display_buffer_size = lvgl_get_display_buffer_size();
|
||||||
|
|
|
@ -153,7 +153,7 @@ void lvgl_interface_init(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void display_bsp_init_io(void)
|
void lvgl_display_gpios_init(void)
|
||||||
{
|
{
|
||||||
esp_err_t err = ESP_OK;
|
esp_err_t err = ESP_OK;
|
||||||
gpio_config_t io_conf = {
|
gpio_config_t io_conf = {
|
||||||
|
|
|
@ -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);
|
int max_transfer_sz, int dma_channel, int quadwp_pin, int quadhd_pin);
|
||||||
|
|
||||||
/* Initialize display GPIOs, e.g. DC and RST pins */
|
/* 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 */
|
/* Get display buffer size */
|
||||||
size_t lvgl_get_display_buffer_size(void);
|
size_t lvgl_get_display_buffer_size(void);
|
||||||
|
|
Loading…
Reference in a new issue