esp32c3: Add new esp_sleep_is_valid_wakeup_gpio() function

This commit is contained in:
Angus Gratton
2020-11-23 17:09:16 +11:00
parent f9e1ee35ad
commit 01696afc34
3 changed files with 24 additions and 4 deletions

View File

@@ -210,7 +210,7 @@ static int deep_sleep(int argc, char **argv)
}
if (deep_sleep_args.wakeup_gpio_num->count) {
int io_num = deep_sleep_args.wakeup_gpio_num->ival[0];
if (!rtc_gpio_is_valid_gpio(io_num)) {
if (!esp_sleep_is_valid_wakeup_gpio(io_num)) {
ESP_LOGE(TAG, "GPIO %d is not an RTC IO", io_num);
return 1;
}