mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(parlio): refactor of the private parlio caps
This commit is contained in:
@@ -9,17 +9,17 @@ project(parlio_test)
|
||||
|
||||
idf_build_get_property(elf EXECUTABLE)
|
||||
if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
add_custom_target(check_test_app_sections ALL
|
||||
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
|
||||
--rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_parlio/,
|
||||
${CMAKE_BINARY_DIR}/esp-idf/esp_hal_parlio/
|
||||
--elf-file ${CMAKE_BINARY_DIR}/parlio_test.elf
|
||||
find-refs
|
||||
--from-sections=.iram0.text
|
||||
--to-sections=.flash.text,.flash.rodata
|
||||
--exit-code
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
add_custom_target(
|
||||
check_test_app_sections ALL
|
||||
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
|
||||
--rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_parlio/,${CMAKE_BINARY_DIR}/esp-idf/esp_hal_parlio/
|
||||
--elf-file ${CMAKE_BINARY_DIR}/parlio_test.elf
|
||||
find-refs
|
||||
--from-sections=.iram0.text
|
||||
--to-sections=.flash.text,.flash.rodata
|
||||
--exit-code
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
message(STATUS "Checking parlio registers are not read-write by half-word")
|
||||
|
||||
@@ -19,7 +19,7 @@ endif()
|
||||
idf_component_register(SRCS ${srcs}
|
||||
PRIV_REQUIRES unity esp_driver_parlio esp_driver_gpio
|
||||
esp_driver_i2s esp_driver_spi esp_psram
|
||||
esp_driver_bitscrambler
|
||||
esp_driver_bitscrambler esp_hal_parlio
|
||||
WHOLE_ARCHIVE)
|
||||
|
||||
if(CONFIG_SOC_BITSCRAMBLER_SUPPORTED)
|
||||
|
||||
@@ -202,7 +202,7 @@ TEST_CASE("parlio_tx_bitscrambler_test", "[parlio_bitscrambler]")
|
||||
test_parlio_bitscrambler();
|
||||
}
|
||||
|
||||
#if SOC_PARLIO_TX_SUPPORT_EOF_FROM_DMA
|
||||
#if PARLIO_LL_SUPPORT(TX_EOF_FROM_DMA)
|
||||
static void test_parlio_bitscrambler_different_input_output_sizes(void)
|
||||
{
|
||||
parlio_tx_unit_handle_t tx_unit = NULL;
|
||||
@@ -353,4 +353,4 @@ TEST_CASE("parlio_tx_bitscrambler_different_input_output_sizes_test", "[parlio_b
|
||||
{
|
||||
test_parlio_bitscrambler_different_input_output_sizes();
|
||||
}
|
||||
#endif // SOC_PARLIO_TX_SUPPORT_EOF_FROM_DMA
|
||||
#endif // PARLIO_LL_SUPPORT(TX_EOF_FROM_DMA)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/spi_periph.h"
|
||||
#include "hal/parlio_periph.h"
|
||||
#include "hal/parlio_ll.h"
|
||||
#include "esp_attr.h"
|
||||
#include "test_board.h"
|
||||
#include "esp_private/parlio_rx_private.h"
|
||||
@@ -29,7 +30,7 @@
|
||||
#define TEST_I2S_PORT I2S_NUM_0
|
||||
#define TEST_VALID_SIG (PARLIO_RX_UNIT_MAX_DATA_WIDTH - 1)
|
||||
|
||||
#if SOC_PARLIO_RX_CLK_SUPPORT_OUTPUT
|
||||
#if PARLIO_LL_SUPPORT(RX_CLK_OUTPUT)
|
||||
#define TEST_OUTPUT_CLK_PIN TEST_CLK_GPIO
|
||||
#else
|
||||
#define TEST_OUTPUT_CLK_PIN -1
|
||||
@@ -399,11 +400,11 @@ TEST_CASE("parallel_rx_unit_pulse_delimiter_test_via_i2s", "[parlio_rx]")
|
||||
TEST_CASE("parallel_rx_unit_install_uninstall", "[parlio_rx]")
|
||||
{
|
||||
printf("install rx units exhaustively\r\n");
|
||||
parlio_rx_unit_handle_t units[SOC_PARLIO_GROUPS * SOC_PARLIO_RX_UNITS_PER_GROUP];
|
||||
parlio_rx_unit_handle_t units[PARLIO_LL_GET(INST_NUM) * PARLIO_LL_GET(RX_UNITS_PER_INST)];
|
||||
int k = 0;
|
||||
parlio_rx_unit_config_t config = TEST_DEFAULT_UNIT_CONFIG(PARLIO_CLK_SRC_DEFAULT, 1000000);
|
||||
for (int i = 0; i < SOC_PARLIO_GROUPS; i++) {
|
||||
for (int j = 0; j < SOC_PARLIO_RX_UNITS_PER_GROUP; j++) {
|
||||
for (int i = 0; i < PARLIO_LL_GET(INST_NUM); i++) {
|
||||
for (int j = 0; j < PARLIO_LL_GET(RX_UNITS_PER_INST); j++) {
|
||||
TEST_ESP_OK(parlio_new_rx_unit(&config, &units[k++]));
|
||||
}
|
||||
}
|
||||
@@ -421,7 +422,7 @@ TEST_CASE("parallel_rx_unit_install_uninstall", "[parlio_rx]")
|
||||
// clock from internal
|
||||
config.clk_src = PARLIO_CLK_SRC_DEFAULT;
|
||||
config.clk_out_gpio_num = TEST_CLK_GPIO;
|
||||
#if SOC_PARLIO_RX_CLK_SUPPORT_OUTPUT
|
||||
#if PARLIO_LL_SUPPORT(RX_CLK_OUTPUT)
|
||||
TEST_ESP_OK(parlio_new_rx_unit(&config, &units[0]));
|
||||
TEST_ESP_OK(parlio_del_rx_unit(units[0]));
|
||||
#else
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
TEST_CASE("parallel_tx_unit_install_uninstall", "[parlio_tx]")
|
||||
{
|
||||
printf("install tx units exhaustively\r\n");
|
||||
parlio_tx_unit_handle_t units[SOC_PARLIO_GROUPS * SOC_PARLIO_TX_UNITS_PER_GROUP];
|
||||
parlio_tx_unit_handle_t units[PARLIO_LL_GET(INST_NUM) * PARLIO_LL_GET(TX_UNITS_PER_INST)];
|
||||
int k = 0;
|
||||
parlio_tx_unit_config_t config = {
|
||||
.clk_src = PARLIO_CLK_SRC_DEFAULT,
|
||||
@@ -31,8 +31,8 @@ TEST_CASE("parallel_tx_unit_install_uninstall", "[parlio_tx]")
|
||||
.max_transfer_size = 64,
|
||||
.valid_gpio_num = -1,
|
||||
};
|
||||
for (int i = 0; i < SOC_PARLIO_GROUPS; i++) {
|
||||
for (int j = 0; j < SOC_PARLIO_TX_UNITS_PER_GROUP; j++) {
|
||||
for (int i = 0; i < PARLIO_LL_GET(INST_NUM); i++) {
|
||||
for (int j = 0; j < PARLIO_LL_GET(TX_UNITS_PER_INST); j++) {
|
||||
TEST_ESP_OK(parlio_new_tx_unit(&config, &units[k++]));
|
||||
}
|
||||
}
|
||||
@@ -649,7 +649,7 @@ TEST_CASE("parlio_tx_loop_transmission", "[parlio_tx]")
|
||||
}
|
||||
#endif // SOC_PARLIO_TX_SUPPORT_LOOP_TRANSMISSION
|
||||
|
||||
#if SOC_PARLIO_TX_SUPPORT_EOF_FROM_DMA
|
||||
#if PARLIO_LL_SUPPORT(TX_EOF_FROM_DMA)
|
||||
TEST_CASE("parlio_tx can transmit buffer larger than max_size decided by datalen_eof", "[parlio_tx]")
|
||||
{
|
||||
printf("install parlio tx unit\r\n");
|
||||
@@ -695,4 +695,4 @@ TEST_CASE("parlio_tx can transmit buffer larger than max_size decided by datalen
|
||||
TEST_ESP_OK(parlio_del_tx_unit(tx_unit));
|
||||
free(buffer);
|
||||
}
|
||||
#endif // SOC_PARLIO_TX_SUPPORT_EOF_FROM_DMA
|
||||
#endif // PARLIO_LL_SUPPORT(TX_EOF_FROM_DMA)
|
||||
|
||||
Reference in New Issue
Block a user