Implement specific *all functions

Specific `_*all` and `_*all_with` functions were implemented to make
the API more concise and clean, and to replace the use of
`RELAY_CHN_ID_ALL`, which caused confusion within the API.

Refs #1085
This commit is contained in:
2025-08-25 18:50:21 +03:00
parent be4a2ebef6
commit 3831384169
14 changed files with 578 additions and 221 deletions

View File

@@ -407,7 +407,7 @@ void relay_chn_issue_cmd(relay_chn_ctl_t* chn_ctl, relay_chn_cmd_t cmd)
#if CONFIG_RELAY_CHN_COUNT > 1
bool relay_chn_is_channel_id_valid(uint8_t chn_id)
{
bool valid = (chn_id < CONFIG_RELAY_CHN_COUNT) || chn_id == RELAY_CHN_ID_ALL;
bool valid = chn_id < CONFIG_RELAY_CHN_COUNT;
if (!valid) {
ESP_LOGE(TAG, "Invalid channel ID: %d", chn_id);
}