/* * SPDX-FileCopyrightText: 2025 Kozmotronik Tech * * SPDX-License-Identifier: MIT */ #pragma once #include "relay_chn_priv_types.h" #ifdef __cplusplus extern "C" { #endif /** * @brief Initialize relay channel tilt controls. * * Sets up tilt functionality for relay channels including timers. * Must be called before using any other tilt functions. * * @param[in] chn_ctls Array of relay channel control structures. * * @return ESP_OK on success, error code otherwise. */ esp_err_t relay_chn_tilt_init(relay_chn_ctl_t *chn_ctls); /** * @brief Deinitialize relay channel tilt controls. * * Cleans up tilt resources including timers. * Should be called when tilt functionality is no longer needed. */ void relay_chn_tilt_deinit(void); /** * @brief Dispatch a tilt command to a relay channel. * * Queues a tilt command for execution on the specified channel. * * @param[in] tilt_ctl Pointer to tilt control structure. * @param[in] cmd Tilt command to execute. * * @return ESP_OK on success, error code otherwise. */ esp_err_t relay_chn_tilt_dispatch_cmd(relay_chn_tilt_ctl_t *tilt_ctl, relay_chn_tilt_cmd_t cmd); /** * @brief Reset tilt counters for a relay channel. * * Resets both forward and reverse tilt counters to zero. * * @param[in] tilt_ctl Pointer to tilt control structure. */ void relay_chn_tilt_reset_count(relay_chn_tilt_ctl_t *tilt_ctl); #ifdef __cplusplus } #endif