2023-11-07 08:06:07 -05:00
|
|
|
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(include "include")
|
|
|
|
|
|
|
|
# I2S related source files
|
|
|
|
if(CONFIG_SOC_I2S_SUPPORTED)
|
|
|
|
list(APPEND srcs "i2s_common.c"
|
|
|
|
"i2s_std.c")
|
|
|
|
if(CONFIG_SOC_I2S_SUPPORTS_PDM)
|
|
|
|
list(APPEND srcs "i2s_pdm.c")
|
|
|
|
endif()
|
|
|
|
if(CONFIG_SOC_I2S_SUPPORTS_TDM)
|
|
|
|
list(APPEND srcs "i2s_tdm.c")
|
|
|
|
endif()
|
2024-07-09 07:44:52 -04:00
|
|
|
if(CONFIG_SOC_I2S_SUPPORTS_ETM)
|
|
|
|
list(APPEND srcs "i2s_etm.c")
|
|
|
|
endif()
|
2023-11-07 08:06:07 -05:00
|
|
|
endif()
|
|
|
|
|
2024-07-03 03:39:23 -04:00
|
|
|
if(CONFIG_SOC_I2S_SUPPORTED OR CONFIG_SOC_LP_I2S_SUPPORTED)
|
|
|
|
list(APPEND srcs "i2s_platform.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_LP_I2S_SUPPORTED)
|
|
|
|
list(APPEND srcs "lp_i2s.c" "lp_i2s_std.c" "lp_i2s_pdm.c")
|
|
|
|
endif()
|
|
|
|
|
2023-11-07 08:06:07 -05:00
|
|
|
idf_component_register(SRCS ${srcs}
|
|
|
|
INCLUDE_DIRS ${include}
|
|
|
|
PRIV_REQUIRES esp_driver_gpio esp_pm esp_mm
|
|
|
|
)
|