mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
ESP8684: add driver esp_pm heap support
This commit is contained in:
@@ -56,6 +56,10 @@
|
||||
#include "esp32h2/clk.h"
|
||||
#include "esp32h2/pm.h"
|
||||
#include "driver/gpio.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP8684
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "esp8684/pm.h"
|
||||
#include "driver/gpio.h"
|
||||
#endif
|
||||
|
||||
#define MHZ (1000000)
|
||||
@@ -95,6 +99,9 @@
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
#define REF_CLK_DIV_MIN 2
|
||||
#define DEFAULT_CPU_FREQ CONFIG_ESP32H2_DEFAULT_CPU_FREQ_MHZ
|
||||
#elif CONFIG_IDF_TARGET_ESP8684
|
||||
#define REF_CLK_DIV_MIN 2
|
||||
#define DEFAULT_CPU_FREQ CONFIG_ESP8684_DEFAULT_CPU_FREQ_MHZ
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_PROFILING
|
||||
@@ -229,6 +236,8 @@ esp_err_t esp_pm_configure(const void* vconfig)
|
||||
const esp_pm_config_esp32c3_t* config = (const esp_pm_config_esp32c3_t*) vconfig;
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
const esp_pm_config_esp32h2_t* config = (const esp_pm_config_esp32h2_t*) vconfig;
|
||||
#elif CONFIG_IDF_TARGET_ESP8684
|
||||
const esp_pm_config_esp8684_t* config = (const esp_pm_config_esp8684_t*) vconfig;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
@@ -337,6 +346,8 @@ esp_err_t esp_pm_get_configuration(void* vconfig)
|
||||
esp_pm_config_esp32c3_t* config = (esp_pm_config_esp32c3_t*) vconfig;
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
esp_pm_config_esp32h2_t* config = (esp_pm_config_esp32h2_t*) vconfig;
|
||||
#elif CONFIG_IDF_TARGET_ESP8684
|
||||
esp_pm_config_esp8684_t* config = (esp_pm_config_esp8684_t*) vconfig;
|
||||
#endif
|
||||
|
||||
portENTER_CRITICAL(&s_switch_lock);
|
||||
@@ -766,6 +777,8 @@ void esp_pm_impl_init(void)
|
||||
esp_pm_config_esp32c3_t cfg = {
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
esp_pm_config_esp32h2_t cfg = {
|
||||
#elif CONFIG_IDF_TARGET_ESP8684
|
||||
esp_pm_config_esp8684_t cfg = {
|
||||
#endif
|
||||
.max_freq_mhz = DEFAULT_CPU_FREQ,
|
||||
.min_freq_mhz = xtal_freq,
|
||||
|
Reference in New Issue
Block a user