2024-04-08 12:08:23 +00:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
2023-11-16 07:17:04 +00:00
|
|
|
set(srcs)
|
|
|
|
|
|
|
|
set(public_include "include")
|
|
|
|
|
|
|
|
if(CONFIG_SOC_GPSPI_SUPPORTED)
|
|
|
|
list(APPEND srcs "src/sdspi_crc.c"
|
|
|
|
"src/sdspi_host.c"
|
|
|
|
"src/sdspi_transaction.c")
|
|
|
|
endif()
|
|
|
|
|
2024-04-08 12:08:23 +00:00
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
set(requires "")
|
|
|
|
set(priv_requires esp_timer)
|
|
|
|
else()
|
|
|
|
set(requires sdmmc esp_driver_spi esp_driver_gpio)
|
|
|
|
set(priv_requires esp_timer)
|
|
|
|
endif()
|
|
|
|
|
2023-11-16 07:17:04 +00:00
|
|
|
idf_component_register(SRCS ${srcs}
|
|
|
|
INCLUDE_DIRS ${public_include}
|
2024-04-08 12:08:23 +00:00
|
|
|
REQUIRES "${requires}"
|
|
|
|
PRIV_REQUIRES "${priv_requires}"
|
2023-11-16 07:17:04 +00:00
|
|
|
)
|