Commit dcfc5a4f authored by Dimitris Lampridis's avatar Dimitris Lampridis

sw: do not auto-increase rule and alarm count attributes

parent d49642ed
......@@ -366,7 +366,7 @@ enum wrtd_status wrtd_attr_set_alarm_repeat_count(struct wrtd_dev *wrtd,
status = wrtd_alarm_check_disabled(wrtd, idx, __func__);
WRTD_RETURN_IF_ERROR(status);
wrtd->alarms[idx].alarm.repeat_count = value == 0 ? 0 : value + 1;
wrtd->alarms[idx].alarm.repeat_count = value;
status = wrtd_write_alarm(wrtd, idx, __func__);
WRTD_RETURN_IF_ERROR(status);
......@@ -407,7 +407,7 @@ enum wrtd_status wrtd_attr_set_rule_repeat_count(struct wrtd_dev *wrtd,
status = wrtd_rule_check_disabled(wrtd, idx, __func__);
WRTD_RETURN_IF_ERROR(status);
wrtd->rules[idx].rule.conf.repeat_count = value == 0 ? 0 : value + 1;
wrtd->rules[idx].rule.conf.repeat_count = value;
status = wrtd_write_rule(wrtd, idx, __func__);
WRTD_RETURN_IF_ERROR(status);
......
......@@ -136,16 +136,17 @@ typedef enum wrtd_attr {
WRTD_ATTR_ALARM_PERIOD = __WRTD_ATTR_BASE + 0x14,
/** `RW` `int32` `alarm` Specifies the number of times an Alarm will occur at the
period specified by #WRTD_ATTR_ALARM_PERIOD, before becoming automatically disabled.
0 means infinite repetitions. When read, it returns the remaining repetitions. */
0 means infinite repetitions. 1 means that the alarm will occur only once.
When read, it returns the remaining repetitions. */
WRTD_ATTR_ALARM_REPEAT_COUNT = __WRTD_ATTR_BASE + 0x15,
/** `RO` `int32` `global` Number of defined Rules. */
WRTD_ATTR_RULE_COUNT = __WRTD_ATTR_BASE + 0x20,
/** `RW` `bool` `rule` Enable/disable a Rule. */
WRTD_ATTR_RULE_ENABLED = __WRTD_ATTR_BASE + 0x21,
/** `RW` `int32` `rule` Specifies the number of times a Rule will fire before
becoming automatically disabled. 0 means infinite. When read, it returns the
remaining repetitions. */
/** `RW` `int32` `rule` Specifies the number of times a Rule will fire before becoming
automatically disabled. 0 means infinite. 1 means that the alarm will fire only once.
When read, it returns the remaining repetitions. */
WRTD_ATTR_RULE_REPEAT_COUNT = __WRTD_ATTR_BASE + 0x22,
/** `RW` `string` `rule` Get/set Rule source. Rule sources can be:
- Local source Event IDs (in the form of **LCI-x**)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment