mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
test(isp): added isp csi share test
This commit is contained in:
parent
ff9b88d827
commit
a26ab5118c
28
components/esp_driver_isp/test_apps/isp/main/test_isp_csi.c
Normal file
28
components/esp_driver_isp/test_apps/isp/main/test_isp_csi.c
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "unity.h"
|
||||
#include "esp_private/mipi_csi_share_hw_ctrl.h"
|
||||
|
||||
TEST_CASE("ISP CSI share usage test", "[isp]")
|
||||
{
|
||||
int csi_brg_id = 0;
|
||||
TEST_ESP_OK(mipi_csi_brg_claim(MIPI_CSI_BRG_USER_CSI, &csi_brg_id));
|
||||
TEST_ESP_OK(mipi_csi_brg_claim(MIPI_CSI_BRG_USER_SHARE, &csi_brg_id));
|
||||
TEST_ESP_OK(mipi_csi_brg_declaim(csi_brg_id));
|
||||
TEST_ESP_OK(mipi_csi_brg_declaim(csi_brg_id));
|
||||
|
||||
TEST_ESP_OK(mipi_csi_brg_claim(MIPI_CSI_BRG_USER_ISP_DVP, &csi_brg_id));
|
||||
TEST_ESP_OK(mipi_csi_brg_claim(MIPI_CSI_BRG_USER_SHARE, &csi_brg_id));
|
||||
TEST_ESP_OK(mipi_csi_brg_declaim(csi_brg_id));
|
||||
TEST_ESP_OK(mipi_csi_brg_declaim(csi_brg_id));
|
||||
|
||||
TEST_ESP_OK(mipi_csi_brg_claim(MIPI_CSI_BRG_USER_ISP_DVP, &csi_brg_id));
|
||||
TEST_ASSERT(mipi_csi_brg_claim(MIPI_CSI_BRG_USER_CSI, &csi_brg_id) == ESP_ERR_NOT_FOUND);
|
||||
TEST_ESP_OK(mipi_csi_brg_declaim(csi_brg_id));
|
||||
TEST_ASSERT(mipi_csi_brg_declaim(csi_brg_id) == ESP_ERR_INVALID_STATE);
|
||||
}
|
@ -18,11 +18,10 @@ TEST_CASE("ISP processor exhausted allocation", "[isp]")
|
||||
.input_data_color_type = ISP_COLOR_RAW8,
|
||||
.output_data_color_type = ISP_COLOR_RGB565,
|
||||
};
|
||||
isp_proc_t isp_proc[SOC_ISP_NUMS + 1] = {};
|
||||
isp_proc_handle_t isp_proc[SOC_ISP_NUMS + 1] = {};
|
||||
|
||||
for (int i = 0; i < SOC_ISP_NUMS; i++) {
|
||||
TEST_ESP_OK(esp_isp_new_processor(&isp_config, &isp_proc[i]));
|
||||
esp_rom_printf("first alloc ok\n");
|
||||
}
|
||||
|
||||
TEST_ASSERT(esp_isp_new_processor(&isp_config, &isp_proc[SOC_ISP_NUMS]) == ESP_ERR_NOT_FOUND);
|
||||
@ -40,7 +39,7 @@ TEST_CASE("ISP AF controller exhausted allocation", "[isp]")
|
||||
.input_data_color_type = ISP_COLOR_RAW8,
|
||||
.output_data_color_type = ISP_COLOR_RGB565,
|
||||
};
|
||||
isp_proc_t isp_proc = NULL;
|
||||
isp_proc_handle_t isp_proc = NULL;
|
||||
TEST_ESP_OK(esp_isp_new_processor(&isp_config, &isp_proc));
|
||||
|
||||
esp_isp_af_config_t af_config = {
|
||||
@ -67,7 +66,7 @@ TEST_CASE("ISP AF env detector exhausted allocation", "[isp]")
|
||||
.input_data_color_type = ISP_COLOR_RAW8,
|
||||
.output_data_color_type = ISP_COLOR_RGB565,
|
||||
};
|
||||
isp_proc_t isp_proc = NULL;
|
||||
isp_proc_handle_t isp_proc = NULL;
|
||||
TEST_ESP_OK(esp_isp_new_processor(&isp_config, &isp_proc));
|
||||
|
||||
esp_isp_af_config_t af_config = {
|
||||
|
@ -112,12 +112,6 @@ examples/peripherals/i2s/i2s_recorder:
|
||||
- esp_driver_spi
|
||||
- esp_driver_i2s
|
||||
|
||||
examples/peripherals/jpeg/jpeg_decode:
|
||||
disable:
|
||||
- if: SOC_JPEG_CODEC_SUPPORTED != 1
|
||||
depends_components:
|
||||
- esp_driver_jpeg
|
||||
|
||||
examples/peripherals/isp/auto_focus:
|
||||
disable:
|
||||
- if: INCLUDE_DEFAULT == 1
|
||||
@ -126,6 +120,12 @@ examples/peripherals/isp/auto_focus:
|
||||
depends_components:
|
||||
- esp_driver_isp
|
||||
|
||||
examples/peripherals/jpeg/jpeg_decode:
|
||||
disable:
|
||||
- if: SOC_JPEG_CODEC_SUPPORTED != 1
|
||||
depends_components:
|
||||
- esp_driver_jpeg
|
||||
|
||||
examples/peripherals/lcd/i2c_oled:
|
||||
disable:
|
||||
- if: SOC_I2C_SUPPORTED != 1
|
||||
|
Loading…
Reference in New Issue
Block a user