mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-27 20:49:09 +08:00
feat(wifi): refactor wifi power management
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
#include "driver/gpio.h"
|
||||
|
||||
@ -261,6 +262,22 @@ esp_err_t esp_sleep_enable_gpio_wakeup(void);
|
||||
*/
|
||||
esp_err_t esp_sleep_disable_wakeup_source(esp_sleep_source_t source);
|
||||
|
||||
/**
|
||||
* @brief Print power consumption information
|
||||
*
|
||||
* @note This function is used to print power consumption data. The current
|
||||
* when the RF and CPU are both turned on is 70 mA. The current when
|
||||
* only the CPU is turned on is 18 mA. 900uA when both CPU and RF are off.
|
||||
* There may be some errors compared to the actual power consumption.
|
||||
* The power consumption is based on the actual measurement, and the printing
|
||||
* in the function is for reference only.
|
||||
*
|
||||
* @param clear_old_data - Recalculate power consumption info or not.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void esp_power_consumption_info(bool clear_old_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user