2023-12-20 00:28:00 -05:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "hal/mipi_dsi_hal.h"
|
|
|
|
#include "hal/mipi_dsi_ll.h"
|
|
|
|
#include "esp_heap_caps.h"
|
|
|
|
#include "esp_private/periph_ctrl.h"
|
2024-04-23 06:12:35 -04:00
|
|
|
#include "esp_pm.h"
|
2023-12-20 00:28:00 -05:00
|
|
|
|
|
|
|
#if SOC_PERIPH_CLK_CTRL_SHARED
|
|
|
|
#define DSI_CLOCK_SRC_ATOMIC() PERIPH_RCC_ATOMIC()
|
|
|
|
#else
|
|
|
|
#define DSI_CLOCK_SRC_ATOMIC()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !SOC_RCC_IS_INDEPENDENT
|
|
|
|
#define DSI_RCC_ATOMIC() PERIPH_RCC_ATOMIC()
|
|
|
|
#else
|
|
|
|
#define DSI_RCC_ATOMIC()
|
|
|
|
#endif
|
|
|
|
|
2024-04-23 05:30:35 -04:00
|
|
|
#if CONFIG_LCD_DSI_ISR_IRAM_SAFE
|
|
|
|
#define DSI_MEM_ALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)
|
|
|
|
#else
|
|
|
|
#define DSI_MEM_ALLOC_CAPS MALLOC_CAP_DEFAULT
|
|
|
|
#endif
|
2023-12-20 00:28:00 -05:00
|
|
|
|
2024-01-25 06:00:44 -05:00
|
|
|
#define DPI_PANEL_MAX_FB_NUM 3 // maximum number of supported frame buffers for DPI panel
|
|
|
|
|
2024-04-09 07:02:16 -04:00
|
|
|
#define DPI_PANEL_LLI_PER_FRAME 1 // NOTE: we assume ONE DMA link item can carry the WHOLE image (1920*1080)
|
|
|
|
|
2023-12-20 00:28:00 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct esp_lcd_dsi_bus_t {
|
|
|
|
int bus_id;
|
|
|
|
mipi_dsi_hal_context_t hal;
|
2024-04-23 06:12:35 -04:00
|
|
|
esp_pm_lock_handle_t pm_lock;
|
2023-12-20 00:28:00 -05:00
|
|
|
} esp_lcd_dsi_bus_t;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|