change(pm): use old ext1 api for pytest

This commit is contained in:
Lou Tianhao 2024-02-22 20:06:03 +08:00
parent 901c5624d3
commit f0ae83d056
2 changed files with 3 additions and 8 deletions

View File

@ -105,12 +105,12 @@ static int process_ext1_wakeup(int argc, char **argv)
ESP_LOGI(TAG, "io_wakeup_level = %d\n", io_wakeup_level);
if (ext1_wakeup_args.disable->count) {
ESP_ERROR_CHECK(esp_sleep_disable_ext1_wakeup_io(1ULL << io_wakeup_num));
ESP_ERROR_CHECK(esp_sleep_enable_ext1_wakeup(0ULL, 0));
} else {
#if CONFIG_IDF_TARGET_ESP32
ESP_ERROR_CHECK(esp_sleep_enable_ext1_wakeup_io(1ULL << io_wakeup_num, io_wakeup_level == 0 ? ESP_EXT1_WAKEUP_ALL_LOW : ESP_EXT1_WAKEUP_ANY_HIGH));
ESP_ERROR_CHECK(esp_sleep_enable_ext1_wakeup(1ULL << io_wakeup_num, io_wakeup_level == 0 ? ESP_EXT1_WAKEUP_ALL_LOW : ESP_EXT1_WAKEUP_ANY_HIGH));
#else
ESP_ERROR_CHECK(esp_sleep_enable_ext1_wakeup_io(1ULL << io_wakeup_num, io_wakeup_level == 0 ? ESP_EXT1_WAKEUP_ANY_LOW : ESP_EXT1_WAKEUP_ANY_HIGH));
ESP_ERROR_CHECK(esp_sleep_enable_ext1_wakeup(1ULL << io_wakeup_num, io_wakeup_level == 0 ? ESP_EXT1_WAKEUP_ANY_LOW : ESP_EXT1_WAKEUP_ANY_HIGH));
#endif
}
return 0;

View File

@ -1,6 +1,5 @@
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
from time import sleep
from typing import Tuple
@ -11,10 +10,6 @@ TEST_CONFIGS = [
pytest.param('default'),
]
# TODO: PM-66
# ESP32: need to fix GPIO16 and GPIO17 bug
# ESP32S2: need to fix GPIO43 bug
# ESP32S3: need to fix GPIO33, GPIO34 and GPIO43 bug
available_gpio_nums = {
'esp32': [2, 4, 5, 12, 13, 14, 15, 18, 19, 21, 22, 23, 27],
'esp32s2': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 21, 33, 34, 35, 36, 37, 38, 39, 40, 42, 45],