Use original names for config parameters

The config parameter names defined in the relay_chn_defs.h file
have been changed back to their original names (with the CONFIG_ prefix),
so that they are not confused with application-level defines.

Refs #1085
This commit is contained in:
2025-08-25 10:24:13 +03:00
parent 9d3f8ddbff
commit 5afefc4dc0
21 changed files with 186 additions and 207 deletions

View File

@@ -28,7 +28,7 @@ extern "C" {
*/
esp_err_t relay_chn_init_timer(relay_chn_ctl_t *chn_ctl);
#if RELAY_CHN_ENABLE_RUN_LIMIT == 1
#if CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT == 1
/**
* @brief Initializes the relay channel run limit timer.
*
@@ -40,7 +40,7 @@ esp_err_t relay_chn_init_timer(relay_chn_ctl_t *chn_ctl);
* @return esp_err_t ESP_OK on success, or an error code on failure.
*/
esp_err_t relay_chn_init_run_limit_timer(relay_chn_ctl_t *chn_ctl);
#endif // RELAY_CHN_ENABLE_RUN_LIMIT
#endif // CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT
/**
* @brief Issues a command to the relay channel.
@@ -102,7 +102,7 @@ void relay_chn_update_state(relay_chn_ctl_t *chn_ctl, relay_chn_state_t new_stat
*/
char *relay_chn_state_str(relay_chn_state_t state);
#if RELAY_CHN_COUNT > 1
#if CONFIG_RELAY_CHN_COUNT > 1
/**
* @brief Check if the provided channel ID is valid.
*
@@ -111,7 +111,7 @@ char *relay_chn_state_str(relay_chn_state_t state);
* @return false Channel ID is invalid.
*/
bool relay_chn_is_channel_id_valid(uint8_t chn_id);
#endif // RELAY_CHN_COUNT > 1
#endif // CONFIG_RELAY_CHN_COUNT > 1
#ifdef __cplusplus
}

View File

@@ -31,7 +31,7 @@ esp_err_t relay_chn_ctl_init(relay_chn_output_t *output, relay_chn_run_info_t *r
*/
void relay_chn_ctl_deinit(void);
#if RELAY_CHN_COUNT > 1
#if CONFIG_RELAY_CHN_COUNT > 1
/**
* @brief Get the control structure for a specific relay channel.
*
@@ -49,7 +49,7 @@ relay_chn_ctl_t *relay_chn_ctl_get(uint8_t chn_id);
relay_chn_ctl_t *relay_chn_ctl_get_all(void);
#else
relay_chn_ctl_t *relay_chn_ctl_get(void);
#endif // RELAY_CHN_COUNT > 1
#endif // CONFIG_RELAY_CHN_COUNT > 1
#ifdef __cplusplus
}

View File

@@ -45,7 +45,7 @@ esp_err_t relay_chn_nvs_set_direction(uint8_t ch, relay_chn_direction_t directio
*/
esp_err_t relay_chn_nvs_get_direction(uint8_t ch, relay_chn_direction_t *direction);
#if RELAY_CHN_ENABLE_RUN_LIMIT == 1
#if CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT == 1
/**
* @brief Store relay channel run limit in NVS.
*
@@ -63,9 +63,9 @@ esp_err_t relay_chn_nvs_set_run_limit(uint8_t ch, uint16_t time_sec);
* @return ESP_OK on success, error code otherwise.
*/
esp_err_t relay_chn_nvs_get_run_limit(uint8_t ch, uint16_t *time_sec);
#endif // RELAY_CHN_ENABLE_RUN_LIMIT == 1
#endif // CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT == 1
#ifdef RELAY_CHN_ENABLE_TILTING
#ifdef CONFIG_RELAY_CHN_ENABLE_TILTING
/**
* @brief Store tilt sensitivity in NVS.
*
@@ -101,7 +101,7 @@ esp_err_t relay_chn_nvs_set_tilt_count(uint8_t ch, uint16_t tilt_count);
* @return ESP_OK on success, error code otherwise.
*/
esp_err_t relay_chn_nvs_get_tilt_count(uint8_t ch, uint16_t *tilt_count);
#endif // RELAY_CHN_ENABLE_TILTING
#endif // CONFIG_RELAY_CHN_ENABLE_TILTING
/**
* @brief Erase all keys in the NVS namespace.

View File

@@ -36,7 +36,7 @@ esp_err_t relay_chn_output_init(const uint8_t* gpio_map, uint8_t gpio_count);
*/
void relay_chn_output_deinit(void);
#if RELAY_CHN_COUNT > 1
#if CONFIG_RELAY_CHN_COUNT > 1
/**
* @brief Get the relay channel output object for a specific channel.
*
@@ -59,7 +59,7 @@ relay_chn_output_t *relay_chn_output_get_all(void);
* @return Pointer to relay channel output object.
*/
relay_chn_output_t *relay_chn_output_get(void);
#endif // RELAY_CHN_COUNT > 1
#endif // CONFIG_RELAY_CHN_COUNT > 1
/**
* @brief Stop the relay channel output.

View File

@@ -45,7 +45,7 @@ typedef struct {
uint32_t last_run_cmd_time_ms; /*!< The time in milliseconds when the last run command was issued */
} relay_chn_run_info_t;
#if RELAY_CHN_ENABLE_TILTING == 1
#if CONFIG_RELAY_CHN_ENABLE_TILTING == 1
/// @brief Tilt commands.
typedef enum {
RELAY_CHN_TILT_CMD_NONE, /*!< No command */
@@ -68,11 +68,11 @@ typedef struct {
relay_chn_output_t *output; /*!< Output configuration of the relay channel */
relay_chn_cmd_t pending_cmd; /*!< The command that is pending to be issued */
esp_timer_handle_t inertia_timer; /*!< Timer to handle the opposite direction inertia time */
#if RELAY_CHN_ENABLE_RUN_LIMIT == 1
#if CONFIG_RELAY_CHN_ENABLE_RUN_LIMIT == 1
esp_timer_handle_t run_limit_timer; /*!< Timer to handle the run limit */
uint16_t run_limit_sec; /*!< Run limit in seconds */
#endif
#if RELAY_CHN_ENABLE_TILTING == 1
#if CONFIG_RELAY_CHN_ENABLE_TILTING == 1
relay_chn_tilt_ctl_t *tilt_ctl; /*!< Pointer to the tilt control structure if tilting is enabled */
#endif
} relay_chn_ctl_t;

View File

@@ -21,7 +21,7 @@ extern "C" {
*/
void relay_chn_run_info_init(void);
#if RELAY_CHN_COUNT > 1
#if CONFIG_RELAY_CHN_COUNT > 1
/**
* @brief Get run information object for a specific relay channel.
*
@@ -43,7 +43,7 @@ relay_chn_run_info_t *relay_chn_run_info_get_all(void);
* @return Pointer to run information structure.
*/
relay_chn_run_info_t *relay_chn_run_info_get(void);
#endif // RELAY_CHN_COUNT > 1
#endif // CONFIG_RELAY_CHN_COUNT > 1
/**
* @brief Get the last run command for a relay channel.