mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(esp_driver_spi): enable single board test for esp32p4
This commit is contained in:
parent
1ad5d42dbb
commit
f3968eb8fb
@ -16,6 +16,10 @@
|
|||||||
|
|
||||||
#include "driver/spi_master.h"
|
#include "driver/spi_master.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#if SOC_SPI_SCT_SUPPORTED
|
#if SOC_SPI_SCT_SUPPORTED
|
||||||
/**
|
/**
|
||||||
* @Backgrounds: `SCT Mode`
|
* @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);
|
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
|
#endif //#if SOC_SPI_SCT_SUPPORTED
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -9,10 +9,6 @@
|
|||||||
components/esp_driver_spi/test_apps/master:
|
components/esp_driver_spi/test_apps/master:
|
||||||
disable:
|
disable:
|
||||||
- if: SOC_GPSPI_SUPPORTED != 1
|
- 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
|
<<: *spi_depends_default
|
||||||
|
|
||||||
components/esp_driver_spi/test_apps/param:
|
components/esp_driver_spi/test_apps/param:
|
||||||
@ -21,24 +17,16 @@ components/esp_driver_spi/test_apps/param:
|
|||||||
disable_test:
|
disable_test:
|
||||||
- if: IDF_TARGET == "esp32p4"
|
- if: IDF_TARGET == "esp32p4"
|
||||||
temporary: true
|
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
|
<<: *spi_depends_default
|
||||||
|
|
||||||
components/esp_driver_spi/test_apps/slave:
|
components/esp_driver_spi/test_apps/slave:
|
||||||
disable:
|
disable:
|
||||||
- if: SOC_GPSPI_SUPPORTED != 1
|
- 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
|
<<: *spi_depends_default
|
||||||
|
|
||||||
components/esp_driver_spi/test_apps/slave_hd:
|
components/esp_driver_spi/test_apps/slave_hd:
|
||||||
disable:
|
disable:
|
||||||
- if: SOC_GPSPI_SUPPORTED != 1
|
- if: SOC_GPSPI_SUPPORTED != 1
|
||||||
- if: SOC_SPI_SUPPORT_SLAVE_HD_VER2 != 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
|
<<: *spi_depends_default
|
||||||
|
@ -29,6 +29,7 @@ const static char TAG[] = "test_spi";
|
|||||||
// There is no input-only pin except on esp32 and esp32s2
|
// 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)
|
#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)
|
static void check_spi_pre_n_for(spi_clock_source_t clock_source, int clk, int pre, int n)
|
||||||
{
|
{
|
||||||
spi_device_handle_t handle;
|
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));
|
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)
|
static spi_device_handle_t setup_spi_bus_loopback(int clkspeed, bool dma)
|
||||||
{
|
{
|
||||||
|
@ -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
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
# If `test_env` is define, should not run on generic runner
|
# 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.supported_targets
|
||||||
@pytest.mark.esp32h2
|
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
@pytest.mark.parametrize('config', ['defaults', 'release', 'freertos_compliance', 'freertos_flash',], indirect=True)
|
@pytest.mark.parametrize('config', ['defaults', 'release', 'freertos_compliance', 'freertos_flash',], indirect=True)
|
||||||
def test_master_single_dev(case_tester) -> None: # type: ignore
|
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
|
# 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.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='no multi-dev runner')
|
||||||
@pytest.mark.supported_targets
|
@pytest.mark.supported_targets
|
||||||
@pytest.mark.esp32h2
|
|
||||||
@pytest.mark.generic_multi_device
|
@pytest.mark.generic_multi_device
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'count, config',
|
'count, config',
|
||||||
|
@ -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
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
# If `test_env` is define, should not run on generic runner
|
# 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.supported_targets
|
||||||
@pytest.mark.esp32h2
|
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
@pytest.mark.parametrize('config', ['defaults',], indirect=True)
|
@pytest.mark.parametrize('config', ['defaults',], indirect=True)
|
||||||
def test_slave_single_dev(case_tester) -> None: # type: ignore
|
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
|
# 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.temp_skip_ci(targets=['esp32p4', 'esp32c5'], reason='no multi-dev runner')
|
||||||
@pytest.mark.supported_targets
|
@pytest.mark.supported_targets
|
||||||
@pytest.mark.esp32h2
|
|
||||||
@pytest.mark.generic_multi_device
|
@pytest.mark.generic_multi_device
|
||||||
@pytest.mark.parametrize('count, config', [(2, 'defaults'), (2, 'iram_safe')], indirect=True)
|
@pytest.mark.parametrize('count, config', [(2, 'defaults'), (2, 'iram_safe')], indirect=True)
|
||||||
def test_slave_multi_dev(case_tester) -> None: # type: ignore
|
def test_slave_multi_dev(case_tester) -> None: # type: ignore
|
||||||
|
@ -11,6 +11,7 @@ import pytest
|
|||||||
@pytest.mark.esp32c5
|
@pytest.mark.esp32c5
|
||||||
@pytest.mark.esp32c6
|
@pytest.mark.esp32c6
|
||||||
@pytest.mark.esp32h2
|
@pytest.mark.esp32h2
|
||||||
|
@pytest.mark.esp32p4
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
def test_slave_hd_single_dev(case_tester) -> None: # type: ignore
|
def test_slave_hd_single_dev(case_tester) -> None: # type: ignore
|
||||||
for case in case_tester.test_menu:
|
for case in case_tester.test_menu:
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "soc/spi_periph.h"
|
#include "soc/spi_periph.h"
|
||||||
#include "soc/lldesc.h"
|
#include "soc/lldesc.h"
|
||||||
#include "soc/soc_caps.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/spi_slave_hd_hal.h"
|
||||||
#include "hal/assert.h"
|
#include "hal/assert.h"
|
||||||
|
|
||||||
|
@ -82,6 +82,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/private/esp_coexist_adapter.h
|
||||||
components/esp_coex/include/esp_coex_i154.h
|
components/esp_coex/include/esp_coex_i154.h
|
||||||
|
|
||||||
### To be fixed: headers that rely on implicit inclusion
|
### To be fixed: headers that rely on implicit inclusion
|
||||||
#
|
#
|
||||||
components/esp_ringbuf/include/freertos/ringbuf.h
|
components/esp_ringbuf/include/freertos/ringbuf.h
|
||||||
@ -123,4 +124,3 @@ components/riscv/include/riscv/rvruntime-frames.h
|
|||||||
components/console/private_include/console_private.h
|
components/console/private_include/console_private.h
|
||||||
|
|
||||||
# Missing extern "C"
|
# Missing extern "C"
|
||||||
components/esp_driver_spi/include/esp_private/spi_master_internal.h
|
|
||||||
|
Loading…
Reference in New Issue
Block a user