mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
esp32h2: enable more components to support esp32h2
Involved components: * app_trace * esp-tls * esp_adc_cal * esp_pm * esp_serial_slave_link * esp_timer * freertos * idf_test * log * mbedtls * newlib * perfmon * spi_flash * spiffs * ulp * unity * vfs
This commit is contained in:
@@ -60,6 +60,10 @@
|
||||
#include "esp32c3/clk.h"
|
||||
#include "esp32c3/pm.h"
|
||||
#include "driver/gpio.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
#include "esp32h2/clk.h"
|
||||
#include "esp32h2/pm.h"
|
||||
#include "driver/gpio.h"
|
||||
#endif
|
||||
|
||||
#define MHZ (1000000)
|
||||
@@ -96,6 +100,9 @@
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
#define REF_CLK_DIV_MIN 2
|
||||
#define DEFAULT_CPU_FREQ CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
#define REF_CLK_DIV_MIN 2
|
||||
#define DEFAULT_CPU_FREQ CONFIG_ESP32H2_DEFAULT_CPU_FREQ_MHZ
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_PROFILING
|
||||
@@ -230,6 +237,8 @@ esp_err_t esp_pm_configure(const void* vconfig)
|
||||
const esp_pm_config_esp32s3_t* config = (const esp_pm_config_esp32s3_t*) vconfig;
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
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;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_FREERTOS_USE_TICKLESS_IDLE
|
||||
@@ -336,6 +345,8 @@ esp_err_t esp_pm_get_configuration(void* vconfig)
|
||||
esp_pm_config_esp32s3_t* config = (esp_pm_config_esp32s3_t*) vconfig;
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
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;
|
||||
#endif
|
||||
|
||||
portENTER_CRITICAL(&s_switch_lock);
|
||||
@@ -764,6 +775,8 @@ void esp_pm_impl_init(void)
|
||||
esp_pm_config_esp32s3_t cfg = {
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
esp_pm_config_esp32c3_t cfg = {
|
||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||
esp_pm_config_esp32h2_t cfg = {
|
||||
#endif
|
||||
.max_freq_mhz = DEFAULT_CPU_FREQ,
|
||||
.min_freq_mhz = xtal_freq,
|
||||
|
Reference in New Issue
Block a user