Commit graph

180 commits

Author SHA1 Message Date
Carlos Diaz 1759b774a9
ST7789: LVGL rotation support (#182)
* TFT/Kconfig: Update orientation values

* ST7789: Use lv_disp_drv_t rotation field instead of the configured from menuconfig

* ST7789: Update orientation at runtime

* ST7789: Apply workaround to detect orientation change at runtime

* ST7789: Add helper to get display size in v7 and v8

* ST7789: Fix compilation errors

* ST7789: Handle rotation of display with 135x240 dimension

* ST7789: Handle v8 when getting lv_disp_t from lv_disp_drv_t
2022-05-12 22:15:34 -05:00
Rashed Talukder 8d9f6e2548
Update to support ESP-IDF v5 in develop branch (#186)
* Update to support ESP-IDF v5 in develop branch

* Remove the need for rom includes while providing IDF v5 compatibility

* Fix missing '(' typo

* Remove unnecessarily addded rom header files

* Add missing version include

* Fix another forgotten ')'
2022-05-12 22:15:06 -05:00
Tomas Rezucha ef108457c7 Merge branch 'master' into develop
Resolving conflicts
2022-04-11 10:28:15 +02:00
Carlos Diaz 7c6bdc5635
Allow user to configure custom SPI mode (#181)
Fixes #178
2022-02-15 00:51:37 -06:00
Carlos Diaz 28d663f6b6
Moving ESP-IDF specific files to lv_port (#175)
* Move disp_spi.c and tp_spi.c to lv_port

* Move esp_lcd_backlight to lv_port

* Move disp_spi.h and tp_spi.h to lv_port
2022-02-02 16:51:28 -06:00
Carlos Diaz 463721e291
Cleanup lvgl_helpers (#171)
* lvgl_spi_conf: Define TFT_SPI_HOST even when no SPI is choosen

* lvgl_helpers: Let the SPI driver choose SPI DMA Channel

Use SPI_DMA_CH1 only on ESP32 target.

* lvgl_helpers: Move FT81X initialization to helper

* lvgl_interface_init: Initial cleanup

* lvgl_helpers: Replace spi_common_dma_t values with integers

This enum was introduced in ESP-IDF v4.3 and can't be used in older versions
of ESP-IDF.

* lvgl_helpers: Rearrange includes

* lvgl_tft: Remove gpio_pad_select_gpio from drivers init functions

* lvgl_helpers: Use spi_host_device_t from v4.3 onwards

* esp_backlight: Replace gpio with esp_rom API

* il3820: Remove GPIO initialization from driver init

* FT81x: Replace gpio_pad_select_gpio with esp_rom alias

* Fix esp_rom_gpio.h path

* FT81x: Fix esp_rom_gpio.h path

* adcraw: Disable usage of gpio_pad_select_gpio

* GC9A01: Remove usage of gpio_pad_select_gpio

* ra8875: Remove usage of gpio_pad_select_gpio

* Revert "esp_backlight: Replace gpio with esp_rom API"

This reverts commit 24e4bf0b88.

* Revert "FT81x: Replace gpio_pad_select_gpio with esp_rom alias"

This reverts commit 8c7bc42140.

* esp_lcd_backlight: Handle different versions of ESP-IDF

* esp_lcd_backlight: Add missing header

* lvgl_spi_conf: Add missing include

* uc8151d/jd79653a: Fix compilation error when logging is enabled

* FT81x: Handle ESP-IDF v4.3 rom_gpio

* FT81x: Add missing include

* Compilation error when SPI Host is not selected

* lvgl_helpers.c: Enable init_ft81x only when FT81X is selected

* adcraw: Handle gpio_pad_selection on multiple ESP-IDF versions

* esp_lcd_backlight: Remove esp_rom functions

* FT81x: Remove esp_rom functions

* adcraw: Remove esp_rom functions
2022-02-02 16:45:52 -06:00
C47D 9b4eedd00f disp_driver: Pass pointer to lv_disp_drv_t to pcd8544_init 2022-01-11 18:17:09 -06:00
C47D 11f9c2b93f pcd8544: Update driver 2022-01-11 18:14:57 -06:00
C47D 6af2ab1f1c EVE_commands: Remove unused code 2022-01-07 18:30:56 -06:00
C47D 62704efd08 Remove semicolon from preprocessor 2022-01-07 17:38:08 -06:00
C47D ff055b629e ili9488: Fix typo 2022-01-07 17:27:12 -06:00
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 bb0e3a1f27 Check for LV_USE_LOG when logging orientation 2022-01-07 15:26:39 -06:00
C47D dcff9a7f11 ili9481: Add missing braces 2022-01-07 15:26:39 -06:00
C47D f669a09b19 jd79653a: Remove unused code 2022-01-07 15:26:39 -06:00
C47D d0376e705c uc8151d: Remove unused code 2022-01-07 15:26:39 -06:00
C47D 35d2d3a5af Add LV_DISP_USE_BUSY symbol to enable busy signal 2022-01-07 13:23:28 -06:00
C47D 9ee177b684 ST7789: Display offsets are now runtime configurable
We don't change previous functionality by adding a helper function that sets the user offsets when initializing the display
2022-01-07 13:23:28 -06:00
Carlos Diaz 31399e012a Make SPI3 not available for ESP32C3
The ESP32C3 device doesn't have SPI3
2022-01-06 18:53:34 -06:00
Carlos Diaz 79d8989b2a Update display Kconfig
Remove IDF_TARGET_ESP32S2 checks on TFT SPI Bus choice
2022-01-06 18:53:34 -06:00
C47D 1a8a610b05 Display Kconfig: Fix TTGO default SPI bus and display orientation checks 2022-01-06 18:53:34 -06:00
arktrin 26272b08f0 clarify the 52/53 px offset oddity 2022-01-05 23:47:03 -06:00
arktrin fbb4ebe409 add offset for 240x135 displays based on ST7789 2022-01-05 23:46:35 -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
arktrin 26fe6e7703 clarify the 52/53 px offset oddity 2021-12-23 14:54:28 -06:00
arktrin c4cd524487 add offset for 240x135 displays based on ST7789 2021-12-23 14:54:28 -06:00
arktrin 8cbbc299e9 fix SPI names for touch
with ESP32-C3 specific auto-dma proper selection
2021-12-21 16:57:51 -06:00
Tomas Rezucha d44b7e808a
Revert "fix spi names" 2021-12-17 19:18:05 +01:00
Tomas Rezucha 22ba4161b5 fix spi names 2021-12-16 15:45:23 +01:00
Tomas Rezucha d0eca96cd7 fix SPI names 2021-12-16 13:40:00 +01:00
Tomas Rezucha 385421fe06
Merge branch 'master' into develop 2021-12-14 17:46:46 +01:00
arktrin 23ee5be93b replace all specific SPI names with SPIx_HOST 2021-12-13 14:31:09 +03:00
arktrin 31a5733c8d Fix SPI configuration for ESP32-C3 and ESP32-S2
ESP32-C3 and ESP32-S2 do not have VSPI or HSPI
2021-12-05 17:01:36 +03:00
Matthias Ringwald f3f6ba6470 Added PCD8544 to readme, addressed PR comments 2021-11-25 17:16:04 -06:00
Matthias Ringwald 37a4d3a4e6 Add PCD8544 driver 2021-11-25 17:16:04 -06:00
Carlos Diaz c7607e93d8
ili9488: Start updating to new display port interface (#137)
ILI9488: Start updating to new display port interface
2021-11-17 21:00:07 -06:00
C47D a0e915eebc Remove TAG from LVGL log API
The filename is appended at the beginning of the log output by default, we don't need to do it.
2021-10-22 18:41:47 -05:00
C47D 4a9cfeb6fb EVE_commands: Replace ESP_LOG with LVGL logging 2021-10-13 23:23:56 -05:00
C47D 83875cc6bd hx8357: Replace ESP_LOG with LVGL logging 2021-10-13 23:21:40 -05:00
C47D 94244ad432 il3820: Replace ESP_LOG with LVGL logging 2021-10-13 23:20:31 -05:00
C47D 44b552758e ili9163c: Replace ESP_LOG with LVGL logging 2021-10-13 23:19:51 -05:00
C47D b9c381a07d ili9488: Replace ESP_LOG with LVGL logging 2021-10-13 23:17:24 -05:00
C47D e51f475263 ili9486: Replace ESP_LOG with LVGL logging 2021-10-13 23:15:27 -05:00
C47D e1c18c13b9 jd79653a: Replace ESP_LOG with LVGL logging 2021-10-13 23:14:03 -05:00
C47D 83d5486207 uc8151d: Remove typo 2021-10-13 23:09:17 -05:00
C47D 1a8d0d91e2 ra8875: Replace ESP_LOG with LVGL logging 2021-10-13 23:04:44 -05:00
C47D 81abc17904 st7735s: Replace ESP_LOG with LVGL logging 2021-10-13 23:02:47 -05:00
C47D ef0946a6cc st7796s: Replace ESP_LOG with LVGL logging 2021-10-13 23:01:26 -05:00
C47D f1e1f0d9fd uc8151d: Replace ESP_LOG with LVGL logging 2021-10-13 23:00:18 -05:00
C47D 6a76078ba8 ili9481: Fix TAG 2021-10-13 22:53:00 -05:00