mirror of https://github.com/arendst/Tasmota.git
fix compile of uDisplay with IDF5.x on ESP32S3 (#19378)
This commit is contained in:
parent
312bbbb7b6
commit
c4e57e49c2
|
@ -945,7 +945,11 @@ Renderer *uDisplay::Init(void) {
|
|||
_panel_config->disp_gpio_num = GPIO_NUM_NC;
|
||||
|
||||
_panel_config->flags.disp_active_low = 0;
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
_panel_config->flags.refresh_on_demand = 0;
|
||||
#else
|
||||
_panel_config->flags.relax_on_idle = 0;
|
||||
#endif // ESP_IDF_VERSION_MAJOR >= 5
|
||||
_panel_config->flags.fb_in_psram = 1; // allocate frame buffer in PSRAM
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(_panel_config, &_panel_handle));
|
||||
|
@ -1037,7 +1041,7 @@ Renderer *uDisplay::Init(void) {
|
|||
uint32_t div_a, div_b, div_n, clkcnt;
|
||||
calcClockDiv(&div_a, &div_b, &div_n, &clkcnt, 240*1000*1000, spi_speed*1000000);
|
||||
lcd_cam_lcd_clock_reg_t lcd_clock;
|
||||
lcd_clock.lcd_clkcnt_n = std::max(1u, clkcnt - 1);
|
||||
lcd_clock.lcd_clkcnt_n = std::max((uint32_t)1u, clkcnt - 1); // ESP_IDF_VERSION_MAJOR >= 5
|
||||
lcd_clock.lcd_clk_equ_sysclk = (clkcnt == 1);
|
||||
lcd_clock.lcd_ck_idle_edge = true;
|
||||
lcd_clock.lcd_ck_out_edge = false;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "driver/spi_master.h"
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
#include "soc/gpio_periph.h"
|
||||
#include <rom/gpio.h>
|
||||
#endif // ESP_IDF_VERSION_MAJOR >= 5
|
||||
#endif
|
||||
|
||||
|
@ -36,6 +37,9 @@ static inline void gpio_lo(int_fast8_t pin) { if (pin >= 0) *get_gpio_lo_reg(pin
|
|||
#include "esp_lcd_panel_ops.h"
|
||||
#include <hal/dma_types.h>
|
||||
#include <rom/cache.h>
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
#include "esp_rom_lldesc.h"
|
||||
#endif // ESP_IDF_VERSION_MAJOR >= 5
|
||||
#endif // USE_ESP32_S3
|
||||
|
||||
#define _UDSP_I2C 1
|
||||
|
@ -145,7 +149,9 @@ struct esp_rgb_panel_t
|
|||
size_t resolution_hz; // Peripheral clock resolution
|
||||
esp_lcd_rgb_timing_t timings; // RGB timing parameters (e.g. pclk, sync pulse, porch width)
|
||||
gdma_channel_handle_t dma_chan; // DMA channel handle
|
||||
#if ESP_IDF_VERSION_MAJOR < 5
|
||||
esp_lcd_rgb_panel_frame_trans_done_cb_t on_frame_trans_done; // Callback, invoked after frame trans done
|
||||
#endif // ESP_IDF_VERSION_MAJOR < 5
|
||||
void *user_ctx; // Reserved user's data of callback functions
|
||||
int x_gap; // Extra gap in x coordinate, it's used when calculate the flush window
|
||||
int y_gap; // Extra gap in y coordinate, it's used when calculate the flush window
|
||||
|
|
Loading…
Reference in New Issue