mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
deep sleep: add note about disabling WiFi and BT
This change adds a note to esp_deep_sleep that applications should disable WiFi and BT before going into deep sleep. SNTP example is also updated.
This commit is contained in:
parent
d3fde5188e
commit
26dec992eb
@ -164,6 +164,14 @@ void esp_deep_sleep_start() __attribute__((noreturn));
|
|||||||
* Call to this function is equivalent to a call to esp_deep_sleep_enable_timer_wakeup
|
* Call to this function is equivalent to a call to esp_deep_sleep_enable_timer_wakeup
|
||||||
* followed by a call to esp_deep_sleep_start.
|
* followed by a call to esp_deep_sleep_start.
|
||||||
*
|
*
|
||||||
|
* esp_deep_sleep does not shut down WiFi, BT, and higher level protocol
|
||||||
|
* connections gracefully.
|
||||||
|
* Make sure relevant WiFi and BT stack functions are called to close any
|
||||||
|
* connections and deinitialize the peripherals. These include:
|
||||||
|
* - esp_bluedroid_disable
|
||||||
|
* - esp_bt_controller_disable
|
||||||
|
* - esp_wifi_stop
|
||||||
|
*
|
||||||
* This function does not return.
|
* This function does not return.
|
||||||
*
|
*
|
||||||
* @param time_in_us deep-sleep time, unit: microsecond
|
* @param time_in_us deep-sleep time, unit: microsecond
|
||||||
|
@ -110,6 +110,8 @@ static void obtain_time(void)
|
|||||||
time(&now);
|
time(&now);
|
||||||
localtime_r(&now, &timeinfo);
|
localtime_r(&now, &timeinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ESP_ERROR_CHECK( esp_wifi_stop() );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void initialize_sntp(void)
|
static void initialize_sntp(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user