From 226370a077f62efe5316be4b3b2cb756feecf504 Mon Sep 17 00:00:00 2001 From: HendrikRauh <114620133+HendrikRauh@users.noreply.github.com> Date: Fri, 20 Mar 2026 22:55:55 +0100 Subject: [PATCH] refactor: format CMakeLists.txt for better readability and add documentation comments in dmx.h --- components/dmx/CMakeLists.txt | 9 ++++++++- components/dmx/include/dmx.h | 10 ++++++++++ components/dmx/src/dmx.c | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/components/dmx/CMakeLists.txt b/components/dmx/CMakeLists.txt index a483df2..18becaa 100644 --- a/components/dmx/CMakeLists.txt +++ b/components/dmx/CMakeLists.txt @@ -1 +1,8 @@ -idf_component_register(SRCS "src/dmx.c" INCLUDE_DIRS "include" REQUIRES logger esp_dmx) +idf_component_register( + SRCS + "src/dmx.c" + INCLUDE_DIRS + "include" + REQUIRES + logger + esp_dmx) diff --git a/components/dmx/include/dmx.h b/components/dmx/include/dmx.h index 5e8c371..dac038d 100644 --- a/components/dmx/include/dmx.h +++ b/components/dmx/include/dmx.h @@ -6,8 +6,18 @@ extern "C" { #endif +/** + * @brief Initialize the DMX interface. + * @param port The DMX port to initialize. + * @param pin_tx The pin for TX of the RS485. + * @param pin_rx The pin for RX of the RS485. + */ void init_dmx(dmx_port_t port, int pin_tx, int pin_rx); +/** + * @brief Send some test DMX data on the specified port. + * @param port The DMX port to send data on. + */ void send_dmx(dmx_port_t port); #ifdef __cplusplus diff --git a/components/dmx/src/dmx.c b/components/dmx/src/dmx.c index 7e4096d..3dd1c12 100644 --- a/components/dmx/src/dmx.c +++ b/components/dmx/src/dmx.c @@ -1,4 +1,4 @@ -#define LOG_TAG "DMX" +#define LOG_TAG "DMX" ///< "DMX" log tag for this file #include