mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Added extra check for P_LORA_DIO_1 before going to sleep
This commit is contained in:
parent
89a289eb22
commit
0d11a02e71
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ public:
|
|||
}
|
||||
|
||||
void enterLightSleep(uint32_t secs) {
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) // Supported ESP32 variants
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3) && defined(P_LORA_DIO_1) // Supported ESP32 variants
|
||||
if (rtc_gpio_is_valid_gpio((gpio_num_t)P_LORA_DIO_1)) { // Only enter sleep mode if P_LORA_DIO_1 is RTC pin
|
||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
||||
esp_sleep_enable_ext1_wakeup((1L << P_LORA_DIO_1), ESP_EXT1_WAKEUP_ANY_HIGH); // To wake up when receiving a LoRa packet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue