diff --git a/components/esp_driver_spi/include/esp_private/spi_master_internal.h b/components/esp_driver_spi/include/esp_private/spi_master_internal.h index 99ecd5e6d7..b7ea40c89d 100644 --- a/components/esp_driver_spi/include/esp_private/spi_master_internal.h +++ b/components/esp_driver_spi/include/esp_private/spi_master_internal.h @@ -16,6 +16,10 @@ #include "driver/spi_master.h" +#ifdef __cplusplus +extern "C" { +#endif + #if SOC_SPI_SCT_SUPPORTED /** * @Backgrounds: `SCT Mode` @@ -112,3 +116,7 @@ esp_err_t spi_device_queue_multi_trans(spi_device_handle_t handle, spi_multi_tra */ esp_err_t spi_device_get_multi_trans_result(spi_device_handle_t handle, spi_multi_transaction_t **seg_trans_desc, TickType_t ticks_to_wait); #endif //#if SOC_SPI_SCT_SUPPORTED + +#ifdef __cplusplus +} +#endif diff --git a/components/esp_driver_spi/test_apps/.build-test-rules.yml b/components/esp_driver_spi/test_apps/.build-test-rules.yml index 04fab58894..4e5eb2819d 100644 --- a/components/esp_driver_spi/test_apps/.build-test-rules.yml +++ b/components/esp_driver_spi/test_apps/.build-test-rules.yml @@ -9,10 +9,6 @@ components/esp_driver_spi/test_apps/master: disable: - if: SOC_GPSPI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: not supported, no multi-dev runner # TODO: [ESP32P4] IDF-8942 <<: *spi_depends_default components/esp_driver_spi/test_apps/param: @@ -21,24 +17,16 @@ components/esp_driver_spi/test_apps/param: disable_test: - if: IDF_TARGET == "esp32p4" temporary: true - reason: not supported, no multi-dev runner # TODO: [ESP32P4] IDF-8942 + reason: no multi-dev runner # TODO: [ESP32P4] IDF-9517 <<: *spi_depends_default components/esp_driver_spi/test_apps/slave: disable: - if: SOC_GPSPI_SUPPORTED != 1 - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: not supported, no multi-dev runner # TODO: [ESP32P4] IDF-8942 <<: *spi_depends_default components/esp_driver_spi/test_apps/slave_hd: disable: - if: SOC_GPSPI_SUPPORTED != 1 - if: SOC_SPI_SUPPORT_SLAVE_HD_VER2 != 1 - disable_test: - - if: IDF_TARGET == "esp32p4" - temporary: true - reason: not supported # TODO: IDF-8942 <<: *spi_depends_default diff --git a/components/esp_driver_spi/test_apps/master/main/test_spi_master.c b/components/esp_driver_spi/test_apps/master/main/test_spi_master.c index cde48af830..11cf02db52 100644 --- a/components/esp_driver_spi/test_apps/master/main/test_spi_master.c +++ b/components/esp_driver_spi/test_apps/master/main/test_spi_master.c @@ -29,6 +29,7 @@ const static char TAG[] = "test_spi"; // There is no input-only pin except on esp32 and esp32s2 #define TEST_SOC_HAS_INPUT_ONLY_PINS (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2) +#if !CONFIG_IDF_TARGET_ESP32P4 //TODO: IDF-8313 static void check_spi_pre_n_for(spi_clock_source_t clock_source, int clk, int pre, int n) { spi_device_handle_t handle; @@ -176,6 +177,7 @@ TEST_CASE("SPI Master clockdiv calculation routines", "[spi]") TEST_ESP_OK(spi_bus_free(TEST_SPI_HOST)); } +#endif // IDF-8313 static spi_device_handle_t setup_spi_bus_loopback(int clkspeed, bool dma) { diff --git a/components/esp_driver_spi/test_apps/master/pytest_spi_master.py b/components/esp_driver_spi/test_apps/master/pytest_spi_master.py index f791c6db63..f43f0a6482 100644 --- a/components/esp_driver_spi/test_apps/master/pytest_spi_master.py +++ b/components/esp_driver_spi/test_apps/master/pytest_spi_master.py @@ -1,12 +1,10 @@ -# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import pytest # If `test_env` is define, should not run on generic runner -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 support TBD') # TODO: IDF-8942 @pytest.mark.supported_targets -@pytest.mark.esp32h2 @pytest.mark.generic @pytest.mark.parametrize('config', ['defaults', 'release', 'freertos_compliance', 'freertos_flash',], indirect=True) def test_master_single_dev(case_tester) -> None: # type: ignore @@ -28,10 +26,9 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore # if `test_env` not defined, will run on `generic_multi_device` by default -# TODO: [ESP32P4] IDF-8942 [ESP32C5] IDF-10322 +# TODO: [ESP32P4] IDF-9517 [ESP32C5] IDF-10322 @pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='no multi-dev runner') @pytest.mark.supported_targets -@pytest.mark.esp32h2 @pytest.mark.generic_multi_device @pytest.mark.parametrize( 'count, config', diff --git a/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py b/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py index 6a97d24886..de424b0433 100644 --- a/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py +++ b/components/esp_driver_spi/test_apps/slave/pytest_spi_slave.py @@ -1,12 +1,10 @@ -# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import pytest # If `test_env` is define, should not run on generic runner -@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 support TBD') # TODO: IDF-8942 @pytest.mark.supported_targets -@pytest.mark.esp32h2 @pytest.mark.generic @pytest.mark.parametrize('config', ['defaults',], indirect=True) def test_slave_single_dev(case_tester) -> None: # type: ignore @@ -17,10 +15,9 @@ def test_slave_single_dev(case_tester) -> None: # type: ignore # if `test_env` not defined, will run on `generic_multi_device` by default -# TODO: [ESP32P4] IDF-8942 [ESP32C5] IDF-10322 +# TODO: [ESP32P4] IDF-9517 [ESP32C5] IDF-10322 @pytest.mark.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='no multi-dev runner') @pytest.mark.supported_targets -@pytest.mark.esp32h2 @pytest.mark.generic_multi_device @pytest.mark.parametrize('count, config', [(2, 'defaults'), (2, 'iram_safe')], indirect=True) def test_slave_multi_dev(case_tester) -> None: # type: ignore diff --git a/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py b/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py index 1329b4912f..69dfdba1d0 100644 --- a/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py +++ b/components/esp_driver_spi/test_apps/slave_hd/pytest_spi_slave_hd.py @@ -11,6 +11,7 @@ import pytest @pytest.mark.esp32c5 @pytest.mark.esp32c6 @pytest.mark.esp32h2 +@pytest.mark.esp32p4 @pytest.mark.generic def test_slave_hd_single_dev(case_tester) -> None: # type: ignore for case in case_tester.test_menu: diff --git a/components/hal/spi_slave_hd_hal.c b/components/hal/spi_slave_hd_hal.c index 5839bd3b5a..c8922d8f58 100644 --- a/components/hal/spi_slave_hd_hal.c +++ b/components/hal/spi_slave_hd_hal.c @@ -14,6 +14,7 @@ #include "soc/spi_periph.h" #include "soc/lldesc.h" #include "soc/soc_caps.h" +#include "soc/ext_mem_defs.h" //for SOC_NON_CACHEABLE_OFFSET #include "hal/spi_slave_hd_hal.h" #include "hal/assert.h" diff --git a/tools/ci/check_public_headers_exceptions.txt b/tools/ci/check_public_headers_exceptions.txt index 3a275757de..397518950e 100644 --- a/tools/ci/check_public_headers_exceptions.txt +++ b/tools/ci/check_public_headers_exceptions.txt @@ -81,6 +81,7 @@ components/esp_hw_support/include/esp_private/esp_riscv_intr.h # components/esp_coex/include/private/esp_coexist_adapter.h components/esp_coex/include/esp_coex_i154.h + ### To be fixed: headers that rely on implicit inclusion # components/esp_ringbuf/include/freertos/ringbuf.h @@ -122,4 +123,3 @@ components/riscv/include/riscv/rvruntime-frames.h components/console/private_include/console_private.h # Missing extern "C" -components/esp_driver_spi/include/esp_private/spi_master_internal.h