mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
Compare commits
108 Commits
a6c3a9cbbb
...
94cfe394fe
Author | SHA1 | Date | |
---|---|---|---|
|
94cfe394fe | ||
|
05d7a4c2e5 | ||
|
865adce22c | ||
|
843729c6f1 | ||
|
feb9d8c157 | ||
|
7317d96bc3 | ||
|
3c7ca8f2c9 | ||
|
adf4822a31 | ||
|
1153981bc8 | ||
|
7841a55a71 | ||
|
4cdd5087ef | ||
|
2c68d2d266 | ||
|
3b41e2ce9a | ||
|
030cdf9807 | ||
|
620ab3b913 | ||
|
c181afcc27 | ||
|
bcea8c9881 | ||
|
3f66b30680 | ||
|
1ee5551004 | ||
|
4f127f57e2 | ||
|
c058048085 | ||
|
fafdae5cb7 | ||
|
cf169a402b | ||
|
19716c764d | ||
|
03b4711ed2 | ||
|
daf2d31008 | ||
|
270cd77abb | ||
|
a39d8d43ee | ||
|
5787da0aec | ||
|
cfed129e05 | ||
|
30f2578e75 | ||
|
717c18a58e | ||
|
bbcef0570d | ||
|
47df2ed524 | ||
|
dcc26e3e4f | ||
|
f7bfa95d81 | ||
|
b16095cf00 | ||
|
64113b8e86 | ||
|
a6ea9bcd41 | ||
|
afb2154247 | ||
|
f38bb558fc | ||
|
541c21f975 | ||
|
ca2e1c71c4 | ||
|
420e61d022 | ||
|
65044efa22 | ||
|
1d400fb92e | ||
|
1c5708b07b | ||
|
9715729b27 | ||
|
b815cb18b8 | ||
|
01652f590c | ||
|
d96e325388 | ||
|
a8e5fd4b86 | ||
|
d46b4fbfcf | ||
|
700f62e206 | ||
|
e02e6fe5ca | ||
|
03311c6867 | ||
|
0ef626c3cb | ||
|
3821d6cb97 | ||
|
eb5c2485e2 | ||
|
b11fa82eb6 | ||
|
2cd87223a8 | ||
|
099c5a8a69 | ||
|
5c514e4634 | ||
|
7e00ea43f0 | ||
|
46c404f4c0 | ||
|
cb9257dae7 | ||
|
da0ccb65c1 | ||
|
9496949132 | ||
|
15b7f99f1d | ||
|
da69aee8f8 | ||
|
3bf56f7dd5 | ||
|
9eb6f68454 | ||
|
714ebfc0d1 | ||
|
a080ce9fad | ||
|
648dc329f6 | ||
|
bf51415d86 | ||
|
3420672964 | ||
|
b4f59dae9c | ||
|
9a917658a6 | ||
|
b504d61f42 | ||
|
543b81b37b | ||
|
262b9215f7 | ||
|
add27dfbd3 | ||
|
35a6584e92 | ||
|
06da436a4c | ||
|
9aaa7f828e | ||
|
44d9cb3ae5 | ||
|
108006419a | ||
|
714e626dc2 | ||
|
b900a50132 | ||
|
8038037b07 | ||
|
e791f14bc4 | ||
|
d672f909f3 | ||
|
891f86d649 | ||
|
6bd6be3ed8 | ||
|
90d477c9a6 | ||
|
95fe253065 | ||
|
19f148ed9d | ||
|
9d8805563d | ||
|
cd8fa5c46f | ||
|
b5c5a69a95 | ||
|
32e4fb79e8 | ||
|
46ce02b8f2 | ||
|
c7993c2725 | ||
|
56de1f4ed1 | ||
|
05ea550597 | ||
|
dd27588ea7 | ||
|
d675680d5e |
3
.flake8
3
.flake8
@ -53,13 +53,11 @@ select =
|
||||
E133, # closing bracket is missing indentation
|
||||
E201, # whitespace after '('
|
||||
E202, # whitespace before ')'
|
||||
E203, # whitespace before ':'
|
||||
E211, # whitespace before '('
|
||||
E221, # multiple spaces before operator
|
||||
E222, # multiple spaces after operator
|
||||
E223, # tab before operator
|
||||
E224, # tab after operator
|
||||
E225, # missing whitespace around operator
|
||||
E226, # missing whitespace around arithmetic operator
|
||||
E227, # missing whitespace around bitwise or shift operator
|
||||
E228, # missing whitespace around modulo operator
|
||||
@ -125,6 +123,7 @@ select =
|
||||
|
||||
ignore =
|
||||
E221, # multiple spaces before operator
|
||||
E225, # missing whitespace around operator
|
||||
E231, # missing whitespace after ',', ';', or ':'
|
||||
E241, # multiple spaces after ','
|
||||
W503, # line break before binary operator
|
||||
|
@ -4,6 +4,32 @@
|
||||
default_stages: [pre-commit]
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: "v0.9.7"
|
||||
hooks:
|
||||
- id: ruff-format
|
||||
args: [ "--preview" ]
|
||||
files: 'pytest_.*\.py$'
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pytest-linter
|
||||
name: Pytest Linter Check
|
||||
entry: tools/ci/check_test_files.py
|
||||
language: python
|
||||
files: 'pytest_.*\.py$'
|
||||
require_serial: true
|
||||
additional_dependencies:
|
||||
- pytest-embedded-idf[serial]~=1.14
|
||||
- pytest-embedded-jtag~=1.14
|
||||
- pytest-embedded-qemu~=1.14
|
||||
- pytest-ignore-test-results~=0.3
|
||||
- pytest-rerunfailures
|
||||
- pytest-timeout
|
||||
- idf-build-apps~=2.8
|
||||
- python-gitlab
|
||||
- minio
|
||||
- click
|
||||
- esp-idf-monitor
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
@ -54,6 +80,8 @@ repos:
|
||||
(?x)^(
|
||||
.*_pb2.py
|
||||
)$
|
||||
|pytest_eth_iperf.py
|
||||
|pytest_iperf.py
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
@ -72,11 +100,6 @@ repos:
|
||||
language: python
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
- id: check-deprecated-kconfigs-options
|
||||
name: Check if any Kconfig Options Deprecated
|
||||
entry: tools/ci/check_deprecated_kconfigs.py
|
||||
language: python
|
||||
files: 'sdkconfig\.ci$|sdkconfig\.rename$|sdkconfig.*$'
|
||||
- id: cmake-lint
|
||||
name: Check CMake Files Format
|
||||
entry: cmakelint --linelength=120 --spaces=4 --filter=-whitespace/indent
|
||||
@ -156,7 +179,7 @@ repos:
|
||||
require_serial: true
|
||||
additional_dependencies:
|
||||
- PyYAML == 5.3.1
|
||||
- idf-build-apps>=2.6.2,<3
|
||||
- idf-build-apps>=2.8,<3
|
||||
- id: sort-yaml-files
|
||||
name: sort yaml files
|
||||
entry: tools/ci/sort_yaml.py
|
||||
@ -243,6 +266,7 @@ repos:
|
||||
name: Lint rST files in docs folder using Sphinx Lint
|
||||
files: ^(docs/en|docs/zh_CN)/.*\.(rst|inc)$
|
||||
- repo: https://github.com/espressif/esp-idf-kconfig.git
|
||||
rev: v2.4.1
|
||||
rev: v2.5.0
|
||||
hooks:
|
||||
- id: check-kconfig-files
|
||||
- id: check-deprecated-kconfig-options
|
||||
|
@ -18,6 +18,6 @@ entries:
|
||||
archive: libesp_driver_gptimer.a
|
||||
entries:
|
||||
if APPTRACE_SV_TS_SOURCE_GPTIMER = y:
|
||||
gptimer (noflash)
|
||||
gptimer: gptimer_get_raw_count (noflash)
|
||||
else:
|
||||
* (default)
|
||||
|
@ -1,16 +1,18 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import re
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
DEFAULT_TIMEOUT = 20
|
||||
TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='C5 has not supported deep sleep') # TODO: [ESP32C5] IDF-8640, IDF-10317
|
||||
@pytest.mark.temp_skip_ci(
|
||||
targets=['esp32c5'], reason='C5 has not supported deep sleep'
|
||||
) # TODO: [ESP32C5] IDF-8640, IDF-10317
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -19,11 +21,11 @@ TEST_SUBMENU_PATTERN_PYTEST = re.compile(rb'\s+\((\d+)\)\s+"([^"]+)"\r?\n')
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_app_update(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=90)
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
# TODO: [ESP32C61] IDF-9245, IDF-10983
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='C61 has not supported deep sleep')
|
||||
@pytest.mark.generic
|
||||
@ -34,12 +36,14 @@ def test_app_update(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_app_update_xip_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=90)
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c5'], reason='C5 has not supported deep sleep') # TODO: [ESP32C5] IDF-8640, IDF-10317
|
||||
@pytest.mark.temp_skip_ci(
|
||||
targets=['esp32c5'], reason='C5 has not supported deep sleep'
|
||||
) # TODO: [ESP32C5] IDF-8640, IDF-10317
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -48,14 +52,11 @@ def test_app_update_xip_psram(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=90)
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -64,5 +65,6 @@ def test_app_update_xip_psram_rom_impl(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3', 'esp32p4'], indirect=['target'])
|
||||
def test_app_update_with_rollback(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=90)
|
||||
|
@ -764,7 +764,7 @@ menu "Security features"
|
||||
|
||||
config SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT
|
||||
bool "Flash bootloader along with other artifacts when using the default flash command"
|
||||
depends on SECURE_BOOT_V2_ENABLED && SECURE_BOOT_BUILD_SIGNED_BINARIES
|
||||
depends on SECURE_BOOT_V2_ENABLED
|
||||
default n
|
||||
help
|
||||
When Secure Boot V2 is enabled, by default the bootloader is not flashed along with other artifacts
|
||||
|
@ -437,6 +437,7 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit
|
||||
err = read_and_verify_partition_table(partition->pos.offset, partition_table, &num_partitions);
|
||||
should_encrypt = (err == ESP_OK && num_partitions != 0);
|
||||
} else if ((partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_OTA)
|
||||
|| (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_TEE_OTA)
|
||||
|| (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_NVS_KEYS)) {
|
||||
/* check if we have ota data partition and the partition should be encrypted unconditionally */
|
||||
should_encrypt = true;
|
||||
|
@ -154,13 +154,12 @@ esp_err_t esp_secure_boot_verify_sbv2_signature_block(const ets_secure_boot_sign
|
||||
ets_secure_boot_key_digests_t trusted_key_digests = {0};
|
||||
bool valid_sig_blk = false;
|
||||
for (unsigned i = 0; i < SECURE_BOOT_NUM_BLOCKS; i++) {
|
||||
trusted_key_digests.key_digests[i] = &trusted.key_digests[i];
|
||||
if (sig_block->block[i].version != ESP_SECURE_BOOT_SCHEME) {
|
||||
ESP_LOGD(TAG, "%s signing scheme selected but signature block %d generated for %s scheme", esp_secure_boot_get_scheme_name(ESP_SECURE_BOOT_SCHEME), i, esp_secure_boot_get_scheme_name(sig_block->block[i].version));
|
||||
continue;
|
||||
} else {
|
||||
valid_sig_blk = true;
|
||||
}
|
||||
trusted_key_digests.key_digests[i] = &trusted.key_digests[i];
|
||||
}
|
||||
if (valid_sig_blk != true) {
|
||||
ESP_LOGE(TAG, "No signature block generated for valid scheme");
|
||||
|
@ -1,26 +1,26 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.supported_targets
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_bootloader_support(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.host_test
|
||||
@pytest.mark.qemu
|
||||
@pytest.mark.esp32
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_bootloader_support_qemu_esp32(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.host_test
|
||||
@pytest.mark.qemu
|
||||
@pytest.mark.esp32c3
|
||||
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
|
||||
def test_bootloader_support_qemu_esp32c3(dut: Dut) -> None:
|
||||
for case in dut.test_menu:
|
||||
if 'qemu-ignore-c3' not in case.groups:
|
||||
|
@ -1,17 +1,15 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_rtc_reserved_memory(dut: Dut) -> None:
|
||||
dut.expect_exact('SUCCESS: data were saved across reboot', timeout=10)
|
||||
|
@ -529,7 +529,6 @@ config BTDM_BLE_VS_QA_SUPPORT
|
||||
This enables BLE vendor HCI command and event for QA.
|
||||
|
||||
config BTDM_CTRL_CONTROLLER_DEBUG_MODE_1
|
||||
visible if 0
|
||||
bool "Enable Bluetooth controller debugging mode 1 (for internal use only)"
|
||||
default n
|
||||
depends on BT_ENABLED
|
||||
|
@ -83,13 +83,16 @@ choice BT_BLE_CCA_MODE
|
||||
default BT_BLE_CCA_MODE_NONE
|
||||
help
|
||||
Define BT BLE CCA mode
|
||||
Note that if CCA feature is enabled, the hardware may not transmit packets due to channel busy.
|
||||
Therefore, it may potentially lead to an increase in the time taken for scanning advertising packet
|
||||
and establishing connections, or a decrease in the throughput rate of the connection.
|
||||
|
||||
config BT_BLE_CCA_MODE_NONE
|
||||
bool "NONE"
|
||||
config BT_BLE_CCA_MODE_HW
|
||||
bool "Hardware"
|
||||
config BT_BLE_CCA_MODE_SW
|
||||
bool "Software"
|
||||
bool "Software (experimental)"
|
||||
endchoice
|
||||
|
||||
config BT_BLE_CCA_MODE
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit fbbb054cbc5c8b5aa466208dc8d12ccc10d7e08c
|
||||
Subproject commit e4ab88c7144a1bd60d761bedbb2cb22c073c732b
|
@ -1 +1 @@
|
||||
Subproject commit 2ce747aec8008d008fe34fa375a2aea3e7e48e9a
|
||||
Subproject commit 0cfafa1e0aa30b7d59f53c38588f0598e228d127
|
@ -1502,6 +1502,17 @@ esp_err_t esp_ble_gap_periodic_adv_clear_dev(void)
|
||||
== BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
|
||||
|
||||
}
|
||||
|
||||
esp_err_t esp_ble_gap_get_periodic_list_size(uint8_t *size)
|
||||
{
|
||||
if (size == NULL) {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
btc_get_periodic_list_size(size);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
|
||||
#if (BLE_50_EXTEND_SCAN_EN == TRUE)
|
||||
|
@ -2593,6 +2593,17 @@ esp_err_t esp_ble_gap_periodic_adv_remove_dev_from_list(esp_ble_addr_type_t addr
|
||||
*/
|
||||
esp_err_t esp_ble_gap_periodic_adv_clear_dev(void);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the capacity of the periodic advertiser list in the controller.
|
||||
*
|
||||
* @param[out] size: Pointer to a variable where the capacity of the periodic advertiser list will be stored.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : Success
|
||||
* - Others : Failure
|
||||
*/
|
||||
esp_err_t esp_ble_gap_get_periodic_list_size(uint8_t *size);
|
||||
|
||||
/**
|
||||
* @brief This function is used to set aux connection parameters
|
||||
*
|
||||
@ -2611,7 +2622,6 @@ esp_err_t esp_ble_gap_prefer_ext_connect_params_set(esp_bd_addr_t addr,
|
||||
const esp_ble_gap_conn_params_t *phy_1m_conn_params,
|
||||
const esp_ble_gap_conn_params_t *phy_2m_conn_params,
|
||||
const esp_ble_gap_conn_params_t *phy_coded_conn_params);
|
||||
|
||||
#endif //#if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
#if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
|
||||
|
@ -1594,6 +1594,13 @@ static void btc_ble_dtm_enhance_rx_start(uint8_t rx_channel, uint8_t phy, uint8_
|
||||
}
|
||||
#endif // #if (BLE_50_DTM_TEST_EN == TRUE)
|
||||
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
void btc_get_periodic_list_size(uint8_t *size)
|
||||
{
|
||||
BTM_BleGetPeriodicAdvListSize(size);
|
||||
return;
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#if ((BLE_42_DTM_TEST_EN == TRUE) || (BLE_50_DTM_TEST_EN == TRUE))
|
||||
static void btc_ble_dtm_stop(tBTA_DTM_CMD_CMPL_CBACK *p_dtm_cmpl_cback)
|
||||
{
|
||||
|
@ -463,6 +463,9 @@ typedef union {
|
||||
void btc_gap_ble_call_handler(btc_msg_t *msg);
|
||||
void btc_gap_ble_cb_handler(btc_msg_t *msg);
|
||||
void btc_get_whitelist_size(uint16_t *length);
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
void btc_get_periodic_list_size(uint8_t *length);
|
||||
#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
void btc_gap_ble_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
|
||||
void btc_gap_ble_arg_deep_free(btc_msg_t *msg);
|
||||
void btc_gap_ble_cb_deep_free(btc_msg_t *msg);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -909,6 +909,9 @@ static void btc_spp_write(btc_spp_args_t *arg)
|
||||
} else {
|
||||
if (fixed_queue_enqueue(slot->tx.queue, arg->write.p_data, 0)) {
|
||||
BTA_JvRfcommWrite(arg->write.handle, slot->id, arg->write.len, arg->write.p_data);
|
||||
// The TX queue of SPP will handle this memory properly.
|
||||
// Set it to NULL here to prevent deep free handler from releasing it.
|
||||
arg->write.p_data = NULL;
|
||||
} else {
|
||||
ret = ESP_SPP_NO_RESOURCE;
|
||||
}
|
||||
@ -966,6 +969,13 @@ void btc_spp_arg_deep_free(btc_msg_t *msg)
|
||||
case BTC_SPP_ACT_START_DISCOVERY:
|
||||
if (arg->start_discovery.p_uuid_list) {
|
||||
osi_free(arg->start_discovery.p_uuid_list);
|
||||
arg->start_discovery.p_uuid_list = NULL;
|
||||
}
|
||||
break;
|
||||
case BTC_SPP_ACT_WRITE:
|
||||
if (arg->write.p_data) {
|
||||
osi_free(arg->write.p_data);
|
||||
arg->write.p_data = NULL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -86,6 +86,9 @@ typedef struct {
|
||||
#if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
uint16_t ble_ext_adv_data_max_len;
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
uint16_t get_ble_periodic_advertiser_list_size;
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif //#if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
} controller_local_param_t;
|
||||
|
||||
@ -283,6 +286,12 @@ static void start_up(void)
|
||||
&controller_param.ble_ext_adv_data_max_len);
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
response = AWAIT_COMMAND(controller_param.packet_factory->read_periodic_adv_list_size());
|
||||
controller_param.packet_parser->parse_ble_read_periodic_adv_list_size_response(
|
||||
response,
|
||||
&controller_param.get_ble_periodic_advertiser_list_size);
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // (BLE_50_FEATURE_SUPPORT == TRUE && BLE_42_FEATURE_SUPPORT == FALSE)
|
||||
|
||||
if (HCI_LE_DATA_LEN_EXT_SUPPORTED(controller_param.features_ble.as_array)) {
|
||||
@ -525,6 +534,14 @@ static uint16_t ble_get_ext_adv_data_max_len(void)
|
||||
return controller_param.ble_ext_adv_data_max_len;
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
static uint8_t get_ble_periodic_adv_list_size(void)
|
||||
{
|
||||
assert(controller_param.readable);
|
||||
assert(controller_param.ble_supported);
|
||||
return controller_param.get_ble_periodic_advertiser_list_size;
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
#if (BTM_SCO_HCI_INCLUDED == TRUE)
|
||||
static uint8_t get_sco_data_size(void)
|
||||
@ -587,6 +604,9 @@ static const controller_t interface = {
|
||||
#if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
ble_get_ext_adv_data_max_len,
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
get_ble_periodic_adv_list_size,
|
||||
#endif // (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
#if (BTM_SCO_HCI_INCLUDED == TRUE)
|
||||
get_sco_data_size,
|
||||
|
@ -84,6 +84,9 @@ typedef struct controller_t {
|
||||
#if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
uint16_t (*ble_get_ext_adv_data_max_len)(void);
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
uint8_t (*get_ble_periodic_adv_list_size)(void);
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // BLE_50_FEATURE_SUPPORT
|
||||
|
||||
#if (BTM_SCO_HCI_INCLUDED == TRUE)
|
||||
|
@ -226,6 +226,12 @@ static BT_HDR *make_read_max_adv_data_len(void)
|
||||
return make_command_no_params(HCI_BLE_RD_MAX_ADV_DATA_LEN);
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
static BT_HDR *read_periodic_adv_list_size(void)
|
||||
{
|
||||
return make_command_no_params(HCI_BLE_RD_PERIOD_ADV_LIST_SIZE);
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
// Internal functions
|
||||
|
||||
@ -277,6 +283,9 @@ static const hci_packet_factory_t interface = {
|
||||
#if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
make_read_max_adv_data_len,
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
read_periodic_adv_list_size,
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
make_ble_read_suggested_default_data_length,
|
||||
make_ble_write_suggested_default_data_length,
|
||||
|
@ -222,7 +222,21 @@ static void parse_ble_read_adv_max_len_response(
|
||||
}
|
||||
osi_free(response);
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
static void parse_ble_read_periodic_adv_list_size_response(
|
||||
BT_HDR *response,
|
||||
uint16_t *periodic_adv_list_size_ptr)
|
||||
{
|
||||
|
||||
uint8_t *stream = read_command_complete_header(response, HCI_BLE_RD_PERIOD_ADV_LIST_SIZE, 1 /* bytes after */);
|
||||
if (stream) {
|
||||
// Size: 1 Octets ; Value: 0x01 to 0xFF ; Total number of Periodic Advertiser list entries that can be stored in the Controller
|
||||
STREAM_TO_UINT8(*periodic_adv_list_size_ptr, stream);
|
||||
}
|
||||
osi_free(response);
|
||||
}
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
|
||||
@ -287,6 +301,9 @@ static const hci_packet_parser_t interface = {
|
||||
#if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
parse_ble_read_adv_max_len_response,
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
parse_ble_read_periodic_adv_list_size_response,
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
parse_ble_read_suggested_default_data_length_response
|
||||
};
|
||||
|
@ -48,6 +48,9 @@ typedef struct {
|
||||
#if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
BT_HDR *(*make_read_max_adv_data_len)(void);
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
BT_HDR *(*read_periodic_adv_list_size)(void);
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
BT_HDR *(*make_ble_read_suggested_default_data_length)(void);
|
||||
BT_HDR *(*make_ble_write_suggested_default_data_length)(uint16_t SuggestedMaxTxOctets, uint16_t SuggestedMaxTxTime);
|
||||
|
@ -101,6 +101,12 @@ typedef struct {
|
||||
uint16_t *ble_ext_adv_data_max_len_ptr
|
||||
);
|
||||
#endif // #if (BLE_50_EXTEND_ADV_EN == TRUE)
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
void (*parse_ble_read_periodic_adv_list_size_response) (
|
||||
BT_HDR *response,
|
||||
uint16_t *periodic_advertiser_list_size
|
||||
);
|
||||
#endif // #if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
void (*parse_ble_read_suggested_default_data_length_response)(
|
||||
BT_HDR *response,
|
||||
|
@ -2222,6 +2222,18 @@ void BTM_BleGetWhiteListSize(uint16_t *length)
|
||||
*length = p_cb->white_list_avail_size;
|
||||
return;
|
||||
}
|
||||
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
void BTM_BleGetPeriodicAdvListSize(uint8_t *size)
|
||||
{
|
||||
tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb;
|
||||
if (p_cb->periodic_adv_list_size == 0) {
|
||||
BTM_TRACE_WARNING("%s Periodic Adv list is full.", __func__);
|
||||
}
|
||||
*size = p_cb->periodic_adv_list_size;
|
||||
}
|
||||
#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
|
||||
#endif ///BLE_INCLUDED == TRUE
|
||||
|
||||
#if (BLE_HOST_READ_TX_POWER_EN == TRUE)
|
||||
|
@ -423,6 +423,23 @@ void btm_ble_white_list_init(UINT8 white_list_size)
|
||||
btm_cb.ble_ctr_cb.white_list_avail_size = white_list_size;
|
||||
}
|
||||
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_ble_periodic_adv_list_init
|
||||
**
|
||||
** Description Initialize the periodic advertiser list size.
|
||||
**
|
||||
** Parameters periodic_adv_size: The size of the periodic advertiser list to be initialized.
|
||||
**
|
||||
*******************************************************************************/
|
||||
void btm_ble_periodic_adv_list_init(UINT8 periodic_adv_size)
|
||||
{
|
||||
BTM_TRACE_DEBUG("%s white_list_size = %d", __func__, periodic_adv_size);
|
||||
btm_cb.ble_ctr_cb.periodic_adv_list_size = periodic_adv_size;
|
||||
}
|
||||
#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_ble_add_2_white_list_complete
|
||||
|
@ -199,6 +199,9 @@ static void reset_complete(void)
|
||||
|
||||
if (controller->supports_ble()) {
|
||||
btm_ble_white_list_init(controller->get_ble_white_list_size());
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
btm_ble_periodic_adv_list_init(controller->get_ble_periodic_adv_list_size());
|
||||
#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
l2c_link_processs_ble_num_bufs(controller->get_acl_buffer_count_ble());
|
||||
}
|
||||
#endif
|
||||
|
@ -353,6 +353,10 @@ typedef struct {
|
||||
tBTM_BLE_SEL_CBACK *p_select_cback;
|
||||
/* white list information */
|
||||
UINT8 white_list_avail_size;
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
/* periodic list information */
|
||||
UINT8 periodic_adv_list_size;
|
||||
#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb;
|
||||
tBTM_BLE_WL_STATE wl_state;
|
||||
|
||||
@ -552,6 +556,9 @@ void btm_ble_channel_select_algorithm_evt(tBTM_BLE_CHANNEL_SEL_ALG *params);
|
||||
void btm_ble_periodic_adv_report_evt(tBTM_PERIOD_ADV_REPORT *params);
|
||||
void btm_ble_periodic_adv_sync_lost_evt(tBTM_BLE_PERIOD_ADV_SYNC_LOST *params);
|
||||
void btm_ble_periodic_adv_sync_establish_evt(tBTM_BLE_PERIOD_ADV_SYNC_ESTAB *params);
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
void btm_ble_periodic_adv_list_init(UINT8 periodic_adv_size);
|
||||
#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
#if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
|
||||
|
@ -3049,7 +3049,9 @@ tBTM_STATUS BTM_BleReadAdvTxPower(tBTM_CMPL_CB *p_cb);
|
||||
|
||||
void BTM_BleGetWhiteListSize(uint16_t *length);
|
||||
|
||||
|
||||
#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
void BTM_BleGetPeriodicAdvListSize(uint8_t *size);
|
||||
#endif //#if (BLE_50_EXTEND_SYNC_EN == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_ReadLinkQuality
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit a9a4c701981b86c91fdc63fce4cb7bc05c69caac
|
||||
Subproject commit fc098022e7965ddbabb33cfdf38f1f9235b71538
|
@ -495,7 +495,7 @@ typedef struct {
|
||||
uint8_t ble_cca_mode; /*!< BLE CCA mode. Configurable in menuconfig
|
||||
- 0 - Disable (default)
|
||||
- 1 - Hardware-triggered CCA
|
||||
- 2 - Software-based CCA */
|
||||
- 2 - Software-based CCA (experimental) */
|
||||
uint8_t ble_data_lenth_zero_aux; /*!< Enable / disable auxiliary packets when the extended ADV data length is zero. Configurable in menuconfig.
|
||||
- 0 - Disable (default)
|
||||
- 1 - Enable */
|
||||
|
@ -1,11 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_bt(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,14 +1,20 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.parametrize('config', [
|
||||
pytest.param('default', marks=[pytest.mark.esp32, pytest.mark.esp32c2, pytest.mark.generic]),
|
||||
pytest.param('iram', marks=[pytest.mark.esp32c2, pytest.mark.generic]),
|
||||
pytest.param('psram', marks=[pytest.mark.esp32, pytest.mark.psram]),
|
||||
], indirect=True)
|
||||
@idf_parametrize(
|
||||
'config,target,markers',
|
||||
[
|
||||
('default', 'esp32', (pytest.mark.generic,)),
|
||||
('default', 'esp32c2', (pytest.mark.generic,)),
|
||||
('iram', 'esp32c2', (pytest.mark.generic,)),
|
||||
('psram', 'esp32', (pytest.mark.psram,)),
|
||||
],
|
||||
indirect=['config', 'target'],
|
||||
)
|
||||
def test_bt_memory_release(dut: Dut) -> None:
|
||||
dut.expect_exact('BLE Host Task Started', timeout=6)
|
||||
dut.expect_exact('BLE Host Task Stopped', timeout=8)
|
||||
|
@ -1,7 +1,8 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
def do_test_quit(dut: Dut) -> None:
|
||||
@ -44,69 +45,61 @@ def do_test_help_quit(dut: Dut) -> None:
|
||||
dut.expect(r'quit\s+Quit REPL environment\s+esp>')
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console(dut: Dut, test_on: str) -> None:
|
||||
dut.run_all_single_board_cases(group='!ignore', timeout=120)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_repl(dut: Dut, test_on: str) -> None:
|
||||
do_test_quit(dut)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_sorted_registration(dut: Dut, test_on: str) -> None:
|
||||
do_test_help_generic(dut, 'sorted')
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_reverse_registration(dut: Dut, test_on: str) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
@ -131,63 +124,45 @@ def test_console_help_reverse_registration(dut: Dut, test_on: str) -> None:
|
||||
dut.expect_exact('esp>')
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('sorted'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
]
|
||||
)
|
||||
@idf_parametrize('config', ['sorted'], indirect=['config'])
|
||||
@idf_parametrize('target', ['linux'], indirect=['target'])
|
||||
@idf_parametrize('test_on,markers', [('host', (pytest.mark.host_test,))])
|
||||
def test_console_sorted_help_sorted_registration(dut: Dut, test_on: str) -> None:
|
||||
do_test_help_generic(dut, 'sorted')
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('sorted', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
]
|
||||
)
|
||||
@idf_parametrize('config', ['sorted'], indirect=['config'])
|
||||
@idf_parametrize('target', ['linux'], indirect=['target'])
|
||||
@idf_parametrize('test_on,markers', [('host', (pytest.mark.host_test,))])
|
||||
def test_console_sorted_help_reverse_registration(dut: Dut, test_on: str) -> None:
|
||||
do_test_help_generic(dut, 'reverse')
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_quit(dut: Dut, test_on: str) -> None:
|
||||
do_test_help_quit(dut)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_verbose_level_0(dut: Dut, test_on: str) -> None:
|
||||
help_verbose_info = 'Print the summary of all registered commands if no arguments are given,'
|
||||
@ -200,18 +175,16 @@ def test_console_help_verbose_level_0(dut: Dut, test_on: str) -> None:
|
||||
dut.expect_exact('help', not_matching=help_verbose_info)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_verbose_level_1(dut: Dut, test_on: str) -> None:
|
||||
help_verbose_info = 'Print the summary of all registered commands if no arguments are given,'
|
||||
@ -223,18 +196,16 @@ def test_console_help_verbose_level_1(dut: Dut, test_on: str) -> None:
|
||||
dut.expect_exact(help_verbose_info)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.generic]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_verbose_subcommand(dut: Dut, test_on: str) -> None:
|
||||
help_verbose_info = 'Print the summary of all registered commands if no arguments are given,'
|
||||
@ -244,24 +215,23 @@ def test_console_help_verbose_subcommand(dut: Dut, test_on: str) -> None:
|
||||
# verify help --verbose=0 subcommand
|
||||
dut.write('help --verbose=0')
|
||||
dut.write('help --verbose=0')
|
||||
dut.expect_exact('help --verbose=0',not_matching=help_verbose_info)
|
||||
dut.expect_exact('help --verbose=0', not_matching=help_verbose_info)
|
||||
|
||||
# verify help --verbose=1 subcommand
|
||||
dut.write('help --verbose=1')
|
||||
dut.expect_exact(help_verbose_info)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_deregister(dut: Dut, test_on: str) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
@ -275,17 +245,16 @@ def test_console_help_deregister(dut: Dut, test_on: str) -> None:
|
||||
dut.expect_exact(cmd_z_description, not_matching=cmd_a_description)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config', [
|
||||
pytest.param('defaults'),
|
||||
]
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'test_on', [
|
||||
pytest.param('host', marks=[pytest.mark.linux, pytest.mark.host_test]),
|
||||
pytest.param('target', marks=[pytest.mark.esp32, pytest.mark.esp32c3, pytest.mark.generic]),
|
||||
pytest.param('qemu', marks=[pytest.mark.esp32, pytest.mark.host_test, pytest.mark.qemu]),
|
||||
]
|
||||
@idf_parametrize('config', ['defaults'], indirect=['config'])
|
||||
@idf_parametrize(
|
||||
'target,test_on,markers',
|
||||
[
|
||||
('linux', 'host', (pytest.mark.host_test,)),
|
||||
('esp32', 'target', (pytest.mark.generic,)),
|
||||
('esp32c3', 'target', (pytest.mark.generic,)),
|
||||
('esp32', 'qemu', (pytest.mark.host_test, pytest.mark.qemu)),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_console_help_re_register(dut: Dut, test_on: str) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
|
@ -1,12 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_cxx_exception(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,13 +1,12 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_cxx_noexcept_out_of_range(dut: Dut) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
dut.write('1')
|
||||
@ -15,9 +14,8 @@ def test_cxx_noexcept_out_of_range(dut: Dut) -> None:
|
||||
dut.expect_exact('Rebooting...')
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_cxx_noexcept_bad_alloc(dut: Dut) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
dut.write('2')
|
||||
|
@ -1,36 +1,31 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
configurations = [
|
||||
'noexcept',
|
||||
'exceptions_rtti'
|
||||
]
|
||||
configurations = ['noexcept', 'exceptions_rtti']
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', configurations, indirect=True)
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_cxx_static_init_non_pod(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(name=['can use static initializers for non-POD types'])
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', configurations, indirect=True)
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_cxx_misc(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(group='misc')
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', configurations, indirect=True)
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_cxx_stack_smash(dut: Dut) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
dut.write('\"stack smashing protection CXX\"')
|
||||
dut.write('"stack smashing protection CXX"')
|
||||
dut.expect_exact('Stack smashing protect failure!')
|
||||
dut.expect_exact('Rebooting...')
|
||||
|
@ -1,12 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_cxx_rtti(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,12 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -15,5 +13,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32', 'esp32s2'], indirect=['target'])
|
||||
def test_legacy_dac(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,11 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -14,6 +13,7 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_i2s_adc_dac(dut: Dut) -> None:
|
||||
# ADC_DMA_read test takes more than 30 sec
|
||||
dut.run_all_single_board_cases(timeout=60)
|
||||
|
@ -1,18 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -21,5 +13,10 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32s2', 'esp32c3', 'esp32c5', 'esp32s3', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c61'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_legacy_i2s(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,17 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.adc
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -20,11 +13,15 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_legacy_adc(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.adc
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
@ -34,5 +31,6 @@ def test_legacy_adc(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32c2'], indirect=['target'])
|
||||
def test_legacy_adc_esp32c2_xtal_26mhz(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,15 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -18,5 +13,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
|
||||
def test_legacy_mcpwm(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,16 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -19,5 +13,8 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']
|
||||
)
|
||||
def test_legacy_pcnt(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=240)
|
||||
|
@ -1,20 +1,22 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', [
|
||||
'release',
|
||||
], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'release',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_legacy_rmt(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120)
|
||||
|
@ -1,21 +1,22 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', [
|
||||
'release',
|
||||
], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'release',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32s2', 'esp32c3', 'esp32s3', 'esp32c2', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_legacy_temp_sensor_driver(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120)
|
||||
|
@ -1,23 +1,22 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'release',
|
||||
],
|
||||
indirect=True)
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_legacy_sigma_delta(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(group='sigma_delta')
|
||||
|
@ -1,13 +1,18 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', [
|
||||
'release',
|
||||
], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'release',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_legacy_timer_driver(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120)
|
||||
|
@ -1,10 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -13,5 +13,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_touch_sensor_v1(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=60)
|
||||
|
@ -1,11 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -14,5 +13,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s2', 'esp32s3'], indirect=['target'])
|
||||
def test_touch_sensor_v2(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import logging
|
||||
import subprocess
|
||||
@ -8,15 +8,9 @@ import pytest
|
||||
from can import Bus
|
||||
from can import Message
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -25,6 +19,9 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']
|
||||
)
|
||||
def test_twai_self(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(group='twai-loop-back')
|
||||
|
||||
@ -36,18 +33,11 @@ def fixture_create_socket_can() -> Bus:
|
||||
stop_command = 'sudo ip link set can0 down'
|
||||
subprocess.run(start_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
||||
bus = Bus(interface='socketcan', channel='can0', bitrate=250000)
|
||||
yield bus # test invoked here
|
||||
yield bus # test invoked here
|
||||
bus.shutdown()
|
||||
subprocess.run(stop_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.twai_std
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -56,6 +46,9 @@ def fixture_create_socket_can() -> Bus:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']
|
||||
)
|
||||
def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None:
|
||||
dut.serial.hard_reset()
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
@ -75,13 +68,6 @@ def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None:
|
||||
dut.expect_unity_test_output()
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.twai_std
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -90,6 +76,9 @@ def test_twai_listen_only(dut: Dut, socket_can: Bus) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']
|
||||
)
|
||||
def test_twai_remote_request(dut: Dut, socket_can: Bus) -> None:
|
||||
dut.serial.hard_reset()
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
|
@ -1,24 +1,27 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32s2', 'esp32s3'], reason='eFuse for S2 and S3 is similar to the C3 chip, so testing on C3 is enough')
|
||||
@pytest.mark.temp_skip_ci(
|
||||
targets=['esp32s2', 'esp32s3'], reason='eFuse for S2 and S3 is similar to the C3 chip, so testing on C3 is enough'
|
||||
)
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_efuse(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.qemu
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.host_test
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_efuse_qemu(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.linux
|
||||
@pytest.mark.host_test
|
||||
@idf_parametrize('target', ['linux'], indirect=['target'])
|
||||
def test_efuse_linux(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=60)
|
||||
|
@ -1,10 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_esp_tls(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,29 +1,22 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.adc
|
||||
@pytest.mark.parametrize('config', [
|
||||
'iram_safe',
|
||||
'release',
|
||||
'pm_enable'
|
||||
], indirect=True)
|
||||
@pytest.mark.parametrize('config', ['iram_safe', 'release', 'pm_enable'], indirect=True)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_adc(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120, reset=True)
|
||||
|
||||
|
||||
# No PM test, as C2 doesn't support ADC continuous mode
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.adc
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
@ -34,19 +27,19 @@ def test_adc(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32c2'], indirect=['target'])
|
||||
def test_adc_esp32c2_xtal_26mhz(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120, reset=True)
|
||||
|
||||
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.adc
|
||||
@pytest.mark.parametrize('config', [
|
||||
'gdma_iram_safe',
|
||||
], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'gdma_iram_safe',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4'], indirect=['target'])
|
||||
def test_adc_gdma_iram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120, reset=True)
|
||||
|
@ -1,18 +1,17 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32c3'], indirect=['target'])
|
||||
def test_esp_app_format(dut: Dut) -> None:
|
||||
dut.expect_unity_test_output()
|
||||
|
||||
|
||||
@pytest.mark.linux
|
||||
@pytest.mark.host_test
|
||||
@idf_parametrize('target', ['linux'], indirect=['target'])
|
||||
def test_esp_app_format_linux(dut: Dut) -> None:
|
||||
dut.expect_unity_test_output()
|
||||
|
@ -1,10 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_esp_bootloader_format(dut: Dut) -> None:
|
||||
dut.expect_unity_test_output()
|
||||
|
@ -1,30 +1,24 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'default'
|
||||
],
|
||||
['default'],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_esp_common(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
# psram noinit attr tests with psram enabled
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -33,35 +27,24 @@ def test_esp_common(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32p4', 'esp32c5'], indirect=['target'])
|
||||
def test_esp_attr_psram_noinit(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
# psram noinit memory tests with psram enabled
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'psram_noinit'
|
||||
],
|
||||
['psram_noinit'],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_esp_attr_psram_noinit_multiple_stages(case_tester: Any) -> None:
|
||||
case_tester.run_all_multi_stage_cases()
|
||||
|
||||
|
||||
# psram attr tests with psram enabled
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -70,47 +53,42 @@ def test_esp_attr_psram_noinit_multiple_stages(case_tester: Any) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32', 'esp32s2', 'esp32s3', 'esp32p4', 'esp32c5'], indirect=['target'])
|
||||
def test_esp_attr_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
# psram attr tests with xip_psram
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'xip_psram_esp32s2'
|
||||
],
|
||||
['xip_psram_esp32s2'],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s2'], indirect=['target'])
|
||||
def test_esp_attr_xip_psram_esp32s2(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
# psram attr tests with xip_psram
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'xip_psram_esp32s3'
|
||||
],
|
||||
['xip_psram_esp32s3'],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_esp_attr_xip_psram_esp32s3(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
# psram attr tests with xip_psram
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'xip_psram_esp32p4'
|
||||
],
|
||||
['xip_psram_esp32p4'],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_esp_attr_xip_psram_esp32p4(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,13 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -17,5 +14,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32h2', 'esp32p4', 'esp32c5', 'esp32c61'], indirect=['target'])
|
||||
def test_ana_cmpr(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -2,10 +2,10 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32p4', 'esp32c5'], indirect=['target'])
|
||||
def test_bitscrambler(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,10 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_csi(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,10 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_dvp(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,10 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_isp_dvp(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,12 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -16,5 +14,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32', 'esp32s2'], indirect=['target'])
|
||||
def test_dac(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,7 +1,8 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
CONFIGS = [
|
||||
'iram_safe',
|
||||
@ -9,21 +10,17 @@ CONFIGS = [
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', CONFIGS, indirect=True)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_gpio(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(group='gpio')
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', CONFIGS, indirect=True)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32c5'], indirect=['target']
|
||||
)
|
||||
def test_rtc_io(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(group='rtcio')
|
||||
|
@ -1,7 +1,8 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
CONFIGS = [
|
||||
'iram_safe',
|
||||
@ -9,31 +10,23 @@ CONFIGS = [
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', CONFIGS, indirect=True)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_gpio_filter(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(group='gpio_filter')
|
||||
|
||||
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', CONFIGS, indirect=True)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32c2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_dedic_gpio(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(group='dedic_gpio')
|
||||
|
@ -1,25 +1,24 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'iram_safe',
|
||||
'cache_safe',
|
||||
'release',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_gptimer(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.esp32c2
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.xtal_26mhz
|
||||
@pytest.mark.parametrize(
|
||||
@ -29,5 +28,6 @@ def test_gptimer(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32c2'], indirect=['target'])
|
||||
def test_gptimer_esp32c2_xtal_26mhz(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -331,7 +331,7 @@ static bool s_i2c_read_command(i2c_master_bus_handle_t i2c_master, i2c_operation
|
||||
i2c_ll_master_write_cmd_reg(hal->dev, hw_cmd, i2c_master->cmd_idx);
|
||||
i2c_ll_master_write_cmd_reg(hal->dev, hw_end_cmd, i2c_master->cmd_idx + 1);
|
||||
portEXIT_CRITICAL_SAFE(&handle->spinlock);
|
||||
i2c_master->status = I2C_STATUS_READ;
|
||||
atomic_store(&i2c_master->status, I2C_STATUS_READ);
|
||||
portENTER_CRITICAL_SAFE(&handle->spinlock);
|
||||
if (i2c_master->async_trans == false) {
|
||||
i2c_hal_master_trans_start(hal);
|
||||
@ -472,15 +472,15 @@ static void s_i2c_send_commands(i2c_master_bus_handle_t i2c_master, TickType_t t
|
||||
while (i2c_master->i2c_trans.cmd_count) {
|
||||
if (xSemaphoreTake(i2c_master->cmd_semphr, ticks_to_wait) != pdTRUE) {
|
||||
// Software timeout, clear the command link and finish this transaction.
|
||||
atomic_store(&i2c_master->status, I2C_STATUS_TIMEOUT);
|
||||
i2c_master->cmd_idx = 0;
|
||||
i2c_master->trans_idx = 0;
|
||||
atomic_store(&i2c_master->status, I2C_STATUS_TIMEOUT);
|
||||
ESP_LOGE(TAG, "I2C software timeout");
|
||||
xSemaphoreGive(i2c_master->cmd_semphr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (i2c_master->status == I2C_STATUS_TIMEOUT) {
|
||||
if (atomic_load(&i2c_master->status) == I2C_STATUS_TIMEOUT) {
|
||||
s_i2c_hw_fsm_reset(i2c_master);
|
||||
i2c_master->cmd_idx = 0;
|
||||
i2c_master->trans_idx = 0;
|
||||
@ -489,7 +489,7 @@ static void s_i2c_send_commands(i2c_master_bus_handle_t i2c_master, TickType_t t
|
||||
return;
|
||||
}
|
||||
|
||||
if (i2c_master->status == I2C_STATUS_ACK_ERROR) {
|
||||
if (atomic_load(&i2c_master->status) == I2C_STATUS_ACK_ERROR) {
|
||||
ESP_LOGE(TAG, "I2C hardware NACK detected");
|
||||
const i2c_ll_hw_cmd_t hw_stop_cmd = {
|
||||
.op_code = I2C_LL_CMD_STOP,
|
||||
@ -596,7 +596,7 @@ static esp_err_t s_i2c_transaction_start(i2c_master_dev_handle_t i2c_dev, int xf
|
||||
TickType_t ticks_to_wait = (xfer_timeout_ms == -1) ? portMAX_DELAY : pdMS_TO_TICKS(xfer_timeout_ms);
|
||||
// Sometimes when the FSM get stuck, the ACK_ERR interrupt will occur endlessly until we reset the FSM and clear bus.
|
||||
esp_err_t ret = ESP_OK;
|
||||
if (i2c_master->status == I2C_STATUS_TIMEOUT || i2c_ll_is_bus_busy(hal->dev)) {
|
||||
if (atomic_load(&i2c_master->status) == I2C_STATUS_TIMEOUT || i2c_ll_is_bus_busy(hal->dev)) {
|
||||
ESP_RETURN_ON_ERROR(s_i2c_hw_fsm_reset(i2c_master), TAG, "reset hardware failed");
|
||||
}
|
||||
|
||||
@ -630,7 +630,7 @@ static esp_err_t s_i2c_transaction_start(i2c_master_dev_handle_t i2c_dev, int xf
|
||||
} else {
|
||||
s_i2c_send_commands(i2c_master, ticks_to_wait);
|
||||
// Wait event bits
|
||||
if (i2c_master->status != I2C_STATUS_DONE) {
|
||||
if (atomic_load(&i2c_master->status) != I2C_STATUS_DONE) {
|
||||
ret = ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
// Interrupt can be disabled when on transaction finishes.
|
||||
@ -650,7 +650,7 @@ I2C_MASTER_ISR_ATTR static void i2c_isr_receive_handler(i2c_master_bus_t *i2c_ma
|
||||
{
|
||||
i2c_hal_context_t *hal = &i2c_master->base->hal;
|
||||
|
||||
if (i2c_master->status == I2C_STATUS_READ) {
|
||||
if (atomic_load(&i2c_master->status) == I2C_STATUS_READ) {
|
||||
i2c_operation_t *i2c_operation = &i2c_master->i2c_trans.ops[i2c_master->trans_idx];
|
||||
portENTER_CRITICAL_ISR(&i2c_master->base->spinlock);
|
||||
i2c_ll_read_rxfifo(hal->dev, i2c_operation->data + i2c_operation->bytes_used, i2c_master->rx_cnt);
|
||||
|
@ -2,9 +2,9 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -14,30 +14,40 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_i2c(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize(
|
||||
'count, config',
|
||||
[
|
||||
(2, 'defaults',),
|
||||
(2, 'release',),
|
||||
(2, 'iram_safe',),
|
||||
(2, 'slave_v2',),
|
||||
(
|
||||
2,
|
||||
'defaults',
|
||||
),
|
||||
(
|
||||
2,
|
||||
'release',
|
||||
),
|
||||
(
|
||||
2,
|
||||
'iram_safe',
|
||||
),
|
||||
(
|
||||
2,
|
||||
'slave_v2',
|
||||
),
|
||||
],
|
||||
indirect=True
|
||||
indirect=True,
|
||||
)
|
||||
def test_i2c_multi_device(case_tester) -> None: # type: ignore
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32s2', 'esp32s3'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_i2c_multi_device(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
|
@ -1,18 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c61
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -22,5 +14,10 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32s2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32s3', 'esp32h2', 'esp32p4', 'esp32c61'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_i2s(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,17 +1,17 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize('count', [
|
||||
2,
|
||||
], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
|
||||
def test_i2s_multi_dev(case_tester) -> None: # type: ignore
|
||||
case_tester.run_all_multi_dev_cases(reset=True, timeout=30)
|
||||
|
@ -1,10 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.lp_i2s
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_lp_i2s(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=200)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -631,9 +631,7 @@ static esp_err_t jpeg_parse_header_info_to_hw(jpeg_decoder_handle_t decoder_engi
|
||||
dht_func[1][0](hal, header_info->huffbits[1][0], header_info->huffcode[1][0], header_info->tmp_huff);
|
||||
dht_func[1][1](hal, header_info->huffbits[1][1], header_info->huffcode[1][1], header_info->tmp_huff);
|
||||
|
||||
if (header_info->dri_marker) {
|
||||
jpeg_ll_set_restart_interval(hal->dev, header_info->ri);
|
||||
}
|
||||
jpeg_ll_set_restart_interval(hal->dev, header_info->ri);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -173,7 +173,6 @@ esp_err_t jpeg_parse_dri_marker(jpeg_dec_header_info_t *header_info)
|
||||
return ESP_ERR_INVALID_SIZE;
|
||||
}
|
||||
header_info->ri = jpeg_get_bytes(header_info, 2);
|
||||
header_info->dri_marker = true;
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -86,7 +86,6 @@ typedef struct {
|
||||
uint8_t huffbits[2][2][JPEG_HUFFMAN_BITS_LEN_TABLE_LEN]; // Huffman bit distribution tables [id][dcac]
|
||||
uint8_t huffcode[2][2][JPEG_HUFFMAN_AC_VALUE_TABLE_LEN]; // Huffman decoded data tables [id][dcac]
|
||||
uint32_t tmp_huff[JPEG_HUFFMAN_AC_VALUE_TABLE_LEN]; // temp buffer to store huffman code
|
||||
bool dri_marker; // If we have dri marker in table
|
||||
uint16_t ri; // Restart interval
|
||||
} jpeg_dec_header_info_t;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -13,5 +13,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_jpeg(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,12 +1,11 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32s3'],
|
||||
reason='skip due to duplication with test_ledc_psram')
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='skip due to duplication with test_ledc_psram')
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -16,11 +15,11 @@ from pytest_embedded_idf import IdfDut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_ledc(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(reset=True)
|
||||
|
||||
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.octal_psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -30,21 +29,29 @@ def test_ledc(dut: IdfDut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_ledc_psram(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(reset=True)
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32c61'],
|
||||
reason='s3 multi device runner has no psram, c61 lack of runner IDF-10949')
|
||||
@pytest.mark.temp_skip_ci(
|
||||
targets=['esp32s3', 'esp32c61'], reason='s3 multi device runner has no psram, c61 lack of runner IDF-10949'
|
||||
)
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize(
|
||||
'count, config',
|
||||
[
|
||||
(2, 'iram_safe',),
|
||||
(2, 'release',),
|
||||
(
|
||||
2,
|
||||
'iram_safe',
|
||||
),
|
||||
(
|
||||
2,
|
||||
'release',
|
||||
),
|
||||
],
|
||||
indirect=True
|
||||
indirect=True,
|
||||
)
|
||||
def test_ledc_multi_device(case_tester) -> None: # type: ignore
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_ledc_multi_device(case_tester) -> None: # type: ignore
|
||||
case_tester.run_all_multi_dev_cases(reset=True)
|
||||
|
@ -1,15 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -19,5 +14,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
|
||||
def test_mcpwm(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,17 +1,62 @@
|
||||
menu "ESP-Driver:Parallel IO Configurations"
|
||||
depends on SOC_PARLIO_SUPPORTED
|
||||
|
||||
config PARLIO_ENABLE_DEBUG_LOG
|
||||
bool "Enable debug log"
|
||||
config PARLIO_TX_ISR_HANDLER_IN_IRAM
|
||||
bool "Place Parallel IO TX ISR handler in IRAM to reduce latency"
|
||||
default y
|
||||
select PARLIO_OBJ_CACHE_SAFE
|
||||
help
|
||||
Place Parallel IO TX ISR handler in IRAM to reduce latency caused by cache miss.
|
||||
|
||||
config PARLIO_RX_ISR_HANDLER_IN_IRAM
|
||||
bool "Place Parallel IO RX ISR handler in IRAM to reduce latency"
|
||||
default y
|
||||
select PARLIO_OBJ_CACHE_SAFE
|
||||
help
|
||||
Place Parallel IO RX ISR handler in IRAM to reduce latency caused by cache miss.
|
||||
|
||||
config PARLIO_TX_ISR_CACHE_SAFE
|
||||
bool "Allow Parallel IO TX ISR to execute when cache is disabled"
|
||||
select PARLIO_TX_ISR_HANDLER_IN_IRAM
|
||||
select GDMA_ISR_IRAM_SAFE
|
||||
default n
|
||||
help
|
||||
whether to enable the debug log message for parallel IO driver.
|
||||
Note that, this option only controls the parallel IO driver log, won't affect other drivers.
|
||||
Enable this option to allow the Parallel IO TX Interrupt Service Routine (ISR)
|
||||
to execute even when the cache is disabled. This can be useful in scenarios where the cache
|
||||
might be turned off, but the Parallel IO TX functionality is still required to operate correctly.
|
||||
|
||||
config PARLIO_RX_ISR_CACHE_SAFE
|
||||
bool "Allow Parallel IO RX ISR to execute when cache is disabled"
|
||||
select PARLIO_RX_ISR_HANDLER_IN_IRAM
|
||||
select GDMA_ISR_IRAM_SAFE
|
||||
default n
|
||||
help
|
||||
Enable this option to allow the Parallel IO RX Interrupt Service Routine (ISR)
|
||||
to execute even when the cache is disabled. This can be useful in scenarios where the cache
|
||||
might be turned off, but the Parallel IO RX functionality is still required to operate correctly.
|
||||
|
||||
config PARLIO_OBJ_CACHE_SAFE
|
||||
bool
|
||||
default n
|
||||
help
|
||||
This will ensure the driver object will not be allocated from a memory region
|
||||
where its cache can be disabled.
|
||||
|
||||
config PARLIO_ENABLE_DEBUG_LOG
|
||||
bool "Force enable debug log"
|
||||
default n
|
||||
help
|
||||
If enabled, Parallel IO driver component will:
|
||||
1. ignore the global logging settings
|
||||
2. compile all log messages into the binary
|
||||
3. set the runtime log level to VERBOSE
|
||||
Please enable this option by caution, as it will increase the binary size.
|
||||
|
||||
config PARLIO_ISR_IRAM_SAFE
|
||||
bool "Parallel IO ISR IRAM-Safe"
|
||||
bool "Parallel IO ISR IRAM-Safe (Deprecated)"
|
||||
default n
|
||||
select GDMA_ISR_IRAM_SAFE
|
||||
select PARLIO_TX_ISR_CACHE_SAFE
|
||||
select PARLIO_RX_ISR_CACHE_SAFE
|
||||
help
|
||||
Ensure the Parallel IO interrupt is IRAM-Safe by allowing the interrupt handler to be
|
||||
executable when the cache is disabled (e.g. SPI Flash write).
|
||||
|
@ -126,7 +126,7 @@ typedef bool (*parlio_tx_done_callback_t)(parlio_tx_unit_handle_t tx_unit, const
|
||||
/**
|
||||
* @brief Group of Parallel IO TX callbacks
|
||||
* @note The callbacks are all running under ISR environment
|
||||
* @note When CONFIG_PARLIO_ISR_IRAM_SAFE is enabled, the callback itself and functions called by it should be placed in IRAM.
|
||||
* @note When CONFIG_PARLIO_TX_ISR_CACHE_SAFE is enabled, the callback itself and functions called by it should be placed in IRAM.
|
||||
* The variables used in the function should be in the SRAM as well.
|
||||
*/
|
||||
typedef struct {
|
||||
@ -137,7 +137,7 @@ typedef struct {
|
||||
* @brief Set event callbacks for Parallel IO TX unit
|
||||
*
|
||||
* @note User can deregister a previously registered callback by calling this function and setting the callback member in the `cbs` structure to NULL.
|
||||
* @note When CONFIG_PARLIO_ISR_IRAM_SAFE is enabled, the callback itself and functions called by it should be placed in IRAM.
|
||||
* @note When CONFIG_PARLIO_TX_ISR_CACHE_SAFE is enabled, the callback itself and functions called by it should be placed in IRAM.
|
||||
* The variables used in the function should be in the SRAM as well. The `user_data` should also reside in SRAM.
|
||||
*
|
||||
* @param[in] tx_unit Parallel IO TX unit that created by `parlio_new_tx_unit`
|
||||
|
@ -1,7 +1,21 @@
|
||||
[mapping:parlio_driver]
|
||||
archive: libesp_driver_parlio.a
|
||||
entries:
|
||||
if PARLIO_TX_ISR_HANDLER_IN_IRAM = y:
|
||||
parlio_tx: parlio_tx_default_isr (noflash)
|
||||
parlio_tx: parlio_tx_do_transaction (noflash)
|
||||
if PARLIO_RX_ISR_HANDLER_IN_IRAM = y:
|
||||
parlio_rx: parlio_rx_default_eof_callback (noflash)
|
||||
parlio_rx: parlio_rx_default_desc_done_callback (noflash)
|
||||
parlio_rx: parlio_rx_mount_transaction_buffer (noflash)
|
||||
parlio_rx: parlio_rx_set_delimiter_config (noflash)
|
||||
|
||||
[mapping:parlio_driver_gdma]
|
||||
archive: libesp_hw_support.a
|
||||
entries:
|
||||
if PARLIO_ISR_IRAM_SAFE:
|
||||
if PARLIO_TX_ISR_HANDLER_IN_IRAM = y:
|
||||
gdma_link: gdma_link_mount_buffers (noflash)
|
||||
gdma_link: gdma_link_get_head_addr (noflash)
|
||||
gdma: gdma_start (noflash)
|
||||
if PARLIO_RX_ISR_HANDLER_IN_IRAM = y:
|
||||
gdma: gdma_start (noflash)
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "hal/parlio_ll.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "esp_private/sleep_retention.h"
|
||||
#include "parlio_private.h"
|
||||
#include "parlio_priv.h"
|
||||
|
||||
static const char *TAG = "parlio";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -26,11 +26,12 @@
|
||||
#include "esp_private/gpio.h"
|
||||
#include "esp_private/sleep_retention.h"
|
||||
|
||||
#if CONFIG_PARLIO_ISR_IRAM_SAFE
|
||||
#if CONFIG_PARLIO_OBJ_CACHE_SAFE
|
||||
#define PARLIO_MEM_ALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)
|
||||
#else
|
||||
#define PARLIO_MEM_ALLOC_CAPS MALLOC_CAP_DEFAULT
|
||||
#endif
|
||||
|
||||
#define PARLIO_DMA_MEM_ALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA)
|
||||
|
||||
#if SOC_PARLIO_TX_RX_SHARE_INTERRUPT
|
||||
@ -39,10 +40,10 @@
|
||||
#define PARLIO_INTR_ALLOC_FLAG_SHARED 0
|
||||
#endif
|
||||
|
||||
#if CONFIG_PARLIO_ISR_IRAM_SAFE
|
||||
#define PARLIO_INTR_ALLOC_FLAG (ESP_INTR_FLAG_LOWMED | PARLIO_INTR_ALLOC_FLAG_SHARED | ESP_INTR_FLAG_IRAM)
|
||||
#if CONFIG_PARLIO_TX_CACHE_SAFE
|
||||
#define PARLIO_TX_INTR_ALLOC_FLAG (ESP_INTR_FLAG_LOWMED | PARLIO_INTR_ALLOC_FLAG_SHARED | ESP_INTR_FLAG_IRAM)
|
||||
#else
|
||||
#define PARLIO_INTR_ALLOC_FLAG (ESP_INTR_FLAG_LOWMED | PARLIO_INTR_ALLOC_FLAG_SHARED)
|
||||
#define PARLIO_TX_INTR_ALLOC_FLAG (ESP_INTR_FLAG_LOWMED | PARLIO_INTR_ALLOC_FLAG_SHARED)
|
||||
#endif
|
||||
|
||||
// Use retention link only when the target supports sleep retention is enabled
|
||||
@ -60,14 +61,6 @@ typedef dma_descriptor_align8_t parlio_dma_desc_t;
|
||||
#endif
|
||||
#endif // defined(SOC_GDMA_TRIG_PERIPH_PARLIO0_BUS)
|
||||
|
||||
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
||||
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
#define PARLIO_MAX_ALIGNED_DMA_BUF_SIZE DMA_DESCRIPTOR_BUFFER_MAX_SIZE_64B_ALIGNED
|
||||
#else
|
||||
#define PARLIO_MAX_ALIGNED_DMA_BUF_SIZE DMA_DESCRIPTOR_BUFFER_MAX_SIZE_4B_ALIGNED
|
||||
#endif
|
||||
|
||||
#if SOC_PERIPH_CLK_CTRL_SHARED
|
||||
#define PARLIO_CLOCK_SRC_ATOMIC() PERIPH_RCC_ATOMIC()
|
||||
#else
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -29,7 +29,7 @@
|
||||
#include "hal/hal_utils.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/parlio_rx.h"
|
||||
#include "parlio_private.h"
|
||||
#include "parlio_priv.h"
|
||||
#include "esp_memory_utils.h"
|
||||
#include "esp_clk_tree.h"
|
||||
#include "esp_attr.h"
|
||||
@ -39,6 +39,14 @@
|
||||
|
||||
static const char *TAG = "parlio-rx";
|
||||
|
||||
#define ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
|
||||
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
#define PARLIO_MAX_ALIGNED_DMA_BUF_SIZE DMA_DESCRIPTOR_BUFFER_MAX_SIZE_64B_ALIGNED
|
||||
#else
|
||||
#define PARLIO_MAX_ALIGNED_DMA_BUF_SIZE DMA_DESCRIPTOR_BUFFER_MAX_SIZE_4B_ALIGNED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Parlio RX transaction
|
||||
*/
|
||||
@ -132,7 +140,7 @@ typedef struct parlio_rx_delimiter_t {
|
||||
|
||||
static portMUX_TYPE s_rx_spinlock = (portMUX_TYPE)portMUX_INITIALIZER_UNLOCKED;
|
||||
|
||||
static IRAM_ATTR size_t s_parlio_mount_transaction_buffer(parlio_rx_unit_handle_t rx_unit, parlio_rx_transaction_t *trans)
|
||||
size_t parlio_rx_mount_transaction_buffer(parlio_rx_unit_handle_t rx_unit, parlio_rx_transaction_t *trans)
|
||||
{
|
||||
parlio_dma_desc_t **p_desc = rx_unit->dma_descs;
|
||||
/* Update the current transaction to the next one, and declare the delimiter is under using of the rx unit */
|
||||
@ -191,7 +199,7 @@ static IRAM_ATTR size_t s_parlio_mount_transaction_buffer(parlio_rx_unit_handle_
|
||||
return offset;
|
||||
}
|
||||
|
||||
static IRAM_ATTR void s_parlio_set_delimiter_config(parlio_rx_unit_handle_t rx_unit, parlio_rx_delimiter_handle_t deli)
|
||||
static void parlio_rx_set_delimiter_config(parlio_rx_unit_handle_t rx_unit, parlio_rx_delimiter_handle_t deli)
|
||||
{
|
||||
parlio_hal_context_t *hal = &(rx_unit->base.group->hal);
|
||||
|
||||
@ -249,7 +257,7 @@ static IRAM_ATTR void s_parlio_set_delimiter_config(parlio_rx_unit_handle_t rx_u
|
||||
parlio_ll_rx_update_config(hal->regs);
|
||||
}
|
||||
|
||||
static esp_err_t s_parlio_rx_unit_set_gpio(parlio_rx_unit_handle_t rx_unit, const parlio_rx_unit_config_t *config)
|
||||
static esp_err_t parlio_rx_unit_set_gpio(parlio_rx_unit_handle_t rx_unit, const parlio_rx_unit_config_t *config)
|
||||
{
|
||||
int group_id = rx_unit->base.group->group_id;
|
||||
int unit_id = rx_unit->base.unit_id;
|
||||
@ -320,7 +328,7 @@ static esp_err_t s_parlio_rx_unit_set_gpio(parlio_rx_unit_handle_t rx_unit, cons
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static IRAM_ATTR bool s_parlio_rx_default_eof_callback(gdma_channel_handle_t dma_chan, gdma_event_data_t *event_data, void *user_data)
|
||||
static bool parlio_rx_default_eof_callback(gdma_channel_handle_t dma_chan, gdma_event_data_t *event_data, void *user_data)
|
||||
{
|
||||
parlio_rx_unit_handle_t rx_unit = (parlio_rx_unit_handle_t)user_data;
|
||||
BaseType_t high_task_woken = pdFALSE;
|
||||
@ -358,10 +366,10 @@ static IRAM_ATTR bool s_parlio_rx_default_eof_callback(gdma_channel_handle_t dma
|
||||
}
|
||||
/* If the delimiter of the next transaction is not same as the current one, need to re-config the hardware */
|
||||
if ((next_trans.delimiter != NULL) && (next_trans.delimiter != rx_unit->curr_trans.delimiter)) {
|
||||
s_parlio_set_delimiter_config(rx_unit, next_trans.delimiter);
|
||||
parlio_rx_set_delimiter_config(rx_unit, next_trans.delimiter);
|
||||
}
|
||||
/* Mount the new transaction buffer and start the new transaction */
|
||||
s_parlio_mount_transaction_buffer(rx_unit, &next_trans);
|
||||
parlio_rx_mount_transaction_buffer(rx_unit, &next_trans);
|
||||
gdma_start(rx_unit->dma_chan, (intptr_t)rx_unit->dma_descs[0]);
|
||||
if (rx_unit->cfg.flags.free_clk) {
|
||||
parlio_ll_rx_start(rx_unit->base.group->hal.regs, true);
|
||||
@ -384,7 +392,7 @@ static IRAM_ATTR bool s_parlio_rx_default_eof_callback(gdma_channel_handle_t dma
|
||||
return need_yield;
|
||||
}
|
||||
|
||||
static IRAM_ATTR bool s_parlio_rx_default_desc_done_callback(gdma_channel_handle_t dma_chan, gdma_event_data_t *event_data, void *user_data)
|
||||
static bool parlio_rx_default_desc_done_callback(gdma_channel_handle_t dma_chan, gdma_event_data_t *event_data, void *user_data)
|
||||
{
|
||||
parlio_rx_unit_handle_t rx_unit = (parlio_rx_unit_handle_t)user_data;
|
||||
bool need_yield = false;
|
||||
@ -430,7 +438,7 @@ static IRAM_ATTR bool s_parlio_rx_default_desc_done_callback(gdma_channel_handle
|
||||
return need_yield;
|
||||
}
|
||||
|
||||
static esp_err_t s_parlio_rx_create_dma_descriptors(parlio_rx_unit_handle_t rx_unit, uint32_t max_recv_size)
|
||||
static esp_err_t parlio_rx_create_dma_descriptors(parlio_rx_unit_handle_t rx_unit, uint32_t max_recv_size)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(rx_unit, ESP_ERR_INVALID_ARG, TAG, "invalid param");
|
||||
esp_err_t ret = ESP_OK;
|
||||
@ -470,7 +478,7 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t s_parlio_rx_unit_init_dma(parlio_rx_unit_handle_t rx_unit)
|
||||
static esp_err_t parlio_rx_unit_init_dma(parlio_rx_unit_handle_t rx_unit)
|
||||
{
|
||||
/* Allocate and connect the GDMA channel */
|
||||
gdma_channel_alloc_config_t dma_chan_config = {
|
||||
@ -488,15 +496,15 @@ static esp_err_t s_parlio_rx_unit_init_dma(parlio_rx_unit_handle_t rx_unit)
|
||||
|
||||
/* Register callbacks */
|
||||
gdma_rx_event_callbacks_t cbs = {
|
||||
.on_recv_eof = s_parlio_rx_default_eof_callback,
|
||||
.on_recv_done = s_parlio_rx_default_desc_done_callback,
|
||||
.on_recv_eof = parlio_rx_default_eof_callback,
|
||||
.on_recv_done = parlio_rx_default_desc_done_callback,
|
||||
};
|
||||
gdma_register_rx_event_callbacks(rx_unit->dma_chan, &cbs, rx_unit);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t s_parlio_select_periph_clock(parlio_rx_unit_handle_t rx_unit, const parlio_rx_unit_config_t *config)
|
||||
static esp_err_t parlio_select_periph_clock(parlio_rx_unit_handle_t rx_unit, const parlio_rx_unit_config_t *config)
|
||||
{
|
||||
parlio_hal_context_t *hal = &rx_unit->base.group->hal;
|
||||
parlio_clock_source_t clk_src = config->clk_src;
|
||||
@ -557,7 +565,7 @@ static esp_err_t s_parlio_select_periph_clock(parlio_rx_unit_handle_t rx_unit, c
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t s_parlio_destroy_rx_unit(parlio_rx_unit_handle_t rx_unit)
|
||||
static esp_err_t parlio_destroy_rx_unit(parlio_rx_unit_handle_t rx_unit)
|
||||
{
|
||||
/* Free the transaction queue */
|
||||
if (rx_unit->trans_que) {
|
||||
@ -643,7 +651,7 @@ esp_err_t parlio_new_rx_unit(const parlio_rx_unit_config_t *config, parlio_rx_un
|
||||
unit->trans_que = xQueueCreateWithCaps(config->trans_queue_depth, sizeof(parlio_rx_transaction_t), PARLIO_MEM_ALLOC_CAPS);
|
||||
ESP_GOTO_ON_FALSE(unit->trans_que, ESP_ERR_NO_MEM, err, TAG, "no memory for transaction queue");
|
||||
|
||||
ESP_GOTO_ON_ERROR(s_parlio_rx_create_dma_descriptors(unit, config->max_recv_size), err, TAG, "create dma descriptor failed");
|
||||
ESP_GOTO_ON_ERROR(parlio_rx_create_dma_descriptors(unit, config->max_recv_size), err, TAG, "create dma descriptor failed");
|
||||
/* Register and attach the rx unit to the group */
|
||||
ESP_GOTO_ON_ERROR(parlio_register_unit_to_group(&unit->base), err, TAG, "failed to register the rx unit to the group");
|
||||
memcpy(&unit->cfg, config, sizeof(parlio_rx_unit_config_t));
|
||||
@ -655,9 +663,9 @@ esp_err_t parlio_new_rx_unit(const parlio_rx_unit_config_t *config, parlio_rx_un
|
||||
parlio_group_t *group = unit->base.group;
|
||||
parlio_hal_context_t *hal = &group->hal;
|
||||
/* Initialize GPIO */
|
||||
ESP_GOTO_ON_ERROR(s_parlio_rx_unit_set_gpio(unit, config), err, TAG, "failed to set GPIO");
|
||||
ESP_GOTO_ON_ERROR(parlio_rx_unit_set_gpio(unit, config), err, TAG, "failed to set GPIO");
|
||||
/* Install DMA service */
|
||||
ESP_GOTO_ON_ERROR(s_parlio_rx_unit_init_dma(unit), err, TAG, "install rx DMA failed");
|
||||
ESP_GOTO_ON_ERROR(parlio_rx_unit_init_dma(unit), err, TAG, "install rx DMA failed");
|
||||
/* Reset RX module */
|
||||
PARLIO_RCC_ATOMIC() {
|
||||
parlio_ll_rx_reset_clock(hal->regs);
|
||||
@ -668,7 +676,7 @@ esp_err_t parlio_new_rx_unit(const parlio_rx_unit_config_t *config, parlio_rx_un
|
||||
}
|
||||
parlio_ll_rx_start(hal->regs, false);
|
||||
/* parlio_ll_clock_source_t and parlio_clock_source_t are binary compatible if the clock source is from internal */
|
||||
ESP_GOTO_ON_ERROR(s_parlio_select_periph_clock(unit, config), err, TAG, "set clock source failed");
|
||||
ESP_GOTO_ON_ERROR(parlio_select_periph_clock(unit, config), err, TAG, "set clock source failed");
|
||||
/* Set the data width */
|
||||
parlio_ll_rx_set_bus_width(hal->regs, config->data_width);
|
||||
#if SOC_PARLIO_RX_CLK_SUPPORT_GATING
|
||||
@ -694,7 +702,7 @@ esp_err_t parlio_new_rx_unit(const parlio_rx_unit_config_t *config, parlio_rx_un
|
||||
|
||||
err:
|
||||
if (unit) {
|
||||
s_parlio_destroy_rx_unit(unit);
|
||||
parlio_destroy_rx_unit(unit);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -706,7 +714,7 @@ esp_err_t parlio_del_rx_unit(parlio_rx_unit_handle_t rx_unit)
|
||||
ESP_RETURN_ON_FALSE(!rx_unit->is_enabled, ESP_ERR_INVALID_STATE, TAG, "the unit has not disabled");
|
||||
|
||||
ESP_LOGD(TAG, "del rx unit (%d, %d)", rx_unit->base.group->group_id, rx_unit->base.unit_id);
|
||||
return s_parlio_destroy_rx_unit(rx_unit);
|
||||
return parlio_destroy_rx_unit(rx_unit);
|
||||
}
|
||||
|
||||
esp_err_t parlio_rx_unit_enable(parlio_rx_unit_handle_t rx_unit, bool reset_queue)
|
||||
@ -747,8 +755,8 @@ esp_err_t parlio_rx_unit_enable(parlio_rx_unit_handle_t rx_unit, bool reset_queu
|
||||
parlio_ll_rx_enable_clock(hal->regs, false);
|
||||
}
|
||||
}
|
||||
s_parlio_set_delimiter_config(rx_unit, trans.delimiter);
|
||||
s_parlio_mount_transaction_buffer(rx_unit, &trans);
|
||||
parlio_rx_set_delimiter_config(rx_unit, trans.delimiter);
|
||||
parlio_rx_mount_transaction_buffer(rx_unit, &trans);
|
||||
gdma_start(rx_unit->dma_chan, (intptr_t)rx_unit->curr_desc);
|
||||
if (rx_unit->cfg.flags.free_clk) {
|
||||
parlio_ll_rx_start(hal->regs, true);
|
||||
@ -919,7 +927,7 @@ esp_err_t parlio_del_rx_delimiter(parlio_rx_delimiter_handle_t delimiter)
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t s_parlio_rx_unit_do_transaction(parlio_rx_unit_handle_t rx_unit, parlio_rx_transaction_t *trans)
|
||||
static esp_err_t parlio_rx_unit_do_transaction(parlio_rx_unit_handle_t rx_unit, parlio_rx_transaction_t *trans)
|
||||
{
|
||||
bool is_stopped = false;
|
||||
/* Get whether DMA stopped atomically */
|
||||
@ -933,9 +941,9 @@ static esp_err_t s_parlio_rx_unit_do_transaction(parlio_rx_unit_handle_t rx_unit
|
||||
}
|
||||
}
|
||||
if (trans->delimiter != rx_unit->curr_trans.delimiter) {
|
||||
s_parlio_set_delimiter_config(rx_unit, trans->delimiter);
|
||||
parlio_rx_set_delimiter_config(rx_unit, trans->delimiter);
|
||||
}
|
||||
s_parlio_mount_transaction_buffer(rx_unit, trans);
|
||||
parlio_rx_mount_transaction_buffer(rx_unit, trans);
|
||||
// Take semaphore without block time here, only indicate there are transactions on receiving
|
||||
xSemaphoreTake(rx_unit->trans_sem, 0);
|
||||
gdma_start(rx_unit->dma_chan, (intptr_t)rx_unit->curr_desc);
|
||||
@ -1012,7 +1020,7 @@ esp_err_t parlio_rx_unit_receive(parlio_rx_unit_handle_t rx_unit,
|
||||
rx_unit->usr_recv_buf = payload;
|
||||
|
||||
xSemaphoreTake(rx_unit->mutex, portMAX_DELAY);
|
||||
esp_err_t ret = s_parlio_rx_unit_do_transaction(rx_unit, &transaction);
|
||||
esp_err_t ret = parlio_rx_unit_do_transaction(rx_unit, &transaction);
|
||||
xSemaphoreGive(rx_unit->mutex);
|
||||
return ret;
|
||||
}
|
||||
@ -1037,7 +1045,7 @@ esp_err_t parlio_rx_unit_register_event_callbacks(parlio_rx_unit_handle_t rx_uni
|
||||
ESP_RETURN_ON_FALSE(rx_unit, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
|
||||
ESP_RETURN_ON_FALSE(cbs, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
|
||||
|
||||
#if CONFIG_PARLIO_ISR_IRAM_SAFE
|
||||
#if CONFIG_PARLIO_RX_ISR_CACHE_SAFE
|
||||
ESP_RETURN_ON_FALSE(!cbs->on_partial_receive || esp_ptr_in_iram(cbs->on_partial_receive), ESP_ERR_INVALID_ARG,
|
||||
TAG, "on_partial_receive not in IRAM");
|
||||
ESP_RETURN_ON_FALSE(!cbs->on_receive_done || esp_ptr_in_iram(cbs->on_receive_done), ESP_ERR_INVALID_ARG,
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "hal/parlio_ll.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/parlio_tx.h"
|
||||
#include "parlio_private.h"
|
||||
#include "parlio_priv.h"
|
||||
#include "esp_memory_utils.h"
|
||||
#include "esp_clk_tree.h"
|
||||
#include "esp_private/esp_clk_tree_common.h"
|
||||
@ -344,7 +344,7 @@ esp_err_t parlio_new_tx_unit(const parlio_tx_unit_config_t *config, parlio_tx_un
|
||||
ESP_GOTO_ON_ERROR(parlio_select_periph_clock(unit, config), err, TAG, "set clock source failed");
|
||||
|
||||
// install interrupt service
|
||||
int isr_flags = PARLIO_INTR_ALLOC_FLAG;
|
||||
int isr_flags = PARLIO_TX_INTR_ALLOC_FLAG;
|
||||
ret = esp_intr_alloc_intrstatus(parlio_periph_signals.groups[group->group_id].tx_irq_id, isr_flags,
|
||||
(uint32_t)parlio_ll_get_interrupt_status_reg(hal->regs),
|
||||
PARLIO_LL_EVENT_TX_MASK, parlio_tx_default_isr, unit, &unit->intr);
|
||||
@ -442,7 +442,7 @@ esp_err_t parlio_tx_unit_register_event_callbacks(parlio_tx_unit_handle_t tx_uni
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(tx_unit && cbs, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
|
||||
|
||||
#if CONFIG_PARLIO_ISR_IRAM_SAFE
|
||||
#if CONFIG_PARLIO_TX_ISR_CACHE_SAFE
|
||||
if (cbs->on_trans_done) {
|
||||
ESP_RETURN_ON_FALSE(esp_ptr_in_iram(cbs->on_trans_done), ESP_ERR_INVALID_ARG, TAG, "on_trans_done callback not in IRAM");
|
||||
}
|
||||
@ -456,7 +456,7 @@ esp_err_t parlio_tx_unit_register_event_callbacks(parlio_tx_unit_handle_t tx_uni
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static void IRAM_ATTR parlio_tx_do_transaction(parlio_tx_unit_t *tx_unit, parlio_tx_trans_desc_t *t)
|
||||
static void parlio_tx_do_transaction(parlio_tx_unit_t *tx_unit, parlio_tx_trans_desc_t *t)
|
||||
{
|
||||
parlio_hal_context_t *hal = &tx_unit->base.group->hal;
|
||||
|
||||
@ -661,7 +661,7 @@ esp_err_t parlio_tx_unit_transmit(parlio_tx_unit_handle_t tx_unit, const void *p
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static void IRAM_ATTR parlio_tx_default_isr(void *args)
|
||||
static void parlio_tx_default_isr(void *args)
|
||||
{
|
||||
parlio_tx_unit_t *tx_unit = (parlio_tx_unit_t *)args;
|
||||
parlio_group_t *group = tx_unit->base.group;
|
||||
|
@ -3,7 +3,7 @@ set(srcs "test_app_main.c"
|
||||
"test_parlio_tx.c")
|
||||
|
||||
# TODO: IDF-7840, semaphore in 'spi_bus_lock.c' is not IRAM safe
|
||||
if(CONFIG_PARLIO_ISR_IRAM_SAFE)
|
||||
if(CONFIG_PARLIO_RX_ISR_CACHE_SAFE)
|
||||
list(REMOVE_ITEM srcs "test_parlio_rx.c")
|
||||
endif()
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if CONFIG_PARLIO_ISR_IRAM_SAFE
|
||||
#if CONFIG_PARLIO_TX_ISR_CACHE_SAFE || CONFIG_PARLIO_RX_ISR_CACHE_SAFE
|
||||
#define TEST_PARLIO_CALLBACK_ATTR IRAM_ATTR
|
||||
#define TEST_PARLIO_MEM_ALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)
|
||||
#else
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "soc/soc_caps.h"
|
||||
#include "esp_attr.h"
|
||||
#include "test_board.h"
|
||||
#include "soc/parl_io_struct.h"
|
||||
|
||||
TEST_CASE("parallel_tx_unit_install_uninstall", "[parlio_tx]")
|
||||
{
|
||||
|
@ -1,21 +1,19 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'iram_safe',
|
||||
'cache_safe',
|
||||
'release',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target'])
|
||||
def test_parlio(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,6 +1,7 @@
|
||||
CONFIG_COMPILER_DUMP_RTL_FILES=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_NONE=y
|
||||
CONFIG_PARLIO_ISR_IRAM_SAFE=y
|
||||
CONFIG_PARLIO_TX_ISR_CACHE_SAFE=y
|
||||
CONFIG_PARLIO_RX_ISR_CACHE_SAFE=y
|
||||
# place non-ISR FreeRTOS functions in Flash
|
||||
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
# silent the error check, as the error string are stored in rodata, causing RTL check failure
|
@ -1,16 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -20,5 +14,8 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']
|
||||
)
|
||||
def test_pulse_cnt(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -263,6 +263,13 @@ esp_err_t ppa_do_scale_rotate_mirror(ppa_client_handle_t ppa_client, const ppa_s
|
||||
srm_trans_desc->scale_x_frag = (uint32_t)(srm_trans_desc->scale_x * PPA_LL_SRM_SCALING_FRAG_MAX) & (PPA_LL_SRM_SCALING_FRAG_MAX - 1);
|
||||
srm_trans_desc->scale_y_int = (uint32_t)srm_trans_desc->scale_y;
|
||||
srm_trans_desc->scale_y_frag = (uint32_t)(srm_trans_desc->scale_y * PPA_LL_SRM_SCALING_FRAG_MAX) & (PPA_LL_SRM_SCALING_FRAG_MAX - 1);
|
||||
// SRM processes in blocks. Block x/(y) cannot be scaled to odd number when YUV422/YUV420 is the output color mode
|
||||
// When block size is 16x16, odd number is possible, so needs to make them even
|
||||
// When block size is 32x32, calculated frag values are always even
|
||||
if (config->out.srm_cm == PPA_SRM_COLOR_MODE_YUV420) {
|
||||
srm_trans_desc->scale_x_frag = srm_trans_desc->scale_x_frag & ~1;
|
||||
srm_trans_desc->scale_y_frag = srm_trans_desc->scale_y_frag & ~1;
|
||||
}
|
||||
srm_trans_desc->alpha_value = new_alpha_value;
|
||||
srm_trans_desc->data_burst_length = ppa_client->data_burst_length;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -13,5 +13,6 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_ppa(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,16 +1,10 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -20,11 +14,13 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target', ['esp32', 'esp32s2', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32p4'], indirect=['target']
|
||||
)
|
||||
def test_rmt(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.octal_psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@ -34,5 +30,6 @@ def test_rmt(dut: Dut) -> None:
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_rmt_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
from typing import List
|
||||
@ -16,8 +16,18 @@ def parameter_expand(existing_parameters: List[List[str]], value_list: List[str]
|
||||
return ret
|
||||
|
||||
|
||||
esp32_32_param = [[f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}', 'esp32|esp32']]
|
||||
esp32_c6_param = [[f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}', 'esp32|esp32c6']]
|
||||
esp32_32_param = [
|
||||
[
|
||||
f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}',
|
||||
'esp32|esp32',
|
||||
]
|
||||
]
|
||||
esp32_c6_param = [
|
||||
[
|
||||
f'{os.path.join(os.path.dirname(__file__), "host_sdmmc")}|{os.path.join(os.path.dirname(__file__), "sdio")}',
|
||||
'esp32|esp32c6',
|
||||
]
|
||||
]
|
||||
|
||||
esp32_param_default = [pytest.param(*param) for param in parameter_expand(esp32_32_param, ['default|default'])]
|
||||
c6_param_default = [pytest.param(*param) for param in parameter_expand(esp32_c6_param, ['default|default'])]
|
||||
@ -26,7 +36,7 @@ c6_param_retention = [pytest.param(*param) for param in parameter_expand(esp32_c
|
||||
|
||||
|
||||
# Normal tests
|
||||
def test_sdio_flow(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_flow(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
dut[1].expect('Press ENTER to see the list of tests')
|
||||
dut[1].write('[sdio]')
|
||||
dut[1].expect('test_sdio: slave ready')
|
||||
@ -38,24 +48,34 @@ def test_sdio_flow(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
dut[0].expect_unity_test_output()
|
||||
|
||||
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.sdio_multidev_32_c6
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True)
|
||||
def test_sdio_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
test_sdio_flow(dut)
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.sdio_master_slave
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True)
|
||||
def test_sdio_esp32_esp32(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_esp32_esp32(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
test_sdio_flow(dut)
|
||||
|
||||
|
||||
# From host speed tests
|
||||
def test_sdio_speed_frhost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int, expected_1b_speed:int) -> None:
|
||||
def test_sdio_speed_frhost_flow(dut: Tuple[IdfDut, IdfDut], expected_4b_speed: int, expected_1b_speed: int) -> None:
|
||||
dut[1].expect('Press ENTER to see the list of tests')
|
||||
dut[1].write('"SDIO_Slave: test from host (Performance)"')
|
||||
dut[1].expect('test_sdio: slave ready')
|
||||
@ -66,32 +86,42 @@ def test_sdio_speed_frhost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int
|
||||
dut[0].expect('Probe using SD 4-bit')
|
||||
res = dut[0].expect(r'Throughput: compensated (\d+)')
|
||||
frhost_speed_4bit = res.group(1).decode('utf8')
|
||||
assert (int(frhost_speed_4bit) > expected_4b_speed)
|
||||
assert int(frhost_speed_4bit) > expected_4b_speed
|
||||
|
||||
dut[0].expect('Probe using SD 1-bit')
|
||||
res = dut[0].expect(r'Throughput: compensated (\d+)')
|
||||
frhost_speed_1bit = res.group(1).decode('utf8')
|
||||
assert (int(frhost_speed_1bit) > expected_1b_speed)
|
||||
assert int(frhost_speed_1bit) > expected_1b_speed
|
||||
|
||||
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.sdio_multidev_32_c6
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True)
|
||||
def test_sdio_speed_frhost_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_speed_frhost_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
test_sdio_speed_frhost_flow(dut, 10000, 4000)
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.sdio_master_slave
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True)
|
||||
def test_sdio_speed_frhost_esp32_esp32(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_speed_frhost_esp32_esp32(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
test_sdio_speed_frhost_flow(dut, 12200, 4000)
|
||||
|
||||
|
||||
# To host speed tests
|
||||
def test_sdio_speed_tohost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int, expected_1b_speed:int) -> None:
|
||||
def test_sdio_speed_tohost_flow(dut: Tuple[IdfDut, IdfDut], expected_4b_speed: int, expected_1b_speed: int) -> None:
|
||||
dut[1].expect('Press ENTER to see the list of tests')
|
||||
dut[1].write('"SDIO_Slave: test to host (Performance)"')
|
||||
dut[1].expect('test_sdio: slave ready')
|
||||
@ -102,32 +132,42 @@ def test_sdio_speed_tohost_flow(dut:Tuple[IdfDut, IdfDut], expected_4b_speed:int
|
||||
dut[0].expect('Probe using SD 4-bit')
|
||||
res = dut[0].expect(r'Throughput: compensated (\d+)')
|
||||
tohost_speed_4bit = res.group(1).decode('utf8')
|
||||
assert (int(tohost_speed_4bit) > expected_4b_speed)
|
||||
assert int(tohost_speed_4bit) > expected_4b_speed
|
||||
|
||||
dut[0].expect('Probe using SD 1-bit')
|
||||
res = dut[0].expect(r'Throughput: compensated (\d+)')
|
||||
tohost_speed_1bit = res.group(1).decode('utf8')
|
||||
assert (int(tohost_speed_1bit) > expected_1b_speed)
|
||||
assert int(tohost_speed_1bit) > expected_1b_speed
|
||||
|
||||
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.sdio_multidev_32_c6
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('app_path, target, config', c6_param_default, indirect=True)
|
||||
def test_sdio_speed_tohost_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_speed_tohost_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
test_sdio_speed_tohost_flow(dut, 9000, 4000)
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.sdio_master_slave
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('app_path, target, config', esp32_param_default, indirect=True)
|
||||
def test_sdio_speed_tohost_esp32_esp32(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_speed_tohost_esp32_esp32(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
test_sdio_speed_tohost_flow(dut, 12200, 4000)
|
||||
|
||||
|
||||
# Retention tests
|
||||
def test_sdio_retention(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_retention(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
dut[1].expect('Press ENTER to see the list of tests')
|
||||
dut[1].write('[sdio_retention]')
|
||||
dut[1].expect('test_sdio: slave ready')
|
||||
@ -139,9 +179,14 @@ def test_sdio_retention(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
dut[0].expect_unity_test_output()
|
||||
|
||||
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.sdio_multidev_32_c6
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('app_path, target, config', c6_param_retention, indirect=True)
|
||||
def test_sdio_retention_esp32_esp32c6(dut:Tuple[IdfDut, IdfDut]) -> None:
|
||||
def test_sdio_retention_esp32_esp32c6(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
test_sdio_retention(dut)
|
||||
|
@ -1,7 +1,8 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
CONFIGS = [
|
||||
'iram_safe',
|
||||
@ -9,16 +10,12 @@ CONFIGS = [
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32s2
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', CONFIGS, indirect=True)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32c3', 'esp32c5', 'esp32c6', 'esp32h2', 'esp32s2', 'esp32s3', 'esp32h2', 'esp32p4'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_sdm(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(group='sdm')
|
||||
|
@ -1,13 +1,12 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.sdcard
|
||||
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32p4'], indirect=['target'])
|
||||
def test_sdmmc(dut: IdfDut) -> None:
|
||||
# SDMMC driver can't be reinitialized if the test fails,
|
||||
# so we need to reset the board between tests to avoid failing
|
||||
|
@ -1,15 +1,12 @@
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='C5 C61 GPSPI same, so testing on C5 is enough')
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.esp32c5
|
||||
@pytest.mark.sdcard_spimode
|
||||
@idf_parametrize('target', ['esp32', 'esp32s3', 'esp32c3', 'esp32p4', 'esp32c5'], indirect=['target'])
|
||||
def test_sdspi(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(reset=True)
|
||||
|
@ -1,13 +1,22 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
|
||||
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
# If `test_env` is define, should not run on generic runner
|
||||
@pytest.mark.supported_targets
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['release', 'freertos_compliance', 'freertos_flash',], indirect=True)
|
||||
def test_master_single_dev(case_tester) -> None: # type: ignore
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'release',
|
||||
'freertos_compliance',
|
||||
'freertos_flash',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_master_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
@ -15,10 +24,16 @@ def test_master_single_dev(case_tester) -> None: # type: ignore
|
||||
|
||||
|
||||
# Job for test_env `external_flash` just for esp32 only
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.flash_multi
|
||||
@pytest.mark.parametrize('config', ['release',], indirect=True)
|
||||
def test_master_esp_flash(case_tester) -> None: # type: ignore
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'release',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_master_esp_flash(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
# test case `spi_bus_lock_with_flash` use difference test env
|
||||
if case.attributes.get('test_env') == 'external_flash':
|
||||
@ -28,19 +43,28 @@ def test_master_esp_flash(case_tester) -> None: # type: ignore
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
# TODO: [ESP32C61] IDF-10949
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize(
|
||||
'count, config',
|
||||
[
|
||||
(2, 'release',),
|
||||
(2, 'freertos_compliance',),
|
||||
(2, 'freertos_flash',),
|
||||
(
|
||||
2,
|
||||
'release',
|
||||
),
|
||||
(
|
||||
2,
|
||||
'freertos_compliance',
|
||||
),
|
||||
(
|
||||
2,
|
||||
'freertos_flash',
|
||||
),
|
||||
(2, 'iram_safe'),
|
||||
],
|
||||
indirect=True
|
||||
indirect=True,
|
||||
)
|
||||
def test_master_multi_dev(case_tester) -> None: # type: ignore
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_master_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
|
@ -1,12 +1,13 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
|
||||
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
# If `test_env` is define, should not run on generic runner
|
||||
@pytest.mark.supported_targets
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
def test_param_single_dev(case_tester) -> None: # type: ignore
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_param_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
@ -16,10 +17,16 @@ def test_param_single_dev(case_tester) -> None: # type: ignore
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
# TODO: [ESP32C61] IDF-10949
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize('count', [2,], indirect=True)
|
||||
def test_param_multi_dev(case_tester) -> None: # type: ignore
|
||||
@pytest.mark.parametrize(
|
||||
'count',
|
||||
[
|
||||
2,
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_param_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
|
@ -1,13 +1,14 @@
|
||||
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
|
||||
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
# If `test_env` is define, should not run on generic runner
|
||||
@pytest.mark.supported_targets
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['release', 'iram_safe'], indirect=True)
|
||||
def test_slave_single_dev(case_tester) -> None: # type: ignore
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_slave_single_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if 'test_env' in case.attributes:
|
||||
continue
|
||||
@ -17,10 +18,10 @@ def test_slave_single_dev(case_tester) -> None: # type: ignore
|
||||
# if `test_env` not defined, will run on `generic_multi_device` by default
|
||||
# TODO: [ESP32C61] IDF-10949
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32c61'], reason='no multi-dev runner')
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic_multi_device
|
||||
@pytest.mark.parametrize('count, config', [(2, 'release'), (2, 'iram_safe')], indirect=True)
|
||||
def test_slave_multi_dev(case_tester) -> None: # type: ignore
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_slave_multi_dev(case_tester) -> None: # type: ignore
|
||||
for case in case_tester.test_menu:
|
||||
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
||||
case_tester.run_multi_dev_case(case=case, reset=True)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user