esp_clk: refactor target/clk.h to private/esp_clk.h

This commit is contained in:
Cao Sen Miao
2021-11-19 11:42:01 +08:00
parent 28d5d5787b
commit eddc196081
48 changed files with 64 additions and 306 deletions

View File

@@ -69,16 +69,7 @@ Revision: $Rev: 3734 $
#include "esp_intr_alloc.h" #include "esp_intr_alloc.h"
#include "soc/soc.h" #include "soc/soc.h"
#include "soc/interrupts.h" #include "soc/interrupts.h"
#if CONFIG_IDF_TARGET_ESP32 #include "esp_private/esp_clk.h"
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#endif
extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI;

View File

@@ -29,11 +29,11 @@
#include "esp_err.h" #include "esp_err.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_pm.h" #include "esp_pm.h"
#include "esp_private/esp_clk.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/soc_memory_layout.h" #include "soc/soc_memory_layout.h"
#include "soc/dport_reg.h" #include "soc/dport_reg.h"
#include "esp32/clk.h"
#include "esp_coexist_internal.h" #include "esp_coexist_internal.h"
#if !CONFIG_FREERTOS_UNICORE #if !CONFIG_FREERTOS_UNICORE
#include "esp_ipc.h" #include "esp_ipc.h"

View File

@@ -29,10 +29,10 @@
#include "esp_pm.h" #include "esp_pm.h"
#include "esp_ipc.h" #include "esp_ipc.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/rtc_cntl_reg.h" #include "soc/rtc_cntl_reg.h"
#include "soc/soc_memory_layout.h" #include "soc/soc_memory_layout.h"
#include "esp32c3/clk.h"
#include "esp_coexist_internal.h" #include "esp_coexist_internal.h"
#include "esp32c3/rom/rom_layout.h" #include "esp32c3/rom/rom_layout.h"
#include "esp_timer.h" #include "esp_timer.h"

View File

@@ -30,10 +30,10 @@
#include "esp_pm.h" #include "esp_pm.h"
#include "esp_ipc.h" #include "esp_ipc.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/rtc_cntl_reg.h" #include "soc/rtc_cntl_reg.h"
#include "soc/soc_memory_layout.h" #include "soc/soc_memory_layout.h"
#include "esp32c3/clk.h"
#include "esp_coexist_internal.h" #include "esp_coexist_internal.h"
#include "esp_timer.h" #include "esp_timer.h"
#include "esp_sleep.h" #include "esp_sleep.h"

View File

@@ -22,23 +22,10 @@
#include "driver/gpio.h" #include "driver/gpio.h"
#include "driver/uart_select.h" #include "driver/uart_select.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#elif CONFIG_IDF_TARGET_ESP8684
#include "esp_private/esp_clk.h"
#endif
#ifdef CONFIG_UART_ISR_IN_IRAM #ifdef CONFIG_UART_ISR_IN_IRAM
#define UART_ISR_ATTR IRAM_ATTR #define UART_ISR_ATTR IRAM_ATTR
#define UART_MALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT) #define UART_MALLOC_CAPS (MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT)

View File

@@ -6,7 +6,7 @@
#include "esp_efuse_utility.h" #include "esp_efuse_utility.h"
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "esp32/clk.h" #include "esp_private/esp_clk.h"
#include "esp_log.h" #include "esp_log.h"
#include "assert.h" #include "assert.h"
#include "sdkconfig.h" #include "sdkconfig.h"

View File

@@ -10,7 +10,7 @@
#include "assert.h" #include "assert.h"
#include "esp_efuse_utility.h" #include "esp_efuse_utility.h"
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "esp32c3/clk.h" #include "esp_private/esp_clk.h"
#include "esp32c3/rom/efuse.h" #include "esp32c3/rom/efuse.h"
static const char *TAG = "efuse"; static const char *TAG = "efuse";

View File

@@ -10,7 +10,7 @@
#include "assert.h" #include "assert.h"
#include "esp_efuse_utility.h" #include "esp_efuse_utility.h"
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "esp32h2/clk.h" #include "esp_private/esp_clk.h"
#include "esp32h2/rom/efuse.h" #include "esp32h2/rom/efuse.h"
static const char *TAG = "efuse"; static const char *TAG = "efuse";

View File

@@ -6,7 +6,7 @@
#include "esp_efuse_utility.h" #include "esp_efuse_utility.h"
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "esp32s2/clk.h" #include "esp_private/esp_clk.h"
#include "esp_log.h" #include "esp_log.h"
#include "assert.h" #include "assert.h"
#include "sdkconfig.h" #include "sdkconfig.h"

View File

@@ -6,7 +6,7 @@
#include "esp_efuse_utility.h" #include "esp_efuse_utility.h"
#include "soc/efuse_periph.h" #include "soc/efuse_periph.h"
#include "esp32s3/clk.h" #include "esp_private/esp_clk.h"
#include "esp_log.h" #include "esp_log.h"
#include "assert.h" #include "assert.h"
#include "sdkconfig.h" #include "sdkconfig.h"

View File

@@ -12,31 +12,26 @@
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
#include "esp_rom_caps.h" #include "esp_rom_caps.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/rtc.h" #include "esp32/rom/rtc.h"
#include "esp32/clk.h"
#include "esp32/rtc.h" #include "esp32/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/rtc.h" #include "esp32s2/rom/rtc.h"
#include "esp32s2/clk.h"
#include "esp32s2/rtc.h" #include "esp32s2/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/rtc.h" #include "esp32s3/rom/rtc.h"
#include "esp32s3/clk.h"
#include "esp32s3/rtc.h" #include "esp32s3/rtc.h"
#include "esp32s3/rom/ets_sys.h" #include "esp32s3/rom/ets_sys.h"
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/rtc.h" #include "esp32c3/rom/rtc.h"
#include "esp32c3/clk.h"
#include "esp32c3/rtc.h" #include "esp32c3/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32H2 #elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/rom/rtc.h" #include "esp32h2/rom/rtc.h"
#include "esp32h2/clk.h"
#include "esp32h2/rtc.h" #include "esp32h2/rtc.h"
#elif CONFIG_IDF_TARGET_ESP8684 #elif CONFIG_IDF_TARGET_ESP8684
#include "esp8684/rom/rtc.h" #include "esp8684/rom/rtc.h"
#include "esp_private/esp_clk.h"
#include "esp8684/rtc.h" #include "esp8684/rtc.h"
#endif #endif

View File

@@ -12,20 +12,7 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "soc/wdev_reg.h" #include "soc/wdev_reg.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#elif CONFIG_IDF_TARGET_ESP8684
#include "esp_private/esp_clk.h" #include "esp_private/esp_clk.h"
#endif
uint32_t IRAM_ATTR esp_random(void) uint32_t IRAM_ATTR esp_random(void)
{ {

View File

@@ -1,2 +0,0 @@
#warning esp_clk.h has been replaced by esp32/clk.h, please include esp32/clk.h instead
#include "esp32/clk.h"

View File

@@ -1,8 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_private/esp_clk.h"

View File

@@ -1,8 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_private/esp_clk.h"

View File

@@ -1,8 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_private/esp_clk.h"

View File

@@ -1,8 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_private/esp_clk.h"

View File

@@ -1,8 +0,0 @@
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_private/esp_clk.h"

View File

@@ -44,38 +44,33 @@
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
#include "brownout.h" #include "brownout.h"
#include "esp_private/sleep_retention.h" #include "esp_private/sleep_retention.h"
#include "esp_private/esp_clk.h"
#ifdef CONFIG_IDF_TARGET_ESP32 #ifdef CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/cache.h" #include "esp32/rom/cache.h"
#include "esp32/rom/rtc.h" #include "esp32/rom/rtc.h"
#include "esp32/clk.h"
#include "esp_private/gpio.h" #include "esp_private/gpio.h"
#include "esp_private/sleep_gpio.h" #include "esp_private/sleep_gpio.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#include "esp32s2/rom/cache.h" #include "esp32s2/rom/cache.h"
#include "esp32s2/rom/rtc.h" #include "esp32s2/rom/rtc.h"
#include "soc/extmem_reg.h" #include "soc/extmem_reg.h"
#include "esp_private/gpio.h" #include "esp_private/gpio.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#include "esp32s3/rom/cache.h" #include "esp32s3/rom/cache.h"
#include "esp32s3/rom/rtc.h" #include "esp32s3/rom/rtc.h"
#include "soc/extmem_reg.h" #include "soc/extmem_reg.h"
#include "esp_private/sleep_mac_bb.h" #include "esp_private/sleep_mac_bb.h"
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#include "esp32c3/rom/cache.h" #include "esp32c3/rom/cache.h"
#include "esp32c3/rom/rtc.h" #include "esp32c3/rom/rtc.h"
#include "soc/extmem_reg.h" #include "soc/extmem_reg.h"
#include "esp_private/sleep_mac_bb.h" #include "esp_private/sleep_mac_bb.h"
#elif CONFIG_IDF_TARGET_ESP32H2 #elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#include "esp32h2/rom/cache.h" #include "esp32h2/rom/cache.h"
#include "esp32h2/rom/rtc.h" #include "esp32h2/rom/rtc.h"
#include "soc/extmem_reg.h" #include "soc/extmem_reg.h"
#elif CONFIG_IDF_TARGET_ESP8684 #elif CONFIG_IDF_TARGET_ESP8684
#include "esp_private/esp_clk.h"
#include "esp8684/rom/cache.h" #include "esp8684/rom/cache.h"
#include "esp8684/rom/rtc.h" #include "esp8684/rom/rtc.h"
#include "soc/extmem_reg.h" #include "soc/extmem_reg.h"

View File

@@ -11,7 +11,7 @@
#include "xtensa/core-macros.h" #include "xtensa/core-macros.h"
#include "xtensa/hal.h" #include "xtensa/hal.h"
#include "esp_types.h" #include "esp_types.h"
#include "esp32/clk.h" #include "esp_private/esp_clk.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"

View File

@@ -26,26 +26,22 @@
#include "esp_sleep.h" #include "esp_sleep.h"
#include "esp_system.h" #include "esp_system.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/rtc.h" #include "esp32/rtc.h"
#include "esp32/clk.h"
#include "esp32/rom/rtc.h" #include "esp32/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rtc.h" #include "esp32s2/rtc.h"
#include "esp32s2/clk.h"
#include "esp32s2/rom/rtc.h" #include "esp32s2/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rtc.h" #include "esp32s3/rtc.h"
#include "esp32s3/clk.h"
#include "esp32s3/rom/rtc.h" #include "esp32s3/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rtc.h" #include "esp32c3/rtc.h"
#include "esp32c3/clk.h"
#include "esp32c3/rom/rtc.h" #include "esp32c3/rom/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32H2 #elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/rtc.h" #include "esp32h2/rtc.h"
#include "esp32h2/clk.h"
#include "esp32h2/rom/rtc.h" #include "esp32h2/rom/rtc.h"
#endif #endif

View File

@@ -31,6 +31,7 @@
#include "esp_private/pm_impl.h" #include "esp_private/pm_impl.h"
#include "esp_private/pm_trace.h" #include "esp_private/pm_trace.h"
#include "esp_private/esp_timer_private.h" #include "esp_private/esp_timer_private.h"
#include "esp_private/esp_clk.h"
#include "esp_sleep.h" #include "esp_sleep.h"
@@ -38,26 +39,20 @@
// [refactor-todo] opportunity for further refactor // [refactor-todo] opportunity for further refactor
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#include "esp32/pm.h" #include "esp32/pm.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#include "esp32s2/pm.h" #include "esp32s2/pm.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#include "esp32s3/pm.h" #include "esp32s3/pm.h"
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#include "esp32c3/pm.h" #include "esp32c3/pm.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#elif CONFIG_IDF_TARGET_ESP32H2 #elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#include "esp32h2/pm.h" #include "esp32h2/pm.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#elif CONFIG_IDF_TARGET_ESP8684 #elif CONFIG_IDF_TARGET_ESP8684
#include "esp_private/esp_clk.h"
#include "esp8684/pm.h" #include "esp8684/pm.h"
#include "driver/gpio.h" #include "driver/gpio.h"
#endif #endif

View File

@@ -14,22 +14,16 @@
#include "driver/rtc_io.h" #include "driver/rtc_io.h"
#include "soc/rtc_periph.h" #include "soc/rtc_periph.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
#include "esp_private/esp_clk.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#include "esp32/ulp.h" #include "esp32/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#include "esp32s2/ulp.h" #include "esp32s2/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#include "esp32s3/ulp.h" #include "esp32s3/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#endif #endif
TEST_CASE("Can dump power management lock stats", "[pm]") TEST_CASE("Can dump power management lock stats", "[pm]")

View File

@@ -11,6 +11,7 @@
#include "soc/i2s_reg.h" #include "soc/i2s_reg.h"
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "bootloader_clock.h" #include "bootloader_clock.h"
#include "hal/wdt_hal.h" #include "hal/wdt_hal.h"
@@ -18,7 +19,6 @@
#include "esp_log.h" #include "esp_log.h"
#include "esp32/clk.h"
#include "esp_rom_uart.h" #include "esp_rom_uart.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"

View File

@@ -11,7 +11,6 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp32c3/clk.h"
#include "esp_clk_internal.h" #include "esp_clk_internal.h"
#include "esp32c3/rom/ets_sys.h" #include "esp32c3/rom/ets_sys.h"
#include "esp32c3/rom/uart.h" #include "esp32c3/rom/uart.h"
@@ -24,6 +23,7 @@
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "hal/wdt_hal.h" #include "hal/wdt_hal.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "bootloader_clock.h" #include "bootloader_clock.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"
#include "esp_rom_uart.h" #include "esp_rom_uart.h"

View File

@@ -11,7 +11,6 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp32h2/clk.h"
#include "esp_clk_internal.h" #include "esp_clk_internal.h"
#include "esp32h2/rom/ets_sys.h" #include "esp32h2/rom/ets_sys.h"
#include "esp32h2/rom/uart.h" #include "esp32h2/rom/uart.h"
@@ -25,6 +24,7 @@
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "hal/wdt_hal.h" #include "hal/wdt_hal.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "bootloader_clock.h" #include "bootloader_clock.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"
#include "esp_rom_uart.h" #include "esp_rom_uart.h"

View File

@@ -12,7 +12,6 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp32s2/clk.h"
#include "esp_clk_internal.h" #include "esp_clk_internal.h"
#include "esp_rom_uart.h" #include "esp_rom_uart.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
@@ -25,6 +24,7 @@
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "hal/wdt_hal.h" #include "hal/wdt_hal.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "bootloader_clock.h" #include "bootloader_clock.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"
#include "hal/clk_gate_ll.h" #include "hal/clk_gate_ll.h"

View File

@@ -12,7 +12,6 @@
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp32s3/clk.h"
#include "esp_clk_internal.h" #include "esp_clk_internal.h"
#include "esp_rom_uart.h" #include "esp_rom_uart.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
@@ -25,6 +24,7 @@
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "hal/wdt_hal.h" #include "hal/wdt_hal.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "bootloader_clock.h" #include "bootloader_clock.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"

View File

@@ -51,6 +51,7 @@
#include "esp_private/pm_impl.h" #include "esp_private/pm_impl.h"
#include "esp_pthread.h" #include "esp_pthread.h"
#include "esp_vfs_console.h" #include "esp_vfs_console.h"
#include "esp_private/esp_clk.h"
#include "brownout.h" #include "brownout.h"
@@ -58,20 +59,11 @@
// [refactor-todo] make this file completely target-independent // [refactor-todo] make this file completely target-independent
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#include "esp32/spiram.h" #include "esp32/spiram.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#include "esp32s2/spiram.h" #include "esp32s2/spiram.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#include "esp32s3/spiram.h" #include "esp32s3/spiram.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#elif CONFIG_IDF_TARGET_ESP8684
#include "esp_private/esp_clk.h"
#endif #endif
/***********************************************/ /***********************************************/

View File

@@ -25,18 +25,7 @@
#include "esp_rom_uart.h" #include "esp_rom_uart.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
#include "esp_timer.h" #include "esp_timer.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#endif
#define ESP_EXT0_WAKEUP_LEVEL_LOW 0 #define ESP_EXT0_WAKEUP_LEVEL_LOW 0
#define ESP_EXT0_WAKEUP_LEVEL_HIGH 1 #define ESP_EXT0_WAKEUP_LEVEL_HIGH 1

View File

@@ -2,18 +2,7 @@
#include "unity.h" #include "unity.h"
#include "esp_private/system_internal.h" #include "esp_private/system_internal.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#endif
TEST_CASE("Test effect of rtc clk calibration compensation on system time", "[esp_system]") TEST_CASE("Test effect of rtc clk calibration compensation on system time", "[esp_system]")
{ {

View File

@@ -1,16 +1,8 @@
// Copyright 2017 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "sys/param.h" #include "sys/param.h"
#include "esp_timer_impl.h" #include "esp_timer_impl.h"
@@ -21,7 +13,7 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_intr_alloc.h" #include "esp_intr_alloc.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp32/clk.h" #include "esp_private/esp_clk.h"
#include "soc/frc_timer_reg.h" #include "soc/frc_timer_reg.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"

View File

@@ -13,7 +13,7 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_intr_alloc.h" #include "esp_intr_alloc.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp32/clk.h" #include "esp_private/esp_clk.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "soc/soc.h" #include "soc/soc.h"
#include "soc/timer_group_reg.h" #include "soc/timer_group_reg.h"

View File

@@ -31,12 +31,12 @@
#include "esp_private/wifi_os_adapter.h" #include "esp_private/wifi_os_adapter.h"
#include "esp_private/wifi.h" #include "esp_private/wifi.h"
#include "esp_phy_init.h" #include "esp_phy_init.h"
#include "esp32c3/clk.h"
#include "soc/rtc_cntl_reg.h" #include "soc/rtc_cntl_reg.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"
#include "phy_init_data.h" #include "phy_init_data.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "nvs.h" #include "nvs.h"
#include "os.h" #include "os.h"
#include "esp_smartconfig.h" #include "esp_smartconfig.h"

View File

@@ -30,13 +30,13 @@
#include "esp_private/wifi_os_adapter.h" #include "esp_private/wifi_os_adapter.h"
#include "esp_private/wifi.h" #include "esp_private/wifi.h"
#include "esp_phy_init.h" #include "esp_phy_init.h"
#include "esp32s2/clk.h"
#include "soc/dport_reg.h" #include "soc/dport_reg.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"
#include "hal/interrupt_controller_hal.h" #include "hal/interrupt_controller_hal.h"
#include "phy_init_data.h" #include "phy_init_data.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "nvs.h" #include "nvs.h"
#include "os.h" #include "os.h"
#include "esp_smartconfig.h" #include "esp_smartconfig.h"

View File

@@ -30,13 +30,13 @@
#include "esp_private/wifi_os_adapter.h" #include "esp_private/wifi_os_adapter.h"
#include "esp_private/wifi.h" #include "esp_private/wifi.h"
#include "esp_phy_init.h" #include "esp_phy_init.h"
#include "esp32s3/clk.h"
#include "soc/rtc_cntl_reg.h" #include "soc/rtc_cntl_reg.h"
#include "soc/rtc.h" #include "soc/rtc.h"
#include "soc/syscon_reg.h" #include "soc/syscon_reg.h"
#include "hal/interrupt_controller_hal.h" #include "hal/interrupt_controller_hal.h"
#include "phy_init_data.h" #include "phy_init_data.h"
#include "esp_private/periph_ctrl.h" #include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "nvs.h" #include "nvs.h"
#include "os.h" #include "os.h"
#include "esp_smartconfig.h" #include "esp_smartconfig.h"

View File

@@ -35,13 +35,7 @@ that are implemented in C.
#include "xtensa_rtos.h" #include "xtensa_rtos.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#if CONFIG_IDF_TARGET_ESP32 #include "esp_private/esp_clk.h"
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#endif
#ifdef XT_RTOS_TIMER_INT #ifdef XT_RTOS_TIMER_INT

View File

@@ -11,14 +11,7 @@
#include "ccomp_timer.h" #include "ccomp_timer.h"
#include "esp_heap_caps.h" #include "esp_heap_caps.h"
#include "idf_performance.h" #include "idf_performance.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#endif
#include "soc/soc_caps.h" #include "soc/soc_caps.h"

View File

@@ -15,6 +15,7 @@
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
#include "esp_private/system_internal.h" #include "esp_private/system_internal.h"
#include "esp_private/esp_clk.h"
#include "esp_time_impl.h" #include "esp_time_impl.h"
@@ -22,27 +23,21 @@
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/rtc.h" #include "esp32/rom/rtc.h"
#include "esp32/clk.h"
#include "esp32/rtc.h" #include "esp32/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/rtc.h" #include "esp32s2/rom/rtc.h"
#include "esp32s2/clk.h"
#include "esp32s2/rtc.h" #include "esp32s2/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/rom/rtc.h" #include "esp32s3/rom/rtc.h"
#include "esp32s3/clk.h"
#include "esp32s3/rtc.h" #include "esp32s3/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/rtc.h" #include "esp32c3/rom/rtc.h"
#include "esp32c3/clk.h"
#include "esp32c3/rtc.h" #include "esp32c3/rtc.h"
#elif CONFIG_IDF_TARGET_ESP32H2 #elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/rom/rtc.h" #include "esp32h2/rom/rtc.h"
#include "esp32h2/clk.h"
#include "esp32h2/rtc.h" #include "esp32h2/rtc.h"
#elif CONFIG_IDF_TARGET_ESP8684 #elif CONFIG_IDF_TARGET_ESP8684
#include "esp8684/rom/rtc.h" #include "esp8684/rom/rtc.h"
#include "esp_private/esp_clk.h"
#include "esp8684/rtc.h" #include "esp8684/rtc.h"
#endif #endif

View File

@@ -21,29 +21,24 @@
#include "../priv_include/esp_time_impl.h" #include "../priv_include/esp_time_impl.h"
#include "esp_private/system_internal.h" #include "esp_private/system_internal.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#include "esp32/rtc.h" #include "esp32/rtc.h"
#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ #define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#include "esp32s2/rtc.h" #include "esp32s2/rtc.h"
#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ #define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#include "esp32s3/rtc.h" #include "esp32s3/rtc.h"
#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ #define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#include "esp32c3/rtc.h" #include "esp32c3/rtc.h"
#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ #define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ
#elif CONFIG_IDF_TARGET_ESP32H2 #elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#include "esp32h2/rtc.h" #include "esp32h2/rtc.h"
#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32H2_DEFAULT_CPU_FREQ_MHZ #define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP32H2_DEFAULT_CPU_FREQ_MHZ
#elif CONFIG_IDF_TARGET_ESP8684 #elif CONFIG_IDF_TARGET_ESP8684
#include "esp_private/esp_clk.h"
#define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP8684_DEFAULT_CPU_FREQ_MHZ #define TARGET_DEFAULT_CPU_FREQ_MHZ CONFIG_ESP8684_DEFAULT_CPU_FREQ_MHZ
#endif #endif

View File

@@ -21,34 +21,28 @@
#include "esp_log.h" #include "esp_log.h"
#include "esp_private/system_internal.h" #include "esp_private/system_internal.h"
#include "esp_private/spi_flash_os.h" #include "esp_private/spi_flash_os.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/cache.h" #include "esp32/rom/cache.h"
#include "esp32/rom/spi_flash.h" #include "esp32/rom/spi_flash.h"
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/cache.h" #include "esp32s2/rom/cache.h"
#include "esp32s2/rom/spi_flash.h" #include "esp32s2/rom/spi_flash.h"
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "soc/spi_mem_reg.h" #include "soc/spi_mem_reg.h"
#include "esp32s3/rom/spi_flash.h" #include "esp32s3/rom/spi_flash.h"
#include "esp32s3/rom/opi_flash.h" #include "esp32s3/rom/opi_flash.h"
#include "esp32s3/rom/cache.h" #include "esp32s3/rom/cache.h"
#include "esp32s3/clk.h"
#include "esp32s3/clk.h"
#include "esp32s3/opi_flash_private.h" #include "esp32s3/opi_flash_private.h"
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/cache.h" #include "esp32c3/rom/cache.h"
#include "esp32c3/rom/spi_flash.h" #include "esp32c3/rom/spi_flash.h"
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2 #elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/rom/cache.h" #include "esp32h2/rom/cache.h"
#include "esp32h2/rom/spi_flash.h" #include "esp32h2/rom/spi_flash.h"
#include "esp32h2/clk.h"
#elif CONFIG_IDF_TARGET_ESP8684 #elif CONFIG_IDF_TARGET_ESP8684
#include "esp8684/rom/cache.h" #include "esp8684/rom/cache.h"
#include "esp8684/rom/spi_flash.h" #include "esp8684/rom/spi_flash.h"
#include "esp_private/esp_clk.h"
#endif #endif
#include "esp_flash_partitions.h" #include "esp_flash_partitions.h"
#include "cache_utils.h" #include "cache_utils.h"

View File

@@ -1,16 +1,8 @@
// Copyright 2010-2016 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2010-2021 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -19,14 +11,12 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_err.h" #include "esp_err.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#include "esp32/ulp.h" #include "esp32/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#include "esp32s2/ulp.h" #include "esp32s2/ulp.h"
#elif CONFIG_IDF_TARGET_ESP32S3 #elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#include "esp32s3/ulp.h" #include "esp32s3/ulp.h"
#endif #endif

View File

@@ -1,16 +1,8 @@
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -19,7 +11,7 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_err.h" #include "esp_err.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp32s2/clk.h" #include "esp_private/esp_clk.h"
#include "esp32s2/ulp.h" #include "esp32s2/ulp.h"
#include "esp32s2/ulp_riscv.h" #include "esp32s2/ulp_riscv.h"
#include "soc/soc.h" #include "soc/soc.h"

View File

@@ -9,19 +9,7 @@
#include "soc/cpu.h" #include "soc/cpu.h"
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "esp_rom_uart.h" #include "esp_rom_uart.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#elif CONFIG_IDF_TARGET_ESP8684
#include "esp_private/esp_clk.h" #include "esp_private/esp_clk.h"
#endif
static uint32_t s_test_start, s_test_stop; static uint32_t s_test_start, s_test_stop;

View File

@@ -948,7 +948,6 @@ components/esp_system/test_eh_frame_parser/linker.ld
components/esp_system/test_eh_frame_parser/main.c components/esp_system/test_eh_frame_parser/main.c
components/esp_system/ubsan.c components/esp_system/ubsan.c
components/esp_timer/include/esp_private/esp_timer_private.h components/esp_timer/include/esp_private/esp_timer_private.h
components/esp_timer/src/esp_timer_impl_frc_legacy.c
components/esp_timer/src/ets_timer_legacy.c components/esp_timer/src/ets_timer_legacy.c
components/esp_timer/test/test_esp_timer.c components/esp_timer/test/test_esp_timer.c
components/esp_timer/test/test_esp_timer_light_sleep.c components/esp_timer/test/test_esp_timer_light_sleep.c
@@ -2365,10 +2364,8 @@ components/ulp/test/esp32/test_ulp.c
components/ulp/test/esp32/test_ulp_as.c components/ulp/test/esp32/test_ulp_as.c
components/ulp/test/esp32s2/test_ulp_riscv.c components/ulp/test/esp32s2/test_ulp_riscv.c
components/ulp/test/ulp_riscv/test_main.c components/ulp/test/ulp_riscv/test_main.c
components/ulp/ulp.c
components/ulp/ulp_macro.c components/ulp/ulp_macro.c
components/ulp/ulp_private.h components/ulp/ulp_private.h
components/ulp/ulp_riscv.c
components/ulp/ulp_riscv/include/ulp_riscv/ulp_riscv.h components/ulp/ulp_riscv/include/ulp_riscv/ulp_riscv.h
components/ulp/ulp_riscv/include/ulp_riscv/ulp_riscv_gpio.h components/ulp/ulp_riscv/include/ulp_riscv/ulp_riscv_gpio.h
components/ulp/ulp_riscv/include/ulp_riscv/ulp_riscv_register_ops.h components/ulp/ulp_riscv/include/ulp_riscv/ulp_riscv_register_ops.h
@@ -3649,8 +3646,6 @@ tools/test_idf_size/test_idf_size.py
tools/test_mkdfu/test_mkdfu.py tools/test_mkdfu/test_mkdfu.py
tools/test_mkuf2/test_mkuf2.py tools/test_mkuf2/test_mkuf2.py
tools/unit-test-app/components/test_utils/ccomp_timer.c tools/unit-test-app/components/test_utils/ccomp_timer.c
tools/unit-test-app/components/test_utils/ccomp_timer_impl_riscv.c
tools/unit-test-app/components/test_utils/ccomp_timer_impl_xtensa.c
tools/unit-test-app/components/test_utils/include/ccomp_timer.h tools/unit-test-app/components/test_utils/include/ccomp_timer.h
tools/unit-test-app/components/test_utils/include/test_utils.h tools/unit-test-app/components/test_utils/include/test_utils.h
tools/unit-test-app/components/test_utils/private_include/ccomp_timer_impl.h tools/unit-test-app/components/test_utils/private_include/ccomp_timer_impl.h

View File

@@ -1,16 +1,8 @@
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdint.h> #include <stdint.h>
#include "freertos/portmacro.h" #include "freertos/portmacro.h"
@@ -18,12 +10,7 @@
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
#include "hal/cpu_hal.h" #include "hal/cpu_hal.h"
#include "esp_rom_sys.h" #include "esp_rom_sys.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32H2
#include "esp32h2/clk.h"
#endif
typedef enum { typedef enum {
PERF_TIMER_UNINIT = 0, // timer has not been initialized yet PERF_TIMER_UNINIT = 0, // timer has not been initialized yet

View File

@@ -1,16 +1,8 @@
// Copyright 2019 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
@@ -26,14 +18,7 @@
#include "xtensa/core-macros.h" #include "xtensa/core-macros.h"
#include "xtensa/xt_perf_consts.h" #include "xtensa/xt_perf_consts.h"
#include "xtensa-debug-module.h" #include "xtensa-debug-module.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S3
#include "esp32s3/clk.h"
#endif
#define D_STALL_COUNTER_ID 0 #define D_STALL_COUNTER_ID 0
#define I_STALL_COUNTER_ID 1 #define I_STALL_COUNTER_ID 1

View File

@@ -7,17 +7,7 @@
#include "ccomp_timer.h" #include "ccomp_timer.h"
#include "freertos/FreeRTOS.h" #include "freertos/FreeRTOS.h"
#include "freertos/task.h" #include "freertos/task.h"
#include "esp_private/esp_clk.h"
#if CONFIG_IDF_TARGET_ESP32
#include "esp32/clk.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/clk.h"
#elif CONFIG_IDF_TARTGET_ESP32S3
#include "esp32s3/clk.h"
#elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/clk.h"
#endif
#include "unity.h" #include "unity.h"