forked from espressif/esp-idf
ci(ana_camr): enable example test on p4
This commit is contained in:
@@ -20,10 +20,6 @@ examples/peripherals/adc/oneshot_read:
|
|||||||
examples/peripherals/analog_comparator:
|
examples/peripherals/analog_comparator:
|
||||||
disable:
|
disable:
|
||||||
- if: SOC_ANA_CMPR_SUPPORTED != 1
|
- if: SOC_ANA_CMPR_SUPPORTED != 1
|
||||||
disable_test:
|
|
||||||
- if: IDF_TARGET == "esp32p4"
|
|
||||||
temporary: true
|
|
||||||
reason: not supported yet
|
|
||||||
depends_components:
|
depends_components:
|
||||||
- esp_driver_gpio
|
- esp_driver_gpio
|
||||||
- esp_driver_ana_cmpr
|
- esp_driver_ana_cmpr
|
||||||
|
@@ -18,7 +18,11 @@ extern "C" {
|
|||||||
#define EXAMPLE_WAIT_TIME_PROP (0.1) // The wait time proportion in one relative signal period
|
#define EXAMPLE_WAIT_TIME_PROP (0.1) // The wait time proportion in one relative signal period
|
||||||
#define EXAMPLE_WAITE_TIME_US(freq_approx) (uint32_t)(1000000 * EXAMPLE_WAIT_TIME_PROP / (freq_approx))
|
#define EXAMPLE_WAITE_TIME_US(freq_approx) (uint32_t)(1000000 * EXAMPLE_WAIT_TIME_PROP / (freq_approx))
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
#define EXAMPLE_MONITOR_GPIO_NUM (32) // The gpio to monitor the on cross callback
|
||||||
|
#else
|
||||||
#define EXAMPLE_MONITOR_GPIO_NUM (0) // The gpio to monitor the on cross callback
|
#define EXAMPLE_MONITOR_GPIO_NUM (0) // The gpio to monitor the on cross callback
|
||||||
|
#endif
|
||||||
|
|
||||||
void example_init_monitor_gpio(void);
|
void example_init_monitor_gpio(void);
|
||||||
|
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from pytest_embedded import Dut
|
from pytest_embedded import Dut
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.esp32h2
|
@pytest.mark.esp32h2
|
||||||
|
@pytest.mark.esp32p4
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'config',
|
'config',
|
||||||
@@ -17,7 +17,7 @@ from pytest_embedded import Dut
|
|||||||
)
|
)
|
||||||
def test_ana_cmpr_example(dut: Dut) -> None:
|
def test_ana_cmpr_example(dut: Dut) -> None:
|
||||||
sdkconfig = dut.app.sdkconfig
|
sdkconfig = dut.app.sdkconfig
|
||||||
dut.expect('ana_cmpr_example: Analog Comparator source gpio 11, external reference gpio 10', timeout=10)
|
dut.expect(r'ana_cmpr_example: Analog Comparator source gpio ([0-9]+), external reference gpio ([0-9]+)', timeout=10)
|
||||||
if sdkconfig['EXAMPLE_INTERNAL_REF']:
|
if sdkconfig['EXAMPLE_INTERNAL_REF']:
|
||||||
dut.expect('ana_cmpr_example: Allocate Analog Comparator with internal reference', timeout=10)
|
dut.expect('ana_cmpr_example: Allocate Analog Comparator with internal reference', timeout=10)
|
||||||
dut.expect(r'ana_cmpr_example: Analog comparator enabled, reference voltage: [0-9]+% \* VDD', timeout=10)
|
dut.expect(r'ana_cmpr_example: Analog comparator enabled, reference voltage: [0-9]+% \* VDD', timeout=10)
|
||||||
|
Reference in New Issue
Block a user