From 5e8799bbfec085683bd3bccdfcd35e9564189586 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Tue, 26 Jan 2021 12:54:26 +0800 Subject: [PATCH] esp_common: move some headers --- components/bootloader/subproject/CMakeLists.txt | 1 + components/driver/CMakeLists.txt | 4 ++-- components/esp32/CMakeLists.txt | 2 +- .../include/esp_private/crosscore_int.h | 7 +++++++ .../include/esp_private/system_internal.h | 0 components/{esp_common => esp_system}/include/esp_task.h | 0 6 files changed, 11 insertions(+), 3 deletions(-) rename components/{esp_common => esp_hw_support}/include/esp_private/crosscore_int.h (96%) rename components/{esp_common => esp_system}/include/esp_private/system_internal.h (100%) rename components/{esp_common => esp_system}/include/esp_task.h (100%) diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index 2c507035c7..222aad9f2d 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -19,6 +19,7 @@ set(COMPONENTS bootloader esptool_py esp_hw_support + esp_system hal partition_table soc diff --git a/components/driver/CMakeLists.txt b/components/driver/CMakeLists.txt index 8e68bb570e..df392d00b2 100644 --- a/components/driver/CMakeLists.txt +++ b/components/driver/CMakeLists.txt @@ -75,8 +75,8 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS ${includes} PRIV_INCLUDE_DIRS "include/driver" - PRIV_REQUIRES efuse esp_pm esp_timer esp_ipc - REQUIRES esp_ringbuf freertos soc hal esp_hw_support) + PRIV_REQUIRES efuse esp_timer esp_ipc + REQUIRES esp_pm esp_ringbuf freertos soc hal esp_hw_support) # (REQUIRES cannot hide soc headers, since many arguments in the driver headers are chip-dependent) # uses C11 atomic feature diff --git a/components/esp32/CMakeLists.txt b/components/esp32/CMakeLists.txt index b805a5c539..de64b5f8fa 100644 --- a/components/esp32/CMakeLists.txt +++ b/components/esp32/CMakeLists.txt @@ -30,7 +30,7 @@ else() # app_update is added here because cpu_start.c uses esp_ota_get_app_description() function. # esp_timer is added here because cpu_start.c uses esp_timer set(priv_requires app_trace app_update bootloader_support esp_system log mbedtls nvs_flash pthread - spi_flash vfs espcoredump esp_common perfmon esp_timer esp_ipc) + spi_flash vfs espcoredump esp_common perfmon esp_timer esp_ipc esp_pm) set(fragments linker.lf ld/esp32_fragments.lf) idf_component_register(SRCS "${srcs}" diff --git a/components/esp_common/include/esp_private/crosscore_int.h b/components/esp_hw_support/include/esp_private/crosscore_int.h similarity index 96% rename from components/esp_common/include/esp_private/crosscore_int.h rename to components/esp_hw_support/include/esp_private/crosscore_int.h index e6f7801767..bac4afba29 100644 --- a/components/esp_common/include/esp_private/crosscore_int.h +++ b/components/esp_hw_support/include/esp_private/crosscore_int.h @@ -14,6 +14,9 @@ #ifndef __ESP_CROSSCORE_INT_H #define __ESP_CROSSCORE_INT_H +#ifdef __cplusplus +extern "C" { +#endif /** * Initialize the crosscore interrupt system for this CPU. @@ -61,4 +64,8 @@ void esp_crosscore_int_send_freq_switch(int core_id); */ void esp_crosscore_int_send_print_backtrace(int core_id); +#ifdef __cplusplus +} +#endif + #endif diff --git a/components/esp_common/include/esp_private/system_internal.h b/components/esp_system/include/esp_private/system_internal.h similarity index 100% rename from components/esp_common/include/esp_private/system_internal.h rename to components/esp_system/include/esp_private/system_internal.h diff --git a/components/esp_common/include/esp_task.h b/components/esp_system/include/esp_task.h similarity index 100% rename from components/esp_common/include/esp_task.h rename to components/esp_system/include/esp_task.h