diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index bd852ac774..de887b864e 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -5,16 +5,24 @@ if(${target} STREQUAL "esp32") list(APPEND requires efuse) endif() +set(priv_requires efuse) + set(srcs "compare_set.c" "cpu_util.c") if(NOT BOOTLOADER_BUILD) - list(APPEND srcs "esp_async_memcpy.c" "esp_clk.c" "clk_ctrl_os.c" "mac_addr.c" "hw_random.c") + list(APPEND srcs "esp_async_memcpy.c" + "esp_clk.c" + "clk_ctrl_os.c" + "hw_random.c" + "intr_alloc.c" + "mac_addr.c") + list(APPEND priv_requires esp_ipc) endif() idf_component_register(SRCS ${srcs} INCLUDE_DIRS include include/soc PRIV_INCLUDE_DIRS port/include REQUIRES ${requires} - PRIV_REQUIRES efuse + PRIV_REQUIRES ${priv_requires} LDFRAGMENTS linker.lf) idf_build_get_property(target IDF_TARGET) diff --git a/components/esp_hw_support/component.mk b/components/esp_hw_support/component.mk index cf003aa577..8f806b7dd4 100644 --- a/components/esp_hw_support/component.mk +++ b/components/esp_hw_support/component.mk @@ -5,7 +5,7 @@ COMPONENT_ADD_LDFRAGMENTS := linker.lf port/$(IDF_TARGET)/rtc_clk.o: CFLAGS += -fno-jump-tables -fno-tree-switch-conversion ifdef IS_BOOTLOADER_BUILD -COMPONENT_OBJEXCLUDE += clk_ctrl_os.o mac_addr.o esp_async_memcpy.o +COMPONENT_OBJEXCLUDE += clk_ctrl_os.o mac_addr.o esp_async_memcpy.o intr_alloc.o endif COMPONENT_OBJEXCLUDE += esp_async_memcpy.o diff --git a/components/esp_system/include/esp_intr_alloc.h b/components/esp_hw_support/include/esp_intr_alloc.h similarity index 100% rename from components/esp_system/include/esp_intr_alloc.h rename to components/esp_hw_support/include/esp_intr_alloc.h diff --git a/components/esp_system/intr_alloc.c b/components/esp_hw_support/intr_alloc.c similarity index 100% rename from components/esp_system/intr_alloc.c rename to components/esp_hw_support/intr_alloc.c diff --git a/components/esp_system/test/test_intr_alloc.c b/components/esp_hw_support/test/test_intr_alloc.c similarity index 100% rename from components/esp_system/test/test_intr_alloc.c rename to components/esp_hw_support/test/test_intr_alloc.c diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index fcb155d09f..76295238be 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -13,7 +13,6 @@ else() list(APPEND srcs "crosscore_int.c" "esp_err.c" "freertos_hooks.c" - "intr_alloc.c" "int_wdt.c" "panic.c" "esp_system.c" @@ -33,7 +32,7 @@ else() # [refactor-todo] requirements due to init code, # should be removable once using component init functions # link-time registration is used. - esp_pm app_update nvs_flash pthread app_trace esp_gdbstub esp_ipc + esp_pm app_update nvs_flash pthread app_trace esp_gdbstub espcoredump LDFRAGMENTS "linker.lf" "app.lf") add_subdirectory(port) diff --git a/docs/doxygen/Doxyfile_common b/docs/doxygen/Doxyfile_common index 78b359af87..cdad9d3830 100644 --- a/docs/doxygen/Doxyfile_common +++ b/docs/doxygen/Doxyfile_common @@ -228,7 +228,7 @@ INPUT = \ $(IDF_PATH)/components/heap/include/esp_heap_caps_init.h \ $(IDF_PATH)/components/heap/include/multi_heap.h \ ## Interrupt Allocation - $(IDF_PATH)/components/esp_system/include/esp_intr_alloc.h \ + $(IDF_PATH)/components/esp_hw_support/include/esp_intr_alloc.h \ ## Watchdogs ## NOTE: for two lines below header_file.inc is not used $(IDF_PATH)/components/esp_system/include/esp_int_wdt.h \ diff --git a/docs/en/api-reference/peripherals/i2c.rst b/docs/en/api-reference/peripherals/i2c.rst index 083f864036..6830dacdb5 100644 --- a/docs/en/api-reference/peripherals/i2c.rst +++ b/docs/en/api-reference/peripherals/i2c.rst @@ -158,7 +158,7 @@ After the I2C driver is configured, install it by calling the function :cpp:func - Port number, one of the two port numbers from :cpp:type:`i2c_port_t` - Master or slave, selected from :cpp:type:`i2c_mode_t` - (Slave only) Size of buffers to allocate for sending and receiving data. As I2C is a master-centric bus, data can only go from the slave to the master at the master's request. Therefore, the slave will usually have a send buffer where the slave application writes data. The data remains in the send buffer to be read by the master at the master's own discretion. -- Flags for allocating the interrupt (see ESP_INTR_FLAG_* values in :component_file:`esp_system/include/esp_intr_alloc.h`) +- Flags for allocating the interrupt (see ESP_INTR_FLAG_* values in :component_file:`esp_hw_support/include/esp_intr_alloc.h`) .. _i2c-api-master-mode: diff --git a/docs/zh_CN/api-reference/peripherals/i2c.rst b/docs/zh_CN/api-reference/peripherals/i2c.rst index ef8e738cf4..f60e0af384 100644 --- a/docs/zh_CN/api-reference/peripherals/i2c.rst +++ b/docs/zh_CN/api-reference/peripherals/i2c.rst @@ -75,7 +75,7 @@ I2C 驱动程序管理在 I2C 总线上设备的通信,该驱动程序具备 - 端口号,从 :cpp:type:`i2c_port_t` 中二选一 - 主机或从机模式,从 :cpp:type:`i2c_mode_t` 中选择 - (仅限从机模式)分配用于在从机模式下发送和接收数据的缓存区大小。I2C 是一个以主机为中心的总线,数据只能根据主机的请求从从机传输到主机。因此,从机通常有一个发送缓存区,供从应用程序写入数据使用。数据保留在发送缓存区中,由主机自行读取。 -- 用于分配中断的标志(请参考 ESP_INTR_FLAG_* values in :component_file:`esp_system/include/esp_intr_alloc.h`) +- 用于分配中断的标志(请参考 ESP_INTR_FLAG_* values in :component_file:`esp_hw_support/include/esp_intr_alloc.h`) .. _i2c-api-master-mode: