Commit graph

21 commits

Author SHA1 Message Date
Carlos Diaz 17eb416ef8
Update helpers and drivers to handle LVGLv7 and v8 versions (#161)
* [lvgl_helpers] Cleanup and misc code cleanup

Checks for SPI_HOST_MAX symbol before using it.

Rename lvgl_driver_init to lvgl_interface_init because it now only initialize
the interface bus for display drivers, we still need to remove the indev
drivers from here.

Use types defined in spi_types.h for spi host (spi_host_device_t) and
spi dma channels (spi_dma_chan_t).

Also add a couple of symbols to avoid using magic numbers

* [lvgl_helpers] Reduce usage of if defined in lvgl_interface_init

* [lvgl_helpers] Fix spi dma channel for ESP-IDF versions <= 4.2

* [examples] Update hello_world to call lvgl_interface_init

* Add lvgl_get_display_buffer_size helper

This helper will allow us to get the calculated display buffer size instead of using a global symbol.

* Implement lvgl_get_display_buffer_size

This API will be used to get the calculation of display buffer size.

* Delete DISP_BUF_SIZE symbols

The same functionality is handled by lvgl_get_display_buffer_size

* Move SPI max transfer size calculation to helper

Use calculate_spi_max_transfer_size to calculate the SPI max transfer size for the SPI master configuration

* Remove SPI_BUS_MAX_TRANSFER_SZ definition

Same functionality is now handled in calculate_spi_max_transfer_size

* Update display buffer size calculation

Use lvgl_get_display_buffer_size helper instead of DISP_BUF_SIZE symbol

* Update example to LVGL v8

Add comments about changes from:
- LVGL v7 to LVGL v8
- Configuration helpers and display drivers

* Update lvgl_helpers.c

* Update sh1107 driver

* Update EVE driver

Check for symbols used in previous implementations before trying to use them
and add a fallback temporary implementation when not found.

The falback implementation isn't tested with hardware.

Symbols:
- DISP_BUF_SIZE
- SPI_TRANSFER_SIZE

* Update uc8151d driver

* Update jd79653a driver

* Update ra8875 driver

* Update il3820.h

Check for LV_HOR_RES_MAX and LV_VER_RES_MAX before trying to use them

* Update lvgl_helpers.c

Check for ESP-IDF version before trying to use spi_dma_chan_t type
2022-01-07 17:22:11 -06:00
C47D 35d2d3a5af Add LV_DISP_USE_BUSY symbol to enable busy signal 2022-01-07 13:23:28 -06:00
arktrin a2a13f1a5f replace hardcoded SPI DMA parameter 2022-01-05 23:46:10 -06:00
arktrin b9377200a6 fix SPI names for touch
with ESP32-C3 specific auto-dma proper selection
2022-01-05 23:45:54 -06:00
Tomas Rezucha d0eca96cd7 fix SPI names 2021-12-16 13:40:00 +01:00
C47D d116dfd87d display_bsp_init_io: Fix macro names must be identifiers 2021-10-13 22:54:54 -05:00
C47D 0b8d488867 Check for CONFIG_LV_DISP_PIN_BCKL before using it 2021-10-13 22:47:12 -05:00
C47D 4255e3005b feat(lvgl_helpers): Add function to initialize GPIOs
Adds helper function to initialize GPIOs, this avoids having to configure and initialize GPIOs in the drivers init function.

Closes #128
2021-10-06 23:17:03 -05:00
C47D cd999e34cd fix(lvgl_helpers): Remove all references to disp_driver_init in lvgl_driver_init 2021-09-14 19:13:42 -05:00
C47D aa8a78f72a helpers: Remove display initialization when using SPI 2021-09-14 19:13:32 -05:00
C47D 0c6975954f helpers: Remove display initialization from lvgl_driver_init 2021-09-14 19:13:31 -05:00
Rop Gonggrijp befa5d0730 directory i2c_manager -> lvgl_i2c 2021-07-14 12:43:19 +02:00
Rop Gonggrijp e52112376f Replace allLVGL driver I2C code with I2C Manager
For discussion see #70
2021-07-08 11:04:07 +02:00
C47D b70d2dc151 lvgl_helpers: Fix compilation error when using ESP-IDF v4.3 or below 2021-06-22 13:05:58 -05:00
C47D b9cccc342f Include lv_refr more easily 2021-06-15 21:01:36 -05:00
C47D 696b6ff463 lvgl_helpers: Set spi dma channel to SPI_DMA_CH_AUTO when using ESP32C3 2021-06-10 22:22:44 -05:00
C47D 1af29975e9 Add support for ESP32C3 SPI hosts 2021-06-08 10:26:03 -05:00
C47D 8b65d3547c Fix path when using LVGL v8 2021-06-07 22:00:17 -05:00
C47D a387e799e1 Print LV_HOR_RES_MAX and LV_VER_RES_MAX only when using LVGL v7 or below 2021-06-07 21:57:00 -05:00
Christopher Liebman d7f9a03436 path for lv_refr.h needs to vary based on LV_LVGL_H_INCLUDE_SIMPLE 2020-12-23 14:06:47 -08:00
C47D 08384030b0 Move drivers from the lv_port_esp32 to here 2020-12-17 00:02:55 -06:00