mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
30 lines
633 B
CMake
30 lines
633 B
CMake
idf_build_get_property(target IDF_TARGET)
|
|
|
|
set(srcs)
|
|
set(includes "include")
|
|
|
|
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
|
|
list(APPEND includes "${target}/include")
|
|
endif()
|
|
|
|
if(CONFIG_SOC_GPSPI_SUPPORTED)
|
|
list(APPEND srcs
|
|
"${target}/spi_periph.c"
|
|
"spi_hal.c"
|
|
"spi_hal_iram.c"
|
|
"spi_slave_hal.c"
|
|
"spi_slave_hal_iram.c"
|
|
)
|
|
|
|
if(CONFIG_SOC_SPI_SUPPORT_SLAVE_HD_VER2)
|
|
list(APPEND srcs "spi_slave_hd_hal.c")
|
|
endif()
|
|
endif()
|
|
|
|
idf_component_register(
|
|
SRCS ${srcs}
|
|
INCLUDE_DIRS ${includes}
|
|
REQUIRES soc hal esp_hal_dma
|
|
PRIV_REQUIRES esp_hal_gpio
|
|
)
|