mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
52e3f09b32
Common spi functionality for sharing the SPI bus between modules is moved from esp_driver_spi to a more fitting location in esp_hw_support (shared HW resource control). This also allows us to decouple the spi_flash driver from esp_driver_spi, removing esp_driver_spi and esp_ringbuf from G1 builds.
27 lines
763 B
CMake
27 lines
763 B
CMake
idf_build_get_property(target IDF_TARGET)
|
|
|
|
if(${target} STREQUAL "linux")
|
|
return() # This component is not supported by the POSIX/Linux simulator
|
|
endif()
|
|
|
|
set(srcs "")
|
|
|
|
set(public_include "include")
|
|
|
|
if(CONFIG_SOC_GPSPI_SUPPORTED)
|
|
list(APPEND srcs "src/gpspi/spi_common.c"
|
|
"src/gpspi/spi_master.c"
|
|
"src/gpspi/spi_slave.c")
|
|
endif()
|
|
|
|
if(CONFIG_SOC_SPI_SUPPORT_SLAVE_HD_VER2)
|
|
list(APPEND srcs "src/gpspi/spi_slave_hd.c")
|
|
endif()
|
|
|
|
idf_component_register(SRCS ${srcs}
|
|
INCLUDE_DIRS ${public_include}
|
|
REQUIRES esp_pm
|
|
PRIV_REQUIRES esp_timer esp_mm esp_driver_gpio esp_ringbuf
|
|
LDFRAGMENTS "linker.lf"
|
|
)
|