Refactor and update the relay_chn component.
Refactor relay channel component to support single and multi-channel modes; update CMake configuration and enhance API documentation.
This commit is contained in:
@@ -1,4 +1,21 @@
|
||||
idf_component_register(SRCS "src/relay_chn.c"
|
||||
INCLUDE_DIRS include
|
||||
REQUIRES driver
|
||||
PRIV_REQUIRES esp_timer esp_event)
|
||||
set(include_dirs "include")
|
||||
set(priv_include_dirs "private_include")
|
||||
|
||||
set(srcs "src/relay_chn_core.c"
|
||||
"src/relay_chn_output.c"
|
||||
"src/relay_chn_run_info.c")
|
||||
|
||||
if(CONFIG_RELAY_CHN_ENABLE_TILTING)
|
||||
list(APPEND srcs "src/relay_chn_tilt.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_RELAY_CHN_COUNT GREATER 1)
|
||||
list(APPEND srcs "src/relay_chn_ctl_multi.c")
|
||||
else()
|
||||
list(APPEND srcs "src/relay_chn_ctl_single.c")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${include_dirs}
|
||||
PRIV_INCLUDE_DIRS ${priv_include_dirs}
|
||||
REQUIRES driver esp_timer esp_event)
|
||||
|
||||
Reference in New Issue
Block a user