2023-10-19 02:38:32 -04:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
return() # This component is not supported by the POSIX/Linux simulator
|
|
|
|
endif()
|
|
|
|
|
2023-11-13 22:14:34 -05:00
|
|
|
set(srcs "")
|
2023-10-19 02:38:32 -04:00
|
|
|
|
|
|
|
set(public_include "include")
|
|
|
|
|
|
|
|
if(CONFIG_SOC_GPSPI_SUPPORTED)
|
|
|
|
list(APPEND srcs "src/gpspi/spi_common.c"
|
|
|
|
"src/gpspi/spi_master.c"
|
2023-10-18 05:25:20 -04:00
|
|
|
"src/gpspi/spi_slave.c"
|
|
|
|
"src/gpspi/spi_dma.c")
|
2023-10-19 02:38:32 -04:00
|
|
|
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"
|
|
|
|
)
|