General code and comment cleanup

This commit is contained in:
2025-09-04 16:59:00 +03:00
parent 7244b57061
commit bf5e3a4426
25 changed files with 213 additions and 218 deletions

View File

@@ -6,7 +6,7 @@
* One relay channel consists of 2 output relays, hence 2 GPIO pins are required for each relay channel.
* This module provides an API to control the relay channels, specifically to drive bipolar motors.
* It also provides APIs to control the direction of the relay channel, bipolar motors in mind.
* To prevent mechanical strain on the motor, the component automatically manages direction changes
* To prevent mechanical strain on the motor, the component automatically manages direction changes
* with a configurable inertia delay, protecting it from abrupt reversals.
* The STOP command overrides any other command and clears the pending command if any.
*/
@@ -45,7 +45,7 @@ void relay_chn_destroy(void);
/**
* @brief Register a channel state change listener.
*
*
* @param listener A function that implements relay_chn_state_listener_t interface.
*
* @return
@@ -58,7 +58,7 @@ esp_err_t relay_chn_register_listener(relay_chn_state_listener_t listener);
/**
* @brief Unregister a channel state change listener.
*
*
* @param listener A function that implements relay_chn_state_listener_t interface.
*/
void relay_chn_unregister_listener(relay_chn_state_listener_t listener);
@@ -151,8 +151,8 @@ void relay_chn_ctl_run_reverse_all(void);
/**
* @brief Stops the relay channel specified by the channel ID.
*
* This function stops the operation of the relay channel identified by the
* provided channel ID. It is typically used to turn off or disable the relay
* This function stops the operation of the relay channel identified by the
* provided channel ID. It is typically used to turn off or disable the relay
* channel.
*
* @param chn_id The ID of the relay channel to stop.
@@ -162,7 +162,7 @@ void relay_chn_stop(uint8_t chn_id);
/**
* @brief Commands all configured relay channels to stop.
*
* This function iterates through all configured relay channels and issues a command
* This function iterates through all configured relay channels and issues a command
* to each to stop any ongoing movement.
*/
void relay_chn_ctl_stop_all(void);
@@ -181,7 +181,7 @@ void relay_chn_flip_direction(uint8_t chn_id);
/**
* @brief Flips the logical direction of all configured relay channels.
*
* This function iterates through all configured relay channels and swaps the
* This function iterates through all configured relay channels and swaps the
* physical GPIO pins assigned to the forward and reverse directions for each.
*/
void relay_chn_ctl_flip_direction_all(void);
@@ -215,7 +215,7 @@ esp_err_t relay_chn_ctl_get_direction_all(relay_chn_direction_t *directions);
* @brief Get the run limit for the specified channel
*
* @param chn_id The ID of the relay channel to query.
*
*
* @return The run limit value for the relevant channel if the channel ID is valid.
* 0 if the channel ID is invalid.
*/
@@ -235,8 +235,8 @@ esp_err_t relay_chn_ctl_get_run_limit_all(uint16_t *limits_sec);
/**
* @brief Set the run limit for the specified channel
*
* Sets the time limit in seconds for the specified channel. It will not proceed
*
* Sets the time limit in seconds for the specified channel. It will not proceed
* if the channel ID is invalid.
* If the limit_sec value is lesser than the CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC,
* the value will be set to CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC.
@@ -358,8 +358,8 @@ void relay_chn_tilt_set_sensitivity(uint8_t chn_id, uint8_t sensitivity);
* The new sensitivities are persisted in NVS if enabled.
*
* @param sensitivities Pointer to an array containing the desired tilt sensitivities.
*
* @return
*
* @return
* - ESP_OK: Success
* - ESP_ERR_INVALID_ARG: When sensitivities parameter is NULL
*/
@@ -459,7 +459,7 @@ void relay_chn_flip_direction(void);
* @brief Get the direction of the relay channel.
*
* This function retrieves the direction configuration of a relay channel.
*
*
* @return The direction of the relay channel as a value of type
* relay_chn_direction_t.
*/
@@ -468,15 +468,15 @@ relay_chn_direction_t relay_chn_get_direction(void);
#if CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT
/**
* @brief Get the run limit for the channel
*
*
* @return The run limit value for the channel.
*/
uint16_t relay_chn_get_run_limit(void);
/**
* @brief Set the run limit for the channel
*
* Sets the time limit in seconds for the channel. It will not proceed
*
* Sets the time limit in seconds for the channel. It will not proceed
* if the channel ID is invalid.
* If the limit_sec value is lesser than the CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC,
* the value will be set to CONFIG_RELAY_CHN_RUN_LIMIT_MIN_SEC.