feat(camera): supported camera related example using sc2336 and ek79007

Closes https://github.com/espressif/esp-idf/issues/14517
This commit is contained in:
Armando
2024-09-13 16:51:21 +08:00
parent 01613ca01d
commit c48a47c341
24 changed files with 357 additions and 213 deletions

View File

@@ -8,7 +8,6 @@
#include "esp_lcd_mipi_dsi.h"
#include "esp_lcd_panel_ops.h"
#include "esp_lcd_ili9881c.h"
#ifdef __cplusplus
extern "C" {
@@ -17,18 +16,19 @@ extern "C" {
/**
* @brief DSI init function
*
* @param[out] ili9881c_ctrl_panel ILI9881C panel handle
* @param[out] mipi_dsi_bus MIPI DSI bus handle
* @param[out] mipi_dbi_io MIPI DBI io handle
* @param[out] mipi_dpi_panel MIPI DPI panel handle
* @param[out] frame_buffer frame buffer
*/
void example_dsi_resource_alloc(esp_lcd_panel_handle_t *ili9881c_ctrl_panel, esp_lcd_panel_handle_t *mipi_dpi_panel, void **frame_buffer);
void example_dsi_resource_alloc(esp_lcd_dsi_bus_handle_t *mipi_dsi_bus, esp_lcd_panel_io_handle_t *mipi_dbi_io, esp_lcd_panel_handle_t *mipi_dpi_panel, void **frame_buffer);
/**
* @brief DSI ILI9881C panel init function
* @brief DPI panel reset function
*
* @param[in] ili9881c_ctrl_panel ILI9881C panel handle
* @param[in] mipi_dpi_panel MIPI DPI panel handle
*/
void example_dsi_ili9881c_panel_init(esp_lcd_panel_handle_t ili9881c_ctrl_panel);
void example_dpi_panel_reset(esp_lcd_panel_handle_t mipi_dpi_panel);
/**
* @brief DPI panel init function
@@ -37,6 +37,15 @@ void example_dsi_ili9881c_panel_init(esp_lcd_panel_handle_t ili9881c_ctrl_panel)
*/
void example_dpi_panel_init(esp_lcd_panel_handle_t mipi_dpi_panel);
/**
* @brief Destroy DSI related resources
*
* @param[in] mipi_dsi_bus MIPI DSI bus handle
* @param[in] mipi_dbi_io MIPI DBI io handle
* @param[in] mipi_dpi_panel MIPI DPI panel handle
*/
void example_dsi_resource_destroy(esp_lcd_dsi_bus_handle_t mipi_dsi_bus, esp_lcd_panel_io_handle_t mipi_dbi_io, esp_lcd_panel_handle_t mipi_dpi_panel);
#ifdef __cplusplus
}
#endif

View File

@@ -6,16 +6,31 @@
#pragma once
#include "sdkconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#define EXAMPLE_MIPI_DSI_IMAGE_HSYNC 40
#define EXAMPLE_MIPI_DSI_IMAGE_HBP 140
#define EXAMPLE_MIPI_DSI_IMAGE_HFP 40
#define EXAMPLE_MIPI_DSI_IMAGE_VSYNC 4
#define EXAMPLE_MIPI_DSI_IMAGE_VBP 16
#define EXAMPLE_MIPI_DSI_IMAGE_VFP 16
#if CONFIG_EXAMPLE_LCD_PATTERN_ILI9881C
// FPS = 80000000/(40+140+40+800)/(4+16+16+1280) = 60Hz
#define EXAMPLE_MIPI_DSI_DPI_CLK_MHZ 80
#define EXAMPLE_MIPI_DSI_IMAGE_HSYNC 40
#define EXAMPLE_MIPI_DSI_IMAGE_HBP 140
#define EXAMPLE_MIPI_DSI_IMAGE_HFP 40
#define EXAMPLE_MIPI_DSI_IMAGE_VSYNC 4
#define EXAMPLE_MIPI_DSI_IMAGE_VBP 16
#define EXAMPLE_MIPI_DSI_IMAGE_VFP 16
#elif CONFIG_EXAMPLE_LCD_PATTERN_EK79007
// FPS = 48000000/(10+120+120+1024)/(1+20+10+600) = 60Hz
#define EXAMPLE_MIPI_DSI_DPI_CLK_MHZ 48
#define EXAMPLE_MIPI_DSI_IMAGE_HSYNC 10
#define EXAMPLE_MIPI_DSI_IMAGE_HBP 120
#define EXAMPLE_MIPI_DSI_IMAGE_HFP 120
#define EXAMPLE_MIPI_DSI_IMAGE_VSYNC 1
#define EXAMPLE_MIPI_DSI_IMAGE_VBP 20
#define EXAMPLE_MIPI_DSI_IMAGE_VFP 10
#endif
#ifdef __cplusplus
}