* 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 commit24e4bf0b88
. * Revert "FT81x: Replace gpio_pad_select_gpio with esp_rom alias" This reverts commit8c7bc42140
. * 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
58 lines
1.1 KiB
C
58 lines
1.1 KiB
C
/**
|
|
* @file lvgl_helpers.h
|
|
*/
|
|
|
|
#ifndef LVGL_HELPERS_H
|
|
#define LVGL_HELPERS_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*********************
|
|
* INCLUDES
|
|
*********************/
|
|
#include <stdbool.h>
|
|
|
|
#include "lvgl_spi_conf.h"
|
|
#include "lvgl_tft/disp_driver.h"
|
|
#include "lvgl_tft/esp_lcd_backlight.h"
|
|
#include "lvgl_touch/touch_driver.h"
|
|
|
|
/*********************
|
|
* DEFINES
|
|
*********************/
|
|
|
|
/**********************
|
|
* TYPEDEFS
|
|
**********************/
|
|
|
|
/**********************
|
|
* GLOBAL PROTOTYPES
|
|
**********************/
|
|
|
|
void lvgl_i2c_locking(void* leader);
|
|
|
|
/* Initialize detected SPI and I2C bus and devices */
|
|
void lvgl_interface_init(void);
|
|
|
|
/* Initialize SPI master */
|
|
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);
|
|
|
|
/* Get display buffer size */
|
|
size_t lvgl_get_display_buffer_size(void);
|
|
|
|
/**********************
|
|
* MACROS
|
|
**********************/
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* LVGL_HELPERS_H */
|