mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
change(pcnt): reenable the target test for esp32p4
by changing the GPIO assignment
This commit is contained in:
parent
1c314f3084
commit
16049ab6ad
@ -43,10 +43,6 @@ components/driver/test_apps/legacy_mcpwm_driver:
|
||||
components/driver/test_apps/legacy_pcnt_driver:
|
||||
disable:
|
||||
- if: SOC_PCNT_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: test not pass, should be re-enable # TODO: IDF-8965
|
||||
depends_filepatterns:
|
||||
- components/driver/deprecated/**/*pcnt*
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -8,6 +8,7 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/pcnt.h"
|
||||
@ -23,10 +24,18 @@
|
||||
#include "unity.h"
|
||||
#include "esp_rom_gpio.h"
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32P4
|
||||
#define PULSE_IO 20
|
||||
#define PCNT_INPUT_IO 21
|
||||
#define PCNT_CTRL_VCC_IO 1
|
||||
#define PCNT_CTRL_GND_IO 0
|
||||
#else
|
||||
#define PULSE_IO 12
|
||||
#define PCNT_INPUT_IO 4
|
||||
#define PCNT_CTRL_VCC_IO 5
|
||||
#define PCNT_CTRL_GND_IO 2
|
||||
#endif
|
||||
|
||||
#define HIGHEST_LIMIT 10
|
||||
#define LOWEST_LIMIT 0
|
||||
#define MAX_THRESHOLD 5
|
||||
|
@ -10,6 +10,7 @@ from pytest_embedded import Dut
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
|
@ -3,9 +3,5 @@
|
||||
components/esp_driver_pcnt/test_apps/pulse_cnt:
|
||||
disable:
|
||||
- if: SOC_PCNT_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: test not pass, should be re-enable # TODO: IDF-8965
|
||||
depends_components:
|
||||
- esp_driver_pcnt
|
||||
|
@ -1,17 +1,25 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32P4
|
||||
#define TEST_PCNT_GPIO_A 20
|
||||
#define TEST_PCNT_GPIO_B 21
|
||||
#define TEST_PCNT_GPIO_Z 22
|
||||
#else
|
||||
#define TEST_PCNT_GPIO_A 0
|
||||
#define TEST_PCNT_GPIO_B 2
|
||||
#define TEST_PCNT_GPIO_Z 4
|
||||
#endif
|
||||
|
||||
#if CONFIG_PCNT_ISR_IRAM_SAFE
|
||||
#define TEST_PCNT_CALLBACK_ATTR IRAM_ATTR
|
||||
|
@ -10,6 +10,7 @@ from pytest_embedded import Dut
|
||||
@pytest.mark.esp32s3
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.esp32h2
|
||||
@pytest.mark.esp32p4
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
|
Loading…
Reference in New Issue
Block a user