From 314d08e53f6072fc51fa89578b03485340734885 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 16 Jun 2020 18:31:46 +0200 Subject: [PATCH] esp32s2: sleep_modes: remove dependency on driver/uart.h --- components/esp32s2/sleep_modes.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/esp32s2/sleep_modes.c b/components/esp32s2/sleep_modes.c index 4d71206e4..6be663e4c 100644 --- a/components/esp32s2/sleep_modes.c +++ b/components/esp32s2/sleep_modes.c @@ -36,7 +36,6 @@ #include "hal/wdt_hal.h" #include "hal/clk_gate_ll.h" #include "driver/rtc_io.h" -#include "driver/uart.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "sdkconfig.h" @@ -585,9 +584,9 @@ esp_err_t esp_sleep_enable_gpio_wakeup(void) esp_err_t esp_sleep_enable_uart_wakeup(int uart_num) { - if (uart_num == UART_NUM_0) { + if (uart_num == 0) { s_config.wakeup_triggers |= RTC_UART0_TRIG_EN; - } else if (uart_num == UART_NUM_1) { + } else if (uart_num == 1) { s_config.wakeup_triggers |= RTC_UART1_TRIG_EN; } else { return ESP_ERR_INVALID_ARG;