Commit graph

18 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
Tomas Rezucha 385421fe06
Merge branch 'master' into develop 2021-12-14 17:46:46 +01:00
Matthias Ringwald 37a4d3a4e6 Add PCD8544 driver 2021-11-25 17:16:04 -06: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
Carlos Diaz 40064954df
Merge branch 'master' into master 2021-07-29 18:27:34 -05:00
Rop Gonggrijp e52112376f Replace allLVGL driver I2C code with I2C Manager
For discussion see #70
2021-07-08 11:04:07 +02:00
Rajssss 5d4334a5b9
Created separate component for backlight control
-> Uses Timer 0, Channel 0 as PWM to control
   backlight via LED pin

Signed-off-by: Rajssss <sssraj.sssraj@gmail.com>
2021-06-26 12:39:21 +05:30
Martin Lindberg Mogensen 21f81d117b Support ILI9163c (Sparkfun LCD-15143) 2021-04-29 09:55:22 +02:00
Carlos Diaz 347aaa68d2
Merge pull request #26 from lvgl/fix/ssd1306_orientation
Fix/ssd1306 orientation
2021-02-15 22:25:43 -06:00
C47D 82336c2120 Allow the user to define a custom display buffer size 2021-02-07 18:02:21 -06:00
C47D ed013cb14f lvgl_helpers: Reduce DISP_BUF_SIZE for ILI9341 2021-02-07 17:55:45 -06:00
C47D a1f23a0c80 lvgl_helpers: Add comment about DISP_BUF_SIZE 2021-02-07 17:55:20 -06:00
C47D 6b0fd1f1ac SSD1306: Handle theme not being mono 2021-01-31 17:28:03 -06:00
C47D d5048878b5 SSD1306: Reduce display buffer size
For monochrome displays each byte of the buffer size can store data for 8 pixels.

We divide LV_VER_RES_MAX by 8 because the display vertical side is grouped in
pages of 1 byte, so we need 1byte times LV_HOR_RES_MAX to represent the data of
one page.
2021-01-19 23:54:14 -06:00
Carlos Diaz fbdc247c25
Merge branch 'master' into feature/add_st7796s 2021-01-15 00:07:27 -06:00
C47D 55c314b685 Update references to LV_DISPLAY_WIDTH 2021-01-09 15:04:53 -06:00
C47D 2209dd0e82 Define DISP_BUF_SIZE for ST7796S 2020-12-24 11:44:17 -06:00
C47D 08384030b0 Move drivers from the lv_port_esp32 to here 2020-12-17 00:02:55 -06:00