/* * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Unlicense OR CC0-1.0 */ /* * Power Saving Mode(PSM) in Sim70XX modems along with * Deep sleep and Light Sleep modes in esp32. */ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_system.h" #include "esp_log.h" #include "driver/uart.h" #include "string.h" #include "driver/gpio.h" #include "esp_sleep.h" #include "driver/rtc_io.h" #include "esp_modem_api.h" #include "esp_event.h" #include "sdkconfig.h" #define BUF_SIZE 1024 #define TXD_PIN ((gpio_num_t)CONFIG_EXAMPLE_MODEM_UART_TX_PIN) #define RXD_PIN ((gpio_num_t)CONFIG_EXAMPLE_MODEM_UART_RX_PIN) #define GPIO_INPUT_STATUS ((gpio_num_t)CONFIG_EXAMPLE_MODEM_STATUS_PIN) #define GPIO_OUTPUT_PWRKEY ((gpio_num_t)CONFIG_EXAMPLE_MODEM_PWRKEY_PIN) #define GPIO_OUTPUT_PIN_SEL (1ULL<