2025-02-24 10:18:03 +08:00
|
|
|
# SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
|
2022-07-15 12:52:44 +08:00
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
import pytest
|
|
|
|
from pytest_embedded.dut import Dut
|
2025-02-24 10:18:03 +08:00
|
|
|
from pytest_embedded_idf.utils import idf_parametrize
|
2022-07-15 12:52:44 +08:00
|
|
|
|
|
|
|
|
2022-12-21 12:07:35 +08:00
|
|
|
@pytest.mark.adc
|
2025-02-24 10:18:03 +08:00
|
|
|
@idf_parametrize(
|
|
|
|
'target', ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5'], indirect=['target']
|
|
|
|
)
|
2022-07-15 12:52:44 +08:00
|
|
|
def test_adc_continuous(dut: Dut) -> None:
|
2023-04-25 11:18:56 +08:00
|
|
|
res = dut.expect(r'TASK: ret is 0, ret_num is (\d+) bytes')
|
2022-07-15 12:52:44 +08:00
|
|
|
num = res.group(1).decode('utf8')
|
|
|
|
assert int(num) == 256
|