We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d8f710 commit 46aae2eCopy full SHA for 46aae2e
tests/drivers/counter/counter_basic_api/src/test_counter.c
@@ -130,15 +130,19 @@ static bool set_top_value_capable(const char *dev_name)
130
struct counter_top_cfg cfg = {
131
.ticks = counter_get_top_value(dev) - 1
132
};
133
+ int err;
134
- int err = counter_set_top_value(dev, &cfg);
135
-
+ err = counter_set_top_value(dev, &cfg);
136
if (err == -ENOTSUP) {
137
return false;
138
}
139
140
cfg.ticks++;
141
- counter_set_top_value(dev, &cfg);
142
+ if (err == -ENOTSUP) {
143
+ return false;
144
+ }
145
+
146
return true;
147
148
0 commit comments