Skip to content

Commit

Permalink
tests/periph_rtc: Change rtc_get_alarm on rtc_get_time in callback fu…
Browse files Browse the repository at this point in the history
…nction. On callback rtc_get_alarm can get 0.
  • Loading branch information
Alexei Bezborodov authored and Alexei Bezborodov committed Dec 5, 2019
1 parent 3758868 commit 7e3921f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/periph_rtc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void cb(void *arg)

if (++cnt < REPEAT) {
struct tm time;
rtc_get_alarm(&time);
rtc_get_time(&time);
inc_secs(&time, PERIOD);
rtc_set_alarm(&time, cb, NULL);
}
Expand Down

1 comment on commit 7e3921f

@benpicco
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test case shouldn't change to accommodate your driver, your driver should change to accommodate the test case.

Please sign in to comment.